Jump to content
  • Advertisement
Sign in to follow this  
bkenwright

OpenGL cgGLGetLatestProfile Failing! (OpenGL/cg)

This topic is 4630 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 Everyone, I'm having a horrible problem with cg shaders and opengl. Bascially, I can't load and compile my shader till I get the hardware shader profile using 'cgGLGetLatestProfile' As when I use: g_CGprofile_vertex = cgGLGetLatestProfile(CG_GL_VERTEX); it just seems to always fail! Returns 0, or should I say CG_PROFILE_UNKNOWN. Is there something that could cause it to always fail...I'm just using a simple windows setup and opengl (not glut). Thanks for any ideas on this

Share this post


Link to post
Share on other sites
Advertisement
I don't know for sure what they're doing under the hood in that function but I would assume they are using gl functions to see what's supported. If that's the case (probably is) the standard "Do you have a valid gl rendering context set up?" applies. So do you? If you do and there's nothing in the cg docs about it I think we'll need more info.

EDIT:
Quote:
On the top of page 74 in the Cg User's Manual
Note: Before any OpenGL Cg runtime functions can be executed, an OpenGL context must be created with either wglCreateContext() or glXCreateContext().
So make sure you do have a rendering context first.

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!