| DemoGL::Reference::Functions::DEMOGL_TextureLoad |
GLuint DEMOGL_TextureLoad( const char *pszFilename, const int iFileType, const int iDepth, const GLint iWrapS, const GLint iWrapT, const GLint iMinFilter, const GLint iMagFilter, const bool bMipMaps, const bool bCreateAlphaFromColor, const int iBorder, const GLint iTexUploadHint, const int iDimensions );
| FileType | Description |
| DGL_FTYPE_JPGFILE | Imagedata stored using the JPEG format. |
| DGL_FTYPE_TGAFILE | Imagedata stored using the TGA format. |
| DGL_FTYPE_BMPFILE | Imagedata stored using the BMP format. |
| DGL_FTYPE_DDSFILE | Imagedata stored using the DDS format (DirectX compressed: DXT1, DXT3 or DXT5 format). |
| Value | Meaning |
|---|---|
| GL_NEAREST | Returns the value of the texture element that is nearest (in Manhattan distance) to the center of the pixel being textured. |
| GL_LINEAR | Returns the weighted average of the four texture elements that are closest to the center of the pixel being textured. These can include border texture elements, depending on the values of iWrapS, iWrapT, and on the exact mapping. GL_NEAREST is generally faster than GL_LINEAR, but it can produce textured images with sharper edges because the transition between texture elements is not as smooth. |
| GL_NEAREST_MIPMAP_NEAREST | Chooses the mipmap that most closely matches the size of the pixel being textured and uses the GL_NEAREST criterion (the texture element nearest to the center of the pixel) to produce a texture value. |
| GL_LINEAR_MIPMAP_NEAREST | Chooses the mipmap that most closely matches the size of the pixel being textured and uses the GL_LINEAR criterion (a weighted average of the four texture elements that are closest to the center of the pixel) to produce a texture value. |
| GL_NEAREST_MIPMAP_LINEAR | Chooses the two mipmaps that most closely match the size of the pixel being textured and uses the GL_NEAREST criterion (the texture element nearest to the center of the pixel) to produce a texture value from each mipmap. The final texture value is a weighted average of those two values. |
| GL_LINEAR_MIPMAP_LINEAR | Chooses the two mipmaps that most closely match the size of the pixel being textured and uses the GL_LINEAR criterion (a weighted average of the four texture elements that are closest to the center of the pixel) to produce a texture value from each mipmap. The final texture value is a weighted average of those two values. |
When loading a DDS file, the hardware has to support compressed textures, thus has to support the GL_ARB_texture_compression or GL_EXT_texture_compression extension.
Last changed on 28-may-2001
©1999-2001 Solutions Design