@@ -161,10 +161,12 @@ namespace jsar::example
161161 }
162162 }
163163
164- glfwWindowHint (GLFW_CONTEXT_VERSION_MAJOR , 3 );
165- glfwWindowHint (GLFW_CONTEXT_VERSION_MINOR , 3 );
166- glfwWindowHint (GLFW_SAMPLES , samples);
164+ glfwWindowHint (GLFW_CONTEXT_VERSION_MAJOR , 4 );
165+ glfwWindowHint (GLFW_CONTEXT_VERSION_MINOR , 1 );
167166 glfwWindowHint (GLFW_OPENGL_PROFILE , GLFW_OPENGL_CORE_PROFILE );
167+ glfwWindowHint (GLFW_OPENGL_FORWARD_COMPAT , GL_TRUE );
168+ glfwWindowHint (GLFW_RESIZABLE , GLFW_FALSE );
169+ glfwWindowHint (GLFW_SAMPLES , samples);
168170
169171 if (width == -1 || height == -1 )
170172 {
@@ -229,7 +231,11 @@ namespace jsar::example
229231
230232 // Make the context available before starting the embedder
231233 glfwMakeContextCurrent (windowCtx_->window );
234+ glfwSwapInterval (1 );
232235 {
236+ auto version = glGetString (GL_VERSION );
237+ fprintf (stdout, " OpenGL version: %s\n " , version);
238+
233239 // Get environment variables for OpenGL context
234240 const char *str = getenv (" JSAR_DISABLE_MULTISAMPLE" );
235241 if (str != NULL && strcmp (str, " 1" ) == 0 )
0 commit comments