PDA

View Full Version : using WGL_ARB_buffer_region, could someone help?



ymish
12-27-2003, 09:50 AM
Hi All,

After 2 days of trying using WGL_ARB_buffer_region I am desperate.

I have read NVIDIA specs and read a very nice tutorial at delphi3d.

However, I am programming in c++ and did not succeed to make it work.

First of all calling glGetString(GL_EXTENSIONS) does not return wglGetExtensionsStringARB!!

I have tried it on Geforce Ti4800 and on Fx5600.

It is very urgent, could someone send me a working code in C++.

I will be very very grateful :-)

azazello
12-27-2003, 01:03 PM
>>First of all calling glGetString(GL_EXTENSIONS) does not return wglGetExtensionsStringARB!!
glGetString should return a list of extensions, not a functions.
may by you didn't init GL extensions(GL and WGL/GLX -use glew.sf.net in this case)?

idr
12-27-2003, 08:07 PM
WGL_ARB_buffer_region (http://oss.sgi.com/projects/ogl-sample/registry/ARB/wgl_buffer_region.txt) is a WGL extension, not a GL extension. Use wglGetExtensionsStringARB (http://oss.sgi.com/projects/ogl-sample/registry/ARB/wgl_extensions_string.txt) instead. If the extension is supported, use wglGetProcAddress to get pointers to the functions added by the extension.

One other note, do not name the function pointers the same thing as the functions. So, don't do:



wglCreateBufferRegionARB = wglGetProcAddress( "wglCreateBufferRegionARB" );


[This message has been edited by idr (edited 12-27-2003).]

NitroGL
12-27-2003, 08:20 PM
Originally posted by idr:
One other note, do not name the function pointers the same thing as the functions.

Um... May I ask WHY?

[This message has been edited by NitroGL (edited 12-27-2003).]

ymish
12-28-2003, 08:03 AM
Hi,

First, thanks for your replies.
ayaromenok, you helped me a lot! glew is a very nice thing :-)

However, I now have collisions between glew's extensions and glh_extensions of NVIDIA.

I need glh_extensions for occlusion queries (with glGetOcclusionQueryuivNV and other related functions)

What can I do?
How can I solve it.

Zengar
12-28-2003, 10:35 AM
Originally posted by idr:

One other note, do not name the function pointers the same thing as the functions. So, don't do:


I'm doing it so my whole life...