Jump to content
  • Advertisement
Sign in to follow this  

vertex shader initialization problem

This topic is 4962 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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);


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!