improve context creation, add gfx.gldebug

This commit is contained in:
milek7
2021-01-22 00:24:09 +01:00
parent d901177489
commit 8ec29babf9
4 changed files with 18 additions and 6 deletions

View File

@@ -772,8 +772,12 @@ eu07_application::init_glfw() {
Global.bUseVBO = true;
// activate core profile for opengl 3.3 renderer
if( !Global.gfx_usegles ) {
#ifndef EU07_USEIMGUIIMPLOPENGL2
glfwWindowHint( GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE );
glfwWindowHint( GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE );
glfwWindowHint( GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE );
#else
glfwWindowHint( GLFW_OPENGL_PROFILE, GLFW_OPENGL_COMPAT_PROFILE );
#endif
glfwWindowHint( GLFW_CONTEXT_VERSION_MAJOR, 3 );
glfwWindowHint( GLFW_CONTEXT_VERSION_MINOR, 3 );
}
@@ -797,6 +801,9 @@ eu07_application::init_glfw() {
#endif
}
if (Global.gfx_gldebug)
glfwWindowHint( GLFW_OPENGL_DEBUG_CONTEXT, GLFW_TRUE );
glfwWindowHint(GLFW_SRGB_CAPABLE, !Global.gfx_shadergamma);
if( Global.fullscreen_windowed ) {