Go to the source code of this file.
◆ TextureDeinit()
void TextureDeinit |
( |
struct texture * |
texture | ) |
|
De-initialize a texture object.
- Parameters
-
[in,out] | texture | The texture object to de-initialize |
◆ TextureInitFromFile()
struct texture* TextureInitFromFile |
( |
char * |
file | ) |
|
Initialize a new texture object.
This uses stb_image, and thus all the image formats supported by that library.
- Parameters
-
[in] | file | Path to the image file to load |
- Returns
- an initialized texture object
◆ TextureSample()
unsigned int TextureSample |
( |
struct texture * |
texture, |
|
|
float |
u, |
|
|
float |
v |
|
) |
| |
Texel lookup.
Textures are organized such that (0,0) is the top-left corner, and (0,1) is the lower-left corner.
- Parameters
-
[in] | texture | the Texture object to sample |
[in] | u | the horizontal texture coordinate |
[in] | v | the vertical texture coordinate |