Jump to content
  • Advertisement
Sign in to follow this  
DrDerekDoctors

glSecondaryColor3f causing a crash despite extensions being present

This topic is 4826 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

Odd, I'm finding that my code dies on some machines at a call to "glSecondaryColor3f" despite the fact that in the list of extensions both "GL_EXT_secondary_color" and "GL_EXT_separate_specular_color" are present. Is there something blindingly obvious I'm missing here? Thanks in advance, Graham Goring

Share this post


Link to post
Share on other sites
Advertisement
I'll be honest, I've never really done any of that stuff as thought the need for it was only when it was an ARB thingy? Is this a huge area which I've idiotically skipped over?

Share this post


Link to post
Share on other sites
Wether the function comes from the OpenGL API core, from an ARB-class extension or any other type of extension, you always have to load it manually if the import library (opengl32.lib) won't do it for you.

Share this post


Link to post
Share on other sites
Quote:
Original post by DrDerekDoctors
Ok, I guess I'll have to look up how to do that but if that was the problem, why wouldn't it fail on every PC instead of just some of them, out of curiosity?


When you need one of the so called extension you request, I'm simplifying, a pointer to a function.
It is the driver that returns you this pointer and only if the extension is supported.
If you forget about initialize the function pointers you are going to use the result can be undefined! So on some lucky systems it does not create problems, on others you have a crash.
My suggestion is to use some high level extension lib like glee or glew (google for glee or glew opengl extension lib).

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!