Uploads bitmap to the graphics card as texture. Returns false when that fails.
- texture: gets the pixels. Its old storage is replaced.
bitmap: Bitmap;
bitmap_alloc(*bitmap, 16, 16, .RGBA8);
defer deinit(*bitmap);
texture: Texture;
assert(texture_load_from_bitmap(*texture, *bitmap));This one is only checked to compile, not run.
texture_load_from_bitmap :: (texture: *Texture, bitmap: *Bitmap) -> bool
Uploads bitmap to the graphics card as texture. Returns false when that fails.
Parameters
Returns
- bool
bitmap: Bitmap;
bitmap_alloc(*bitmap, 16, 16, .RGBA8);
defer deinit(*bitmap);
texture: Texture;
assert(texture_load_from_bitmap(*texture, *bitmap));This one is only checked to compile, not run.