Jump to content
  • Advertisement
Sign in to follow this  
Cacks

glGetString()

This topic is 4818 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 guys, Im having trouble with glGetString(). Using VC++ 2003. Eg. My code is - const GLubyte* gl_vend = glGetString(GL_VENDOR); I'm getting a NULL pointer returned (Im using the debugger to look at the value). Any ideas on why it won't work? I don't think an extension is needed? Also, how would I go about casting gl_vend to a standard C++ string? Thanks for any help!

Share this post


Link to post
Share on other sites
Advertisement
Just a guess, but in order to execute any GL command you have to create a valid GL rendering context first. Have you done that?

Share this post


Link to post
Share on other sites
Quote:
Original post by Cacks
Also, how would I go about casting gl_vend to a standard C++ string?

std::string glVendor = reinterpret_cast< char const * >(glGetString(GL_VENDOR));

Enigma

Share this post


Link to post
Share on other sites
mikeman, good guess, I haven't created a rendering context at all yet. I didn't realise a rendering context was needed for non-graphics displaying commands.

Enigma, I'll give that a try once I've created a rendering context.

Thanks for the help!!

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!