Add debug message when context creation fails

This commit is contained in:
Stefanos A. 2013-09-27 18:55:58 +02:00
parent 3398902940
commit 5df5447ff9

View file

@ -23,6 +23,10 @@ namespace OpenTK.Platform.SDL2
{
SetGLAttributes(mode, shareContext, major, minor, flags);
SdlContext = new ContextHandle(SDL.SDL_GL_CreateContext(window.Handle));
if (SdlContext == ContextHandle.Zero)
{
Debug.Print("SDL2 failed to create OpenGL context: {0}", SDL.SDL_GetError());
}
Handle = GraphicsContext.GetCurrentContext();
}