MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Cg OpenGL Runtime API                         cgGLSetupSampler(3)



NAME
     cgGLSetupSampler - initializes a sampler's state and texture
     object handle

SYNOPSIS
       #include 

       void cgGLSetupSampler( CGparameter param,
                              GLuint texobj );


PARAMETERS
     param   The sampler parameter that will be set.

     texobj  An OpenGL texture object name to which the parameter
             will be set.

RETURN VALUES
     None.

DESCRIPTION
     cgGLSetupSampler initializes a sampler; like
     cgGLSetTextureParameter, it informs the OpenGL Cg runtime
     which OpenGL texture object to associate with the sampler.
     Furthermore, if the sampler was defined in the source file
     with a samplerstate block that specifies sampler state,
     this sampler state is initialized for the given texture
     object.

     Note that in order to use the texture, either
     cgGLEnableTextureParameter must be called after
     cgGLSetTextureParameter and before the geometry is drawn, or
     cgGLSetManageTextureParameters must be called with a value
     of CGTRUE.

EXAMPLES
     to-be-written

ERORS
     CGINVALIDPROFILEROR is generated if param's profile is
     not a supported OpenGL profile.

     CGINVALIDPARAMHANDLEROR is generated if param is not a
     valid parameter.

     CGINVALIDPARAMETEREROR is generated if param is not a
     texture parameter or if the parameter fails to set for any
     other reason.

HISTORY
     cgGLSetupSampler was introduced in Cg 1.4.




Cg Toolkit 2.1            Last change:                          1






Cg OpenGL Runtime API                         cgGLSetupSampler(3)



SEE ALSO
     cgGLSetTextureParameter, cgGLGetTextureParameter,
     cgGLSetManageTextureParameters




















































Cg Toolkit 2.1            Last change:                          2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™