Skip to main content
GameDev.net gamedev.net
🔒 Locked

wglSwapIntervalEXT on Linux

Started by subi211 Nov 18, 2008 at 4:50 AM 5 replies 4.5k views
Original Post
subi211
subi211
Not as loony as it sounds. I'm porting an OGL app from Windows to Linux, and to my surprise the driver (ATI's fglrx 2.1.7412 on a Radeon HD 2400 XT) claims via glGetString(GL_EXTENSIONS) to support WGL_EXT_swap_control. Brilliant, I think. So I declare the function prototypes manually and call glXGetProcAddress("wglSwapIntervalEXT"). Sadly, this returns NULL. So I try "glSwapIntervalEXT", which does return a function ptr, but causes a seg fault when I try and call it. So, am I doing something wrong here? Or are ATI just lying?
Kambiz
Kambiz
try glXSwapIntervalSGI . (requires GLX_SGI_swap_control)


[Edited by - Kambiz on November 18, 2008 6:44:36 AM]
subi211
subi211
No sign of GLX_SGI_swap_control, but the ptr to glXSwapIntervalSGI is there, and works. Looks like ATI stuck the wrong string in their GL_EXTENSIONS string!

Thanks!
Kambiz
Kambiz
Yes, WGL extensions are windows only, seems like they have put WGL_EXT_swap_control instead of GLX_SGI_swap_control into the extension string. With my nvidia card I get GLX_SGI_swap_control under linux and WGL_EXT_swap_control under windows.
subi211
subi211
Yeah, I thought it was a bit weird. I get GL_WIN_swap_hint under Linux as well, and I bet that's not real either. ;)

BTW, is there anything similar to WGL_EXT_extensions_string or WGL_ARB_extensions_string I should look out for as well?
V-man
V-man
Really? I thought you could not have a WGL extension on non-Windows.
File a bug report to them.

BTW, glXSwapIntervalSGI and wglSwapIntervalEXT look similar.

http://www.opengl.org/registry/

Topic Locked

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

Sign in to reply to this topic.