X-Git-Url: http://git.tdb.fi/?p=libs%2Fgui.git;a=blobdiff_plain;f=source%2Fgraphics%2Fglx%2Fglcontext.cpp;h=54541e969802216d19b51fe79ee40d05555c0471;hp=5f04e3b2fd51e21afbc1c03eac252623df16e1d7;hb=5dde3e3ca938df53f0fbd0ee5cc4576684e1dbaf;hpb=018da17591533b034d6bf018d2a9ac640007575e diff --git a/source/graphics/glx/glcontext.cpp b/source/graphics/glx/glcontext.cpp index 5f04e3b..54541e9 100644 --- a/source/graphics/glx/glcontext.cpp +++ b/source/graphics/glx/glcontext.cpp @@ -211,10 +211,10 @@ GLContext::~GLContext() void GLContext::set_swap_interval(unsigned i) { const GLubyte *name = reinterpret_cast("glXSwapIntervalEXT"); - PFNGLXSWAPINTERVALEXTPROC func = reinterpret_cast(glXGetProcAddress(name)); - if(!func) + PFNGLXSWAPINTERVALEXTPROC glXSwapInterval = reinterpret_cast(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()