From cfc8f3dbbf7ed1938d2fb70a0d6c7d4718a89e93 Mon Sep 17 00:00:00 2001 From: Ralgor Date: Sun, 14 Sep 2014 14:42:14 -0500 Subject: [PATCH] Global GL render context shouldn't be initialized inside of gl_PrintStartupLog, since it's not compiled in non MSC builds. --- src/gl/system/gl_framebuffer.cpp | 9 +++++++++ src/gl/system/gl_interface.cpp | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gl/system/gl_framebuffer.cpp b/src/gl/system/gl_framebuffer.cpp index 54df9b851..2ddbf3439 100644 --- a/src/gl/system/gl_framebuffer.cpp +++ b/src/gl/system/gl_framebuffer.cpp @@ -126,6 +126,15 @@ void OpenGLFrameBuffer::InitializeState() gl_LoadExtensions(); Super::InitializeState(); + + int v; + glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &v); + gl.maxuniforms = v; + glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &v); + gl.maxuniformblock = v; + glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, &v); + gl.uniformblockalignment = v; + if (first) { first=false; diff --git a/src/gl/system/gl_interface.cpp b/src/gl/system/gl_interface.cpp index 95ab2e289..af03bf1d1 100644 --- a/src/gl/system/gl_interface.cpp +++ b/src/gl/system/gl_interface.cpp @@ -168,15 +168,12 @@ void gl_PrintStartupLog() Printf ("Max. texture units: %d\n", v); glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &v); Printf ("Max. fragment uniforms: %d\n", v); - gl.maxuniforms = v; glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, &v); Printf ("Max. vertex uniforms: %d\n", v); glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &v); Printf ("Max. uniform block size: %d\n", v); - gl.maxuniformblock = v; glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, &v); Printf ("Uniform block alignment: %d\n", v); - gl.uniformblockalignment = v; glGetIntegerv(GL_MAX_VARYING_FLOATS, &v); Printf ("Max. varying: %d\n", v);