mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-25 18:30:21 +00:00
Allows for failure to get a GL context as a reportable issue.
This commit is contained in:
parent
080f949f89
commit
e43de5f1ba
@ -455,13 +455,13 @@ int main(int argc, char *argv[]) {
|
|||||||
400, 300,
|
400, 300,
|
||||||
SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
|
SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
|
||||||
|
|
||||||
if(!window)
|
SDL_GLContext gl_context = SDL_GL_CreateContext(window);
|
||||||
|
if(!window || !gl_context)
|
||||||
{
|
{
|
||||||
std::cerr << "Could not create window" << std::endl;
|
std::cerr << "Could not create window; error: " << SDL_GetError() << std::endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_GLContext gl_context = SDL_GL_CreateContext(window);
|
|
||||||
SDL_GL_MakeCurrent(window, gl_context);
|
SDL_GL_MakeCurrent(window, gl_context);
|
||||||
|
|
||||||
GLint target_framebuffer = 0;
|
GLint target_framebuffer = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user