X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fmain.cc;h=4fae92d39173be655e1373aa3fc1fd85724424da;hp=c497dc1dff3d2249a67443a49c39c04266eef68c;hb=c48096383ed398a518e69070bfc9373537ab00bb;hpb=512acaa2427ffa2ff19079f999bc2fcd7cd33925 diff --git a/src/main.cc b/src/main.cc index c497dc1..4fae92d 100644 --- a/src/main.cc +++ b/src/main.cc @@ -32,6 +32,9 @@ int main(int argc, char **argv) SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 8); SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1); +#ifndef NDEBUG + SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG); +#endif int defpos = SDL_WINDOWPOS_UNDEFINED; unsigned int sdlflags = SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI; @@ -76,6 +79,8 @@ int main(int argc, char **argv) } app_reshape(win_width, win_height); + SDL_RaiseWindow(win); + while(!quit) { SDL_Event ev; @@ -154,8 +159,6 @@ bool app_is_mouse_grabbed() static bool init(int argc, char **argv) { - glewInit(); - if(!app_init(argc, argv)) { return false; }