fixed hand tracking world position, and picking up objects in VR
[laserbrain_demo] / src / main.cc
index c497dc1..4fae92d 100644 (file)
@@ -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;
        }