Skip to main content
gamedev.net
🔒 Locked

linux wgl-equivalent

Started by cody 4 replies 1.5k views
Original Post
cody
cody
im using wglAllocateMemoryNV and wglGetProcAddress in windows and i wanna port it to linux, but i didnt find similar functions in the linux headers. but i really think there should be equivalents...
Obelix
Obelix
glX is similar to wgl for X.
Somewhere around line 107 in glx.h from nvidia:

void (*glXGetProcAddressARB(const GLubyte *procName))(void);
void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq,
GLfloat writefreq, GLfloat priority);

You do not really need to get the function addresses in linux but it is supported.
cody
cody
i found glXGetProcAddressARB in glxext.h, but no glXAllocateMemoryNV, glx.h isnt on my windows comp so i will look for it later.

thanks for the help
Obelix
Obelix
If you are using a nvidia card can it be easier to use their headers since it will have the latest extensions. When you installed the drivers should the headers be placed in
/usr/share/doc/NVIDIA_GLX-1.0/include/GL

I guess that you can use the normal extension headers as an alternative.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.