Allowable texture size height and width in pixels are 8, 16, 32, 64, 128, 256, 512, and 1024. You can load a texture using any combination of the previous values. Only 2D textures are supported. Textures are loaded upside down in keeping with the sprit of OpenGL. Be aware of this when mixing KGL and the PVR API. You may have to flip the V texture coordinates (V = 1 - V) depending upon your application.
The only supported target is GL_TEXTURE_2D.
If you have already allocated and loaded a texture you can use this
shortcut function to make it available to KGL. The internal_fmt
varies from from the OpenGL spec. The table shows the internal formats
supported by the PVR2.
internal_fmt |
GL_ARGB1555 |
GL_RGB565 |
GL_ARGB4444 |
GL_YUV422 |
GL_BUMP |
GL_ARGB1555_TWID |
GL_RGB565_TWID |
GL_ARGB4444_TWID |
GL_YUV422_TWID |
GL_BUMP_TWID |
Setup the texture environment. See the following table for valid arguments
to this function.
target | pname | param |
GL_TEXTURE_2D | GL_TEXTURE_ENV_MODE | GL_REPLACE |
GL_MODULATE (default) | ||
GL_DECAL | ||
GL_MODULATEALPHA |
Defines a two-dimensional texture. The only supported target
is GL_TEXTURE_2D. Border, level, and pixel conversion
(type) are not supported. The internalFormat and format
arguments must be the same. See the table in section ,
on page
.
Allows specification of additional texture attributes.
target | pname | param | ||
GL_TEXTURE_2D | GL_TEXTURE_FILTER |
|
||
GL_TEXTURE_WRAP_S |
|
|||
GL_TEXTURE_WRAP_T |
|