SetTextureMapping

Advanced function

static void SetTextureMapping(
bool turnedOn );

Turns the OpenGL texture mapping on or off. On by default.

This doesn't affect OpenLayer's functions, but if you use OpenGL directly you might wish to choose if the texture mapping is turned on or not.

You should use this function instead of glEnable( GL_TEXTURE_2D ) or glDisable( GL_TEXTURE_2D ) because it lets OpenLayer to know that the texture mapping preferences have changed. Otherwise either OpenLayer or your own OpenGL code may not function properly.

Examples

// Turn off OpenGL's texture mapping //
Settings::SetTextureMappingfalse );


Other functions of the class Settings
SetAntialiasing
Turns the anti-aliasing on or off
SetCircleAccuracy
Sets the accuracy of the circle drawing functions
SetCollisionPolyAccuracy
Sets the accuracy of the generated collision polygons
SetCollisionPolyAlphaLimit
Sets the maxium alpha value which is considered transparent by the collision polygon generation

Advanced functions

SetTextureMapping
Turns the OpenGL texture mapping on or off
TextureMappingUsed
Returns true if texture mapping is turned on
SetOrthographicProjection
Sets the orthographic projection as the active OpenGL projection mode
RestoreOldProjection
Restores the old projection mode
StoreMemoryBitmaps
Choose the Bitmaps to be stored in the memory
MemoryBitmapsStored
Returns true if the Bitmaps are stored in the memory


Questions about SetTextureMapping? Click here.