Catchea
Topographic Data Browser
Public Member Functions | Public Attributes | List of all members
Texture Struct Reference

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
 

Detailed Description

Represents texture with dimensions and id in OpenGL.

For example, to store UI icons/assets

Member Function Documentation

void rm_free_texture ( Texture  tex)

Free texture from OpenGL

Parameters
texTexture to be freed
Texture rm_load_texture ( const char *  filename)

Load texture and register in OpenGL

Parameters
filenamepath to texture's file
Returns
loaded texture
Texture rm_texture_from_memory ( const void *  data,
int  width,
int  height,
int  channels_count 
)
Deprecated:
Load texture from memory buffer and register in OpenGL
Parameters
[in]datamemory buffer to register
[in]widthbuffer's width
[in]heightbuffer's height
[in]channels_countnumber of color channels (ex. RGB = 3, RGBA = 4)
Returns
loaded texture

The documentation for this struct was generated from the following file: