Does glGetString(GL_EXTENSIONS) display all support extensions of the video card?

Started by
4 comments, last by b2b3 16 years, 10 months ago
This probably seems like a silly question, but does glGetString(GL_EXTENSIONS) display every supported OpenGL extension supported by the video card? I've run this program on my laptop and it does NOT show any of the following extensions: WGL_ARB_pbuffer WGL_ARB_pixel_format GL_EXT_framebuffer_object Does that mean the ONLY way I can render-to-texture is by using gltexSubImage2d and glReadPixels? Thanks, John
Advertisement
Well, you could try digging up information on your particular model of graphics card. In any case your only other real option is to call wglGetProcAddress and see if it returns NULL. On the whole, I wouldn't use any extensions not given by glGetString(GL_EXTENSIONS). Even if you can get the entry points they might well be experimental in the driver or something. I'm going to guess this is an Intel chipset though, not nVidia/ATI, and that it's fairly old. If you haven't tried digging up new drivers, do so. Incidentally, what does glGetString return for GL_VENDOR, GL_RENDERER and GL_VERSION?
Hmmm, I don't have my laptop on me at the moment but I've tried the same program on my home machine (8800 GTX video card) and it works fine so it seems like my laptop just doesn't support the framebuffer object.

Is this a common thing? (eg. lack of support for FBOs?)

I'd like my game to run on lower-end hardware so am I forced to use glTexSubImage2D()?

(My laptop's video card doesn't even seem to support the pbuffer extension?!)
glCopyTexSubImage2D can give better performance than FBOs
FBOs are useful if u dont wanna be constrained to the windows format/size etc
eg if u want a texture bigger than the window

also glTexSubImage2D uses already existing data GLubyte *data to update a texture, if u wanna draw into a texture like FBO u need to use like i said glCopyTexSubImage2D
What I'd like to do is render my scene to a much smaller texture and then stretch it back over the screen to give my game a bloom effect.

Is that possible with glCopyTexSubImage2D?
glGetString(GL_EXTENSIONS) does not return all extensions that are supported by hardware. It returns only GL extensions (those with names starting with GL_) and some special extensions that are kept there for compatibility reasons. WGL extensions live in a separate "namespace". To query all WGL extensions your hardware supports you must first query if your hardware supports WGL_EXT_extensions_string or WGL_ARB_extensions_string extensions.
Both these extensions provide methods to query list of WGL extensions in similar manner than classis glGetString.
That is, to query list of all supported WGL extensions you have to do this:
PFNWGLGETEXTENSIONSSTRINGEXTPROC wglGetExtensionsStringEXT = wglGetProcAddress("wglGetExtensionsStringEXT");std::string wgl_extensions;if (wglGetExtensionsStringEXT){    wgl_extensions = string(wglGetExtensionsStringEXT());}


or using the ARB extension:
PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = wglGetProcAddress("wglgetExtensionsStringARB");std::string wgl_extensions;if (wglGetExtensionsStringARB){    // hdc is handle of the current device context    wgl_extensions = string(wglGetExtensionsStringARB(hdc));}


So to test if some extension is supported, you have to test both GL and WGL extension string.

This topic is closed to new replies.

Advertisement