X-Git-Url: http://git.tdb.fi/?p=libs%2Fgui.git;a=blobdiff_plain;f=source%2Fgraphics%2Fwgl%2Fglcontext.cpp;h=f31d84c2f1cef3d84a1bdceec71b3d26afcb7980;hp=6c378a6f195979a659b5a075bf3a5909b3008b12;hb=5dde3e3ca938df53f0fbd0ee5cc4576684e1dbaf;hpb=018da17591533b034d6bf018d2a9ac640007575e diff --git a/source/graphics/wgl/glcontext.cpp b/source/graphics/wgl/glcontext.cpp index 6c378a6..f31d84c 100644 --- a/source/graphics/wgl/glcontext.cpp +++ b/source/graphics/wgl/glcontext.cpp @@ -85,10 +85,10 @@ GLContext::~GLContext() void GLContext::set_swap_interval(unsigned i) { - PFNWGLSWAPINTERVALEXTPROC func = reinterpret_cast(wglGetProcAddress("wglSwapIntervalEXT")); - if(!func) + PFNWGLSWAPINTERVALEXTPROC wglSwapInterval = reinterpret_cast(wglGetProcAddress("wglSwapIntervalEXT")); + if(!wglSwapInterval) throw runtime_error("wglSwapIntervalEXT not found"); - func(i); + wglSwapInterval(i); } void GLContext::swap_buffers()