|
Catchea
Topographic Data Browser
|
Represents texture with dimensions and id in OpenGL. More...
#include <resource_manager.h>
Public Member Functions | |
| Texture | rm_load_texture (const char *filename) |
| Texture | rm_texture_from_memory (const void *data, int width, int height, int channels_count) |
| void | rm_free_texture (Texture tex) |
Public Attributes | |
| GLuint | texture_id |
| int | width |
| int | height |
Represents texture with dimensions and id in OpenGL.
For example, to store UI icons/assets
| Texture rm_load_texture | ( | const char * | filename | ) |
Load texture and register in OpenGL
| filename | path to texture's file |
| Texture rm_texture_from_memory | ( | const void * | data, |
| int | width, | ||
| int | height, | ||
| int | channels_count | ||
| ) |
| [in] | data | memory buffer to register |
| [in] | width | buffer's width |
| [in] | height | buffer's height |
| [in] | channels_count | number of color channels (ex. RGB = 3, RGBA = 4) |
1.8.11