| DemoGL::Reference::Functions::DEMOGL_TextureCubeMapCreateDynamic |
GLuint DEMOGL_TextureCubeMapCreateDynamic( const int iWidth, const int iHeight, const char *pszIdentName, const int iBorder, const GLint iMinFilter, const GLint iMagFilter, const GLint iTexUploadHint );
| 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. 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. |
Cubemapping is implemented in hardware using the DirectX concepts. This means that negative Z en positive Z are switched. See DemoGL Example 6 for example code on how to use DemoGL to render objects using cubemaps. It's recommended to read nVidia's documentation about cubemaps and OpenGL also on their developer site, especially CubeEnvMapping2.pdf.
DemoGL_glext.h contains all necessary constant definitions for cubemapping. When you use cubemaps in your code, be sure to include DemoGL_glext.h.
Last changed on 31-may-2001
©1999-2001 Solutions Design