Sign in to follow this  
Dirk Gregorius

CgFX and Cg

Recommended Posts

Can I mix the CgFX and Cg runtime?
// Obtain a vertex shader handle
// Is this bound or loaded
pEffect->GetVertexShader( "Name", &hVS );

// Get some varaying parameter
position = cgGetNamedParameter( hVS, "POSITION" );
color    = cgGetNamedParameter( hVS, "COLOR0" );
texCoord = cgGetNamedParameter( hVS, "TEXCOORD0" );

// And upload the data
cgGLEnableClientState( position );
cgGLSetParameterPointer( position, 3, GL_FLOAT, 0,
vertexPositions );
cgGLEnableClientState( color );
cgGLSetParameterPointer( color, 1, GL_FLOAT, 0,
vertexColors );
cgGLEnableClientState( texCoord );
cgGLSetParameterPointer( texCoord, 2, GL_FLOAT, 0,
vertexTexCoords );

Is this or something similar possible? Best regards -Dirk

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this