From 94d57a2e43bcb6c1d3f8810e9221b43b45cca140 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Mon, 20 Jul 2015 16:51:01 -0700 Subject: [PATCH] fixing missing glew init --- interface/src/Application.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 24b20a830e..096859e723 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -763,6 +763,20 @@ void Application::initializeGL() { } #endif +#ifdef WIN32 + GLenum err = glewInit(); + if (GLEW_OK != err) { + /* Problem: glewInit failed, something is seriously wrong. */ + qCDebug(interfaceapp, "Error: %s\n", glewGetErrorString(err)); + } + qCDebug(interfaceapp, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION)); + + if (wglewGetExtension("WGL_EXT_swap_control")) { + int swapInterval = wglGetSwapIntervalEXT(); + qCDebug(interfaceapp, "V-Sync is %s\n", (swapInterval > 0 ? "ON" : "OFF")); + } +#endif + #if defined(Q_OS_LINUX) // TODO: Write the correct code for Linux... /* if (wglewGetExtension("WGL_EXT_swap_control")) {