From bd55e67a3c1919b5637632c322865c2944a1c10f Mon Sep 17 00:00:00 2001 From: yabause Date: Thu, 1 Jan 2009 22:13:59 +0000 Subject: [PATCH] Reverting last change (sorry about this, but changes should really go in trunk first) --- src/OGLRender.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/OGLRender.cpp b/src/OGLRender.cpp index ff4ff5389..c982b8484 100644 --- a/src/OGLRender.cpp +++ b/src/OGLRender.cpp @@ -307,20 +307,17 @@ static GLuint texBlendLoc; static void createShaders() { - const char *extString; - hasShaders = true; - extString = (const char*)glGetString(GL_EXTENSIONS); - if ((strstr(extString, "GL_ARB_shading_language_100") == NULL) || - (strstr(extString, "GL_ARB_shader_objects") == NULL) || - (strstr(extString, "GL_ARB_vertex_shader") == NULL) || - (strstr(extString, "GL_ARB_fragment_shader") == NULL)) - { - INFO("Your system doesn't support OpenGL shaders. Using fixed pipeline.\n"); - hasShaders = false; - return; - } + if (glCreateShader == NULL || //use ==NULL instead of !func to avoid always true warnings for some systems + glShaderSource == NULL || + glCompileShader == NULL || + glCreateProgram == NULL || + glAttachShader == NULL || + glLinkProgram == NULL || + glUseProgram == NULL || + glGetShaderInfoLog == NULL) + NOSHADERS(1); vertexShaderID = glCreateShader(GL_VERTEX_SHADER); if(!vertexShaderID) @@ -429,7 +426,9 @@ static char OGLInit(void) #endif /* Create the shaders */ - createShaders(); + //as a hack for 0.9 release, we're disabling shaders. + hasShaders = false; + //createShaders(); /* Assign the texture units : 0 for main textures, 1 for toon table */ /* Also init the locations for some variables in the shaders */