View Full Version : glGetString(GL_VERSION) version detect problem.
03-17-2003, 07:20 AM
Anyone got a clue why glGetString(GL_VERSION) would be sending back a single "0" instead of the version it should be? This is on WinXP Home Edition. Everything works, I just wanted to put some detection in for systems that do not support 1.2 and above.
Do you have a rendering context?
03-17-2003, 08:54 AM
Sorry I don't understand?
What I want to do is determine the OpenGL level supported on a machine before the main program starts.
For any OpenGL-function to work, you need to have a rendering context. You usually create a rendering contex when you create a window. So in short, you need to create a window before you can call glGetString.
03-17-2003, 09:19 AM
You can't. You must have a rendering context and it must be current for gl functions not to error.
03-17-2003, 09:26 AM
Ok, Understood. This means that I'll have to create the context then do the test to see which verision is supported.
03-17-2003, 10:30 AM
Thanks, guys now all I get is the number
"1767548376". I'm doing this under VB.
As always your help is appreciated.
03-17-2003, 10:46 AM
Show a little code snippet of the context creation through the call to glGetString.
The function returns a string not a number.
[This message has been edited by shinpaughp (edited 03-17-2003).]
03-17-2003, 11:33 AM
Thanks fella's but I finally got it. All of a sudden the light in the fridge came on. The number that is returned is the pointer to the string. So I just used a couple of apis to retrive and converts the pointer to a VB string and <Bam> got the string I needed.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.