Internals of the Texture module.
More...
Internals of the Texture module.
- See also
- Texture
◆ N_CHANNELS_REQUESTED
| #define N_CHANNELS_REQUESTED 3 |
Number of channels requested from the stbi_load() call.
◆ srpFreeTexture()
Free a texture
- Parameters
-
◆ srpNewTexture()
Initialize a texture by loading an image
- Parameters
-
| [in] | image | A filesystem path to an image. Most popular image types are supported |
| [in] | wrappingModeX,wrappingModeY | Wrapping modes to use in X and Y axes |
- Returns
- A pointer to the constructed texture
◆ srpTextureGet()
Get a parameter from existing SRPTexture
- Parameters
-
| [in] | this | A pointer to texture |
| [in] | parameter | A struct member to get |
- Returns
- Requested member, or -1 on failure
◆ srpTextureGetFilteredColor()
| void srpTextureGetFilteredColor |
( |
const SRPTexture * |
this, |
|
|
float |
u, |
|
|
float |
v, |
|
|
float |
out[4] |
|
) |
| |
Get a texel color at u, v by filtering the texture using specified modes
- Parameters
-
| [in] | this | A pointer to the texture, as returned by srpNewTexture() |
| [in] | u,v | Coordinates of the requested texel |
| [out] | out | An array of 4 values each in [0, 1] interval, representing RGBA8888 color (0.0 = 0x0; 1.0 = 0xFF) |
◆ srpTextureSet()
Set a parameter to existing SRPTexture
- Parameters
-
| [in] | this | A pointer to texture |
| [in] | parameter | A struct member to set to |
| [in] | data | A value to set |