Move GLES2 prototypes to their header

Some GLSL-related function prototypes are GLES2-only: GL implementations
are not required to provide them.

While Mesa is perfectly happy to return a dummy function pointer for
functions it doesn't support, other platforms are more picky, and will
return NULL.

In this particular case, this commit fixes GLSL support on OSX.

https://bugzilla.gnome.org/show_bug.cgi?id=668856

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Emmanuele Bassi 2012-01-27 16:34:11 +00:00
parent 5936bfb395
commit 417878538b
2 changed files with 11 additions and 11 deletions

View File

@ -258,11 +258,6 @@ COGL_EXT_FUNCTION (void, glGetAttachedShaders,
GLsizei maxcount, GLsizei maxcount,
GLsizei* count, GLsizei* count,
GLuint* shaders)) GLuint* shaders))
COGL_EXT_FUNCTION (void, glGetShaderPrecisionFormat,
(GLenum shadertype,
GLenum precisiontype,
GLint* range,
GLint* precision))
COGL_EXT_FUNCTION (void, glGetShaderSource, COGL_EXT_FUNCTION (void, glGetShaderSource,
(GLuint shader, (GLuint shader,
GLsizei bufsize, GLsizei bufsize,
@ -274,12 +269,6 @@ COGL_EXT_FUNCTION (GLboolean, glIsShader,
COGL_EXT_FUNCTION (GLboolean, glIsProgram, COGL_EXT_FUNCTION (GLboolean, glIsProgram,
(GLuint program)) (GLuint program))
COGL_EXT_FUNCTION (void, glShaderBinary,
(GLsizei n,
const GLuint* shaders,
GLenum binaryformat,
const GLvoid* binary,
GLsizei length))
COGL_EXT_FUNCTION (void, glValidateProgram, (GLuint program)) COGL_EXT_FUNCTION (void, glValidateProgram, (GLuint program))
COGL_EXT_END () COGL_EXT_END ()

View File

@ -151,6 +151,17 @@ COGL_EXT_BEGIN (gles2_only_api,
"\0", "\0",
"\0") "\0")
COGL_EXT_FUNCTION (void, glReleaseShaderCompiler, (void)) COGL_EXT_FUNCTION (void, glReleaseShaderCompiler, (void))
COGL_EXT_FUNCTION (void, glGetShaderPrecisionFormat,
(GLenum shadertype,
GLenum precisiontype,
GLint* range,
GLint* precision))
COGL_EXT_FUNCTION (void, glShaderBinary,
(GLsizei n,
const GLuint* shaders,
GLenum binaryformat,
const GLvoid* binary,
GLsizei length))
COGL_EXT_END () COGL_EXT_END ()
/* GL and GLES 2.0 apis */ /* GL and GLES 2.0 apis */