Startup Crash when using GL3+ on Windows

Description

Here's the post on the forum topic: http://ogre3d.org/forums/viewtopic.php?f=4&t=65010&p=483713#p483713

"I had a look and figured out (with the help of wise GDB) that the crash with the GL3+ system (at least on my machine (Win 7 64 bit, NVidia GTX 580) and built with MinGW GCC 4.7.2), is due to this line (OgreWin32GLSupport.cpp:664):

PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormat = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress("wglChoosePixelFormatARB");

It doesn't crash there, but wglGetProcAddress returns NULL and then it crashes in the next line when trying to execute wglChoosePixelFormat.

According to this ( http://www.gamedev.net/topic/502012-wglchoosepixelformatarb-not-working/ ), this is due to the context not being valid.

Hope that helps someone more experienced in "raw" OpenGL to fix this problem, but my guess is that the selectPixelFormat is called too early (no context yet) for some reason, or the context became invalid for some other reason."

Environment

Windows 7 64 bit, NVIDIA GTX 580, MinGW GCC 4.7.2

Assignee

Murat Sari

Reporter

Jan Drabner

Labels

None

Components

Fix versions

Affects versions

Priority

Critical
Configure