cgGLSetManageTextureParameters
Keywords: cgGLSetManageTextureParameters, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## 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