Can't get glGetString(GL_EXTENSIONS) to work - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Can't get glGetString(GL_EXTENSIONS) to work (/thread-7782.html)
Can't get glGetString(GL_EXTENSIONS) to work - NCarter - May 7, 2002 03:11 PM
I've just switched from using RGBA to ARGB pixels after looking at OneSadCookie's QTValuePak code (thanks for sharing your code, OneSadCookie!), and it works perfectly. To be safe, I'd like to check for the availability of EXT_bgra during startup, using the following code to get the list of extensions:
Unfortunately, it always returns NULL even though no error is reported. I've tried calling it both before and after a context has been created, and the same thing happens. Anybody have any idea what the problem might be?
Can't get glGetString(GL_EXTENSIONS) to work - Mars_999 - May 7, 2002 03:30 PM
Quote:Originally posted by NCarter
I am confused why you have the global scope resolution operator after a typecast of char*? Is glGetString() part of a class or in a global scope?
Can't get glGetString(GL_EXTENSIONS) to work - NCarter - May 7, 2002 03:41 PM
Quote:Originally posted by Mars_999
Maybe it's bad form, but I use :: to prefix system functions as they're always in the global scope. I'm saying '::glGetString()' because it's not in any class or namespace, if you see what I mean. It was originally just an informal notation I used to use to make things more readable for myself, but as I make more widespread use of namespaces these days it has become more relevant.
I knew someone would pick me up on that!
Can't get glGetString(GL_EXTENSIONS) to work - OneSadCookie - May 7, 2002 07:13 PM
I don't bother checking for EXT_bgra, because it is supported by all cards on MacOSX, and the software renderer. I don't imagine they're going to remove support in a future version
As to it returning NULL, my only guess is that you're calling it before you have a context. Since you say you're not, I'm all out of ideas
Can't get glGetString(GL_EXTENSIONS) to work - NCarter - May 7, 2002 11:59 PM
Fair enough. Maybe I'll just make sure that OpenGL is there (weak link then check for it and pop up a dialog if it isn't) instead. I imagine that if I look for OpenGL 1.2 I should be covered.
That said, I was getting NULL for GL_RENDERER and everything else as well, so it looks like something's wrong somewhere. I'd better look for the source of the problem.
Anyway, thanks again!