[2.1] "wglMakeCurrent failed" on Windows when creating a renderwindow.

Problems building or running the engine, queries about how to use features etc.
Post Reply
Posts: 65
Joined: Wed Aug 08, 2018 9:03 am
x 9

[2.1] "wglMakeCurrent failed" on Windows when creating a renderwindow.

Post by gabbsson » Mon May 06, 2019 10:23 am

Ogre Version: 2.1
Operating System: Windows
Render System: OpenGL

A co-worker ran into this error when attempting to run my project on windows, additional difference is that it has an Nvida quadro card whereas I have been running on integrated intel graphics.
Since I have been developing and testing on linux I have never encountered this error before and I'm curious if someone knows whats causing it / how to fix it.

The error is:

Code: Select all

 OGRE EXCEPTION(3:RenderingAPIException): wglMakeCurrent failed: The pixel format is invalid.
 in Win32Window::create at C:\cygwin\home-EEE\IntegrationRepPC\lib\Ogre\Ogre-2.1\RenderSystems\GL3Plus\src\windowing\win32\OgreWin32Window.cpp (line 514)

The project starts by creating a dummy window which does nothing. Later one or more renderwindows are created which are placed in Qt widgets.
I mention this since I have had to mess around with contexts.
The initial dummy window uses currentGLContext = false, then all following windows use currentGLContext = true.

Full ogre log here:
(34.73 KiB) Downloaded 11 times
0 x

Post Reply