Cg Toolkit Cg 3.1 Toolkit Documentation
Cg / Runtime / CgGL / cgGLSetManageTextureParameters

Name

cgGLSetManageTextureParameters - set the manage texture parameters flag for a context

Synopsis

#include <Cg/cgGL.h>

void cgGLSetManageTextureParameters( CGcontext context,
                                     CGbool flag );

Parameters

context
The context in which the automatic texture management behavior will be changed.
flag
A boolean switch which controls automatic texture management by the runtime.

Return Values

None.

Description

By default, cgGL does not manage any texture state in OpenGL. It is up to the user to enable and disable textures using cgGLEnableTextureParameter and cgGLDisableTextureParameter respectively. This behavior is the default in order to avoid conflicts with texture state on geometry that's rendered with the fixed function pipeline or without cgGL.

If automatic texture management is desired, cgGLSetManageTextureParameters may be called with flag set to CG_TRUE before cgGLBindProgram is called. Whenever cgGLBindProgram is called, the cgGL runtime will make all the appropriate texture parameter calls on the application's behalf.

cgGLUnbindProgram may be used to reset the texture state

Calling cgGLSetManageTextureParameters with flag set to CG_FALSE will disable automatic texture management.

NOTE: When cgGLSetManageTextureParameters is set to CG_TRUE, applications should not make texture state change calls to OpenGL (such as glBindTexture, glActiveTexture, etc.) after calling cgGLBindProgram, unless the application is trying to override some parts of cgGL's texture management.

Examples

to-be-written

Errors

None.

History

cgGLSetManageTextureParameters was introduced in Cg 1.2.

See Also

cgGLGetManageTextureParameters, cgGLBindProgram, cgGLUnbindProgram


Cg Toolkit | Cg Toolkit | Download | Release Archive | Profiles | Reference | Books | Discussions |


Cg Runtime CgGL

cgGLBindProgram
cgGLCreateBufferFromObject
cgGLCreateBuffer
cgGLDetectGLSLVersion
cgGLDisableClientState
cgGLDisableProfile
cgGLDisableProgramProfiles
cgGLDisableTextureParameter
cgGLEnableClientState
cgGLEnableProfile
cgGLEnableProgramProfiles
cgGLEnableTextureParameter
cgGLGetBufferObject
cgGLGetContextGLSLVersion
cgGLGetContextOptimalOptions
cgGLGetGLSLVersion
cgGLGetGLSLVersionString
cgGLGetLatestProfile
cgGLGetManageTextureParameters
cgGLGetMatrixParameterArraydc
cgGLGetMatrixParameterArraydr
cgGLGetMatrixParameterArrayfc
cgGLGetMatrixParameterArrayfr
cgGLGetMatrixParameterArray
cgGLGetMatrixParameterdc
cgGLGetMatrixParameterdr
cgGLGetMatrixParameterfc
cgGLGetMatrixParameterfr
cgGLGetMatrixParameter
cgGLGetOptimalOptions
cgGLGetParameter1d
cgGLGetParameter1f
cgGLGetParameter2d
cgGLGetParameter2f
cgGLGetParameter3d
cgGLGetParameter3f
cgGLGetParameter4d
cgGLGetParameter4f
cgGLGetParameterArray1d
cgGLGetParameterArray1f
cgGLGetParameterArray2d
cgGLGetParameterArray2f
cgGLGetParameterArray3d
cgGLGetParameterArray3f
cgGLGetParameterArray4d
cgGLGetParameterArray4f
cgGLGetParameterArray
cgGLGetParameter
cgGLGetProgramID
cgGLGetTextureEnum
cgGLGetTextureParameter
cgGLIsProfileSupported
cgGLIsProgramLoaded
cgGLLoadProgram
cgGLRegisterStates
cgGLSetContextGLSLVersion
cgGLSetContextOptimalOptions
cgGLSetDebugMode
cgGLSetManageTextureParameters
cgGLSetMatrixParameterArraydc
cgGLSetMatrixParameterArraydr
cgGLSetMatrixParameterArrayfc
cgGLSetMatrixParameterArrayfr
cgGLSetMatrixParameterArray
cgGLSetMatrixParameterdc
cgGLSetMatrixParameterdr
cgGLSetMatrixParameterfc
cgGLSetMatrixParameterfr
cgGLSetMatrixParameter
cgGLSetOptimalOptions
cgGLSetParameter1d
cgGLSetParameter1dv
cgGLSetParameter1f
cgGLSetParameter1fv
cgGLSetParameter2d
cgGLSetParameter2dv
cgGLSetParameter2f
cgGLSetParameter2fv
cgGLSetParameter3d
cgGLSetParameter3dv
cgGLSetParameter3f
cgGLSetParameter3fv
cgGLSetParameter4d
cgGLSetParameter4dv
cgGLSetParameter4f
cgGLSetParameter4fv
cgGLSetParameterArray1d
cgGLSetParameterArray1f
cgGLSetParameterArray2d
cgGLSetParameterArray2f
cgGLSetParameterArray3d
cgGLSetParameterArray3f
cgGLSetParameterArray4d
cgGLSetParameterArray4f
cgGLSetParameterArray
cgGLSetParameter
cgGLSetParameterPointer
cgGLSetStateMatrixParameter
cgGLSetTextureParameter
cgGLSetupSampler
cgGLUnbindProgram
cgGLUnloadProgram