]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/wgl/glcontext.cpp
Use the name of the function for the SwapInterval function pointers
[libs/gui.git] / source / graphics / wgl / glcontext.cpp
index 6c378a6f195979a659b5a075bf3a5909b3008b12..f31d84c2f1cef3d84a1bdceec71b3d26afcb7980 100644 (file)
@@ -85,10 +85,10 @@ GLContext::~GLContext()
 
 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()