Move wgl extension into platform specific init code.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2563 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
9e087c6d05
commit
5f262b4563
|
@ -351,9 +351,14 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params)
|
|||
|
||||
genericDriverInit(params.WindowSize, params.Stencilbuffer);
|
||||
|
||||
#ifdef WGL_EXT_swap_control
|
||||
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
|
||||
// vsync extension
|
||||
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
|
||||
// set vsync
|
||||
if (wglSwapIntervalEXT)
|
||||
wglSwapIntervalEXT(params.Vsync ? 1 : 0);
|
||||
#endif
|
||||
|
||||
// set exposed data
|
||||
ExposedData.OpenGLWin32.HDc = HDc;
|
||||
|
|
|
@ -35,9 +35,7 @@ COpenGLExtensionHandler::COpenGLExtensionHandler() :
|
|||
pGlStencilFuncSeparate(0), pGlStencilOpSeparate(0),
|
||||
pGlStencilFuncSeparateATI(0), pGlStencilOpSeparateATI(0),
|
||||
pGlCompressedTexImage2D(0),
|
||||
#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
|
||||
wglSwapIntervalEXT(0),
|
||||
#elif defined(GLX_SGI_swap_control)
|
||||
#if defined(GLX_SGI_swap_control)
|
||||
glxSwapIntervalSGI(0),
|
||||
#endif
|
||||
pGlBindFramebufferEXT(0), pGlDeleteFramebuffersEXT(0), pGlGenFramebuffersEXT(0),
|
||||
|
@ -183,9 +181,6 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
|
|||
pGlGetBufferPointervARB= (PFNGLGETBUFFERPOINTERVARBPROC) wglGetProcAddress("glGetBufferPointervARB");
|
||||
|
||||
|
||||
// vsync extension
|
||||
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALFARPROC) wglGetProcAddress("wglSwapIntervalEXT");
|
||||
|
||||
#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_) || defined (_IRR_COMPILE_WITH_SDL_DEVICE_)
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
|
||||
|
|
|
@ -916,10 +916,7 @@ class COpenGLExtensionHandler
|
|||
PFNGLSTENCILFUNCSEPARATEATIPROC pGlStencilFuncSeparateATI;
|
||||
PFNGLSTENCILOPSEPARATEATIPROC pGlStencilOpSeparateATI;
|
||||
PFNGLCOMPRESSEDTEXIMAGE2DPROC pGlCompressedTexImage2D;
|
||||
#ifdef _IRR_WINDOWS_API_
|
||||
typedef BOOL (APIENTRY *PFNWGLSWAPINTERVALFARPROC)(int);
|
||||
PFNWGLSWAPINTERVALFARPROC wglSwapIntervalEXT;
|
||||
#elif defined(_IRR_LINUX_PLATFORM_) && defined(GLX_SGI_swap_control)
|
||||
#if defined(_IRR_LINUX_PLATFORM_) && defined(GLX_SGI_swap_control)
|
||||
PFNGLXSWAPINTERVALSGIPROC glxSwapIntervalSGI;
|
||||
#endif
|
||||
PFNGLBINDFRAMEBUFFEREXTPROC pGlBindFramebufferEXT;
|
||||
|
|
Loading…
Reference in New Issue