From 1f52695730c06a218b1793f295a2ddf790b2bc7f Mon Sep 17 00:00:00 2001 From: Christian Ohm Date: Wed, 14 Oct 2009 20:32:21 +0000 Subject: [PATCH] OpenGL 2.0 is needed to query GLSL version git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8296 4a71c877-e1ca-e34f-864e-861f7616d084 --- lib/ivis_opengl/screen.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/ivis_opengl/screen.c b/lib/ivis_opengl/screen.c index 7b9df82e2..598be0cac 100644 --- a/lib/ivis_opengl/screen.c +++ b/lib/ivis_opengl/screen.c @@ -170,8 +170,11 @@ BOOL screenInitialise( addDumpInfo(buf); ssprintf(buf, "OpenGL Version : %s", glGetString(GL_VERSION)); addDumpInfo(buf); - ssprintf(buf, "OpenGL GLSL Version : %s", glGetString(GL_SHADING_LANGUAGE_VERSION)); - addDumpInfo(buf); + if (GLEE_VERSION_2_0) + { + ssprintf(buf, "OpenGL GLSL Version : %s", glGetString(GL_SHADING_LANGUAGE_VERSION)); + addDumpInfo(buf); + } ssprintf(buf, "Video Mode %d x %d (%d bpp) (%s)", width, height, bpp, fullScreen ? "fullscreen" : "window"); addDumpInfo(buf); /* Dump information about OpenGL implementation to the console */ @@ -196,7 +199,10 @@ BOOL screenInitialise( debug(LOG_3D, " * FrameBuffer Object (FBO) %s supported.", GLEE_EXT_framebuffer_object ? "is" : "is NOT"); debug(LOG_3D, " * Shader Objects %s supported.", GL_ARB_shader_objects ? "is" : "is NOT"); debug(LOG_3D, " * Vertex Buffer Object (VBO) %s supported.", GL_ARB_vertex_buffer_object ? "is" : "is NOT"); - debug(LOG_3D, " * OpenGL GLSL Version : %s", glGetString(GL_SHADING_LANGUAGE_VERSION)); + if (GLEE_VERSION_2_0) + { + debug(LOG_3D, " * OpenGL GLSL Version : %s", glGetString(GL_SHADING_LANGUAGE_VERSION)); + } } #ifndef WZ_OS_MAC