View Full Version : Platform Detection Algorithm

05-03-2002, 12:14 PM
Hi -

This is maybe not an advanced OpenGL question. So, please don't take offense.

I am attempting to create a platform detection algorithm so I can turn OpenGL freatures on/off as they are availible.

1. Does anybody know of a good platform detection algorithm? I found a really cool utility called GLView (not the 3d image viewer, but a OpenGL capabilities detector). I would like to be able to obtain much of the same information that this program does.

2. I tried using glGetString(enum) where enum is GL_VERSION, GL_EXTENSIONS, GL_VENDOR, or GL_RENDERER, and I always receive a pointer to NULL. I'm using Microsoft Visual Studio (C++). When I do the same in VB6 I get large numbers like 1766921316, for instance, for the renderer. Anybody know what's up?

I am really new to platform detection. So, I would really appreciate any insight you could offer.


05-03-2002, 12:23 PM
To use glGetString to retrieve the strings you're trying to get, you need to have a valid, active GL rendering context.

Hope that helped

05-06-2002, 04:36 AM
Thanks Dodger! That was it.