Skip to main content
gamedev.net
🔒 Locked

glGetString()

Started by Cacks Sep 5, 2005 at 12:25 PM 2 replies 5.1k views
Original Post
Cacks
Cacks
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!
Reject the basic asumption of civialisation especially the importance of material possessions
Enigma
Enigma
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
Cacks
Cacks
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!!
Reject the basic asumption of civialisation especially the importance of material possessions

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.