void GLContext::set_swap_interval(unsigned i)
{
const GLubyte *name = reinterpret_cast<const GLubyte *>("glXSwapIntervalEXT");
- PFNGLXSWAPINTERVALEXTPROC func = reinterpret_cast<PFNGLXSWAPINTERVALEXTPROC>(glXGetProcAddress(name));
- if(!func)
+ PFNGLXSWAPINTERVALEXTPROC glXSwapInterval = reinterpret_cast<PFNGLXSWAPINTERVALEXTPROC>(glXGetProcAddress(name));
+ if(!glXSwapInterval)
throw runtime_error("glXSwapIntervalEXT not found");
- func(display.get_private().display, (priv->glxwnd ? priv->glxwnd : priv->subwnd), i);
+ glXSwapInterval(display.get_private().display, (priv->glxwnd ? priv->glxwnd : priv->subwnd), i);
}
void GLContext::swap_buffers()
void GLContext::set_swap_interval(unsigned i)
{
- PFNWGLSWAPINTERVALEXTPROC func = reinterpret_cast<PFNWGLSWAPINTERVALEXTPROC>(wglGetProcAddress("wglSwapIntervalEXT"));
- if(!func)
+ PFNWGLSWAPINTERVALEXTPROC wglSwapInterval = reinterpret_cast<PFNWGLSWAPINTERVALEXTPROC>(wglGetProcAddress("wglSwapIntervalEXT"));
+ if(!wglSwapInterval)
throw runtime_error("wglSwapIntervalEXT not found");
- func(i);
+ wglSwapInterval(i);
}
void GLContext::swap_buffers()