void (GLAPIENTRY *qglEnableVertexAttribArray)(GLuint index);
void (GLAPIENTRY *qglDisableVertexAttribArray)(GLuint index);
void (GLAPIENTRY *qglBindAttribLocation)(GLuint programObj, GLuint index, const GLchar *name);
+void (GLAPIENTRY *qglBindFragDataLocation)(GLuint programObj, GLuint index, const GLchar *name);
void (GLAPIENTRY *qglGetActiveAttrib)(GLuint programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
GLint (GLAPIENTRY *qglGetAttribLocation)(GLuint programObj, const GLchar *name);
void (GLAPIENTRY *qglGetVertexAttribdv)(GLuint index, GLenum pname, GLdouble *params);
{NULL, NULL}
};
+static dllfunction_t glsl130funcs[] =
+{
+ {"glBindFragDataLocation", (void **) &qglBindFragDataLocation},
+ {NULL, NULL}
+};
+
static dllfunction_t vbofuncs[] =
{
{"glBindBufferARB" , (void **) &qglBindBufferARB},
Con_DPrint("Checking OpenGL extensions...\n");
+ // this one is purely optional, needed for GLSL 1.3 support (#version 130), so we don't even check the return value of GL_CheckExtension
+ vid.support.gl20shaders130 = GL_CheckExtension("2.0", glsl130funcs, "-noglsl130", false);
+ if(vid.support.gl20shaders130)
+ {
+ char *s = (char *) qglGetString(GL_SHADING_LANGUAGE_VERSION);
+ if(!s || atof(s) < 1.30 - 0.00001)
+ vid.support.gl20shaders130 = 0;
+ }
+ if(vid.support.gl20shaders130)
+ Con_DPrintf("Using GLSL 1.30\n");
+ else
+ Con_DPrintf("Using GLSL 1.00\n");
+
vid.support.amd_texture_texture4 = GL_CheckExtension("GL_AMD_texture_texture4", NULL, "-notexture4", false);
vid.support.arb_depth_texture = GL_CheckExtension("GL_ARB_depth_texture", NULL, "-nodepthtexture", false);
vid.support.arb_draw_buffers = GL_CheckExtension("GL_ARB_draw_buffers", drawbuffersfuncs, "-nodrawbuffers", false);