Changeset View
Changeset View
Standalone View
Standalone View
krita/ui/opengl/kis_opengl_canvas2_p.h
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Line(s) | 132 | bool tryDisableVSync(QOpenGLContext *ctx) { | |||
---|---|---|---|---|---|
134 | 134 | | |||
135 | if (ctx->hasExtension("WGL_EXT_swap_control")) { | 135 | if (ctx->hasExtension("WGL_EXT_swap_control")) { | ||
136 | typedef void (*wglSwapIntervalEXT)(int); | 136 | typedef void (*wglSwapIntervalEXT)(int); | ||
137 | typedef int (*wglGetSwapIntervalEXT)(void); | 137 | typedef int (*wglGetSwapIntervalEXT)(void); | ||
138 | ((wglSwapIntervalEXT)ctx->getProcAddress("wglSwapIntervalEXT"))(0); | 138 | ((wglSwapIntervalEXT)ctx->getProcAddress("wglSwapIntervalEXT"))(0); | ||
139 | int interval = ((wglGetSwapIntervalEXT)ctx->getProcAddress("wglGetSwapIntervalEXT"))(); | 139 | int interval = ((wglGetSwapIntervalEXT)ctx->getProcAddress("wglGetSwapIntervalEXT"))(); | ||
140 | 140 | | |||
141 | if (interval) { | 141 | if (interval) { | ||
142 | qWarning() << "Failed to disable VSync with WGLEW_EXT_swap_control"; | 142 | qWarning() << "Failed to disable VSync with WGL_EXT_swap_control"; | ||
143 | } | 143 | } | ||
144 | 144 | | |||
145 | retval = !interval; | 145 | retval = !interval; | ||
146 | } else { | 146 | } else { | ||
147 | qWarning() << "WGL_EXT_swap_control extension is not available. Found extensions" << ctx->extensions(); | 147 | qWarning() << "WGL_EXT_swap_control extension is not available. Found extensions" << ctx->extensions(); | ||
148 | } | 148 | } | ||
149 | return retval; | 149 | return retval; | ||
150 | } | 150 | } | ||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |