(wgl/glX)AllocateMemoryNV

hello!

under win32 do i have to use wglGetProcAddress to get a pointer to the func?
and unde linux? i assume glXGetProcAddress.

Under linux, does the NVIDIA driver export all the extensions statically? I just tried to use the header gl.h provided with the drivers, which treats all extensions nvidia supports as statically exported, however my app crashes when using extensions.

-Lev

The linux forum might be a better place to ask this question.

Just for asking dumb questions, you do check if they’re supported, right?

There is also extension for GLX that allows you to fetch function pointers just like Win32.

The linux forum is like this:

Where do I get opengl for athlon?
i can’t setup opengl with my voodoo 1

Surely I do check if a nextension is available and a’m also aware of glXGetProcAddress, but why mess around with function pointers if they are all exported statically?

-Lev

Checked with the our Linux OpenGL driver group and:

There are 2 parts to his question:

  1. glXGetProcAddress(): Yes, it exists. However, we use both methods, ie. we do port glXGetProcAddress(), but also provide statically linked versions of the functions.
  1. app crashes using extensions: That should work. Can he provide a test case that can be filed as a bug??

If you’ll provide a test case, Lev, I’ll follow up.

Thanks -
Cass

Thnx for the answer Cass. Statically exported functions are really a great deal. I dont see any reason for adapting MS’s GetProcAddress stuff anyway. (The reason given in Linux ABI specs that libGL may provide extensions which are implemented in other libs is not that reality-related)

As far as crashing goes it seems to be a problem with my code: I’ve just compiled the stuff under win32 and it crashed also

-Lev

I think the GetProcAddress approach is actually pretty flexible. Both approaches are “dynamic linking”, but GetProcAddress is explicit linking whereas just having the os do it for you is implicit linking.

The trouble with implicit linking in this context is that it makes it complicated to build an exe that can use extensions not available on the platform you’re compiling on. With explicit linking, all you need is a good header to compile with arbitrary extension support.

My $0.02.

Cass