Sign in to follow this  
Marlitan

vertex shader initialization problem

Recommended Posts

Hi, I am going crazy from problem I have. I am initializing vertex shader program and I am unable to use vertex profile. Now I have the simpliest cg initialization, which I copied from NEHE tutorial: createcontext works, but cgGLGetLatestProfile doesn't and I don't know why, it always returns CG_PROFILE_UNKNOWN although when I run that NEHE tutorial on CG vertex shader, so it works. and cgGLGetLatestProfile returns appropriate value. Is there something special with initialization? I copied CreateWindow.., PFD ... and nothing. Any recomendation or solution? Thanks Marlitan
CGcontext	cgContext;
CGprofile	cgVertexProfile;

cgContext = cgCreateContext();
if (cgContext == NULL)
    MessageBox(NULL, "Failed To Create Cg Context", "Error", MB_OK);

cgVertexProfile = cgGLGetLatestProfile(CG_GL_VERTEX);	
if (cgVertexProfile == CG_PROFILE_UNKNOWN)
	MessageBox(NULL, "Invalid profile type", "Error", MB_OK);

cgGLSetOptimalOptions(cgVertexProfile);	

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