We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1125

Summary: Unable to create OpenGL Context
Product: SDL Reporter: Daniel <daniel350>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 CC: icculus
Version: 2.0.0Keywords: target-2.0.0
Hardware: x86   
OS: Windows 7   

Description Daniel 2011-02-15 23:44:42 UTC
I've been trying to create an OpenGL context on Windows 7 for the last few days now, I've managed to correctly create one using the WinAPI, so it is not an OpenGL issue. I'm using the latest SDL revision (as uploaded by you for the WINDOWPOS bug (#1123)) that works correctly on Ubuntu 10.10, but fails to work on Windows 7.

It creates the window correctly, but the OpenGL context is not there; despite all the error codes returning correctly.

Here is my creation code: http://www.pastie.org/1569636
Here is the main: http://www.pastie.org/1569637

If the OpenGL context had been created, the window should contain a blue background.
Using my own HWND instance code to create the OpenGL 3.2 context, this works. Using SDL 1.3, it displays a white background; and if I use any of the OpenGL commands such as glCreateShader, it, respectively, crashes.
Comment 1 Daniel 2011-02-15 23:46:12 UTC
std::cout << device.createDevice("My Application", width, height);

Returns 1, which means SDL_Init(SDL_INIT_VIDEO), SDL_CreateWindow(...), SDL_GL_CreateContext all returned correct (AFAIK).
Comment 2 Daniel 2011-02-15 23:54:40 UTC
The required header file: http://www.pastie.org/1569669
Comment 3 Daniel 2011-02-15 23:56:13 UTC
Similar to: http://bugzilla.libsdl.org/show_bug.cgi?id=1096

(You need an edit button for this tracker... probably spamming you with emails)
Comment 4 Sam Lantinga 2013-05-21 02:06:23 UTC
Is this still active in the latest snapshot?
http://www.libsdl.org/tmp/SDL-2.0.zip
Comment 5 Ryan C. Gordon 2013-07-12 22:15:53 UTC
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.)

Tagging a bunch of bugs as target-2.0.0, Priority 2.

This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible.

That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship.

Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment.

Thanks!
--ryan.
Comment 6 Ryan C. Gordon 2013-07-30 00:36:05 UTC
I'm resolving this bug, as it appears to be fixed. If you find it's still broken on the latest version of SDL, please feel free to reopen this bug.

--ryan.