cogl: Remove unused GL imports from the CoglContext vtable

Notably this deletes cogl-fixed-functions.h since we are no longer using
any of the GL1-style fixed-function pipeline API.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/995
This commit is contained in:
Adam Jackson 2019-10-21 13:55:46 -04:00 committed by Georges Basile Stavracas Neto
parent 282eab45f7
commit 347619a85f
7 changed files with 0 additions and 317 deletions

View File

@ -68,9 +68,6 @@
* to GL but they may be extensions available for GL */ * to GL but they may be extensions available for GL */
#include "cogl-in-gles-core-functions.h" #include "cogl-in-gles-core-functions.h"
/* These are fixed-function APIs core to GL and GLES1 */
#include "cogl-fixed-functions.h"
/* These are GLSL shader APIs core to GL 2.0 and GLES2 */ /* These are GLSL shader APIs core to GL 2.0 and GLES2 */
#include "cogl-glsl-functions.h" #include "cogl-glsl-functions.h"
@ -88,8 +85,6 @@ COGL_EXT_FUNCTION (void, glGetTexImage,
(GLenum target, GLint level, (GLenum target, GLint level,
GLenum format, GLenum type, GLenum format, GLenum type,
GLvoid *pixels)) GLvoid *pixels))
COGL_EXT_FUNCTION (void, glClipPlane,
(GLenum plane, const double *equation))
COGL_EXT_FUNCTION (void, glDepthRange, COGL_EXT_FUNCTION (void, glDepthRange,
(double near_val, double far_val)) (double near_val, double far_val))
COGL_EXT_FUNCTION (void, glDrawBuffer, COGL_EXT_FUNCTION (void, glDrawBuffer,
@ -135,9 +130,6 @@ COGL_EXT_BEGIN (EGL_image, 255, 255,
COGL_EXT_FUNCTION (void, glEGLImageTargetTexture2D, COGL_EXT_FUNCTION (void, glEGLImageTargetTexture2D,
(GLenum target, (GLenum target,
GLeglImageOES image)) GLeglImageOES image))
COGL_EXT_FUNCTION (void, glEGLImageTargetRenderbufferStorage,
(GLenum target,
GLeglImageOES image))
COGL_EXT_END () COGL_EXT_END ()
COGL_EXT_BEGIN (framebuffer_discard, 255, 255, COGL_EXT_BEGIN (framebuffer_discard, 255, 255,
@ -188,41 +180,6 @@ COGL_EXT_FUNCTION (void, glSamplerParameteri,
GLint param)) GLint param))
COGL_EXT_END () COGL_EXT_END ()
/* These only list functions that come from the old GLSL extensions.
* Functions that are common to the extensions and GLSL 2.0 should
* instead be listed in cogl-glsl-functions.h */
COGL_EXT_BEGIN (shader_objects, 255, 255,
0, /* not in either GLES */
"ARB\0",
"shader_objects\0")
COGL_EXT_FUNCTION (GLuint, glCreateProgramObject,
(void))
COGL_EXT_FUNCTION (GLuint, glCreateShaderObject,
(GLenum shaderType))
COGL_EXT_FUNCTION (void, glDeleteObject,
(GLuint obj))
COGL_EXT_FUNCTION (void, glAttachObject,
(GLuint container, GLuint obj))
COGL_EXT_FUNCTION (void, glUseProgramObject,
(GLuint programObj))
COGL_EXT_FUNCTION (void, glGetInfoLog,
(GLuint obj,
GLsizei maxLength,
GLsizei *length,
char *infoLog))
COGL_EXT_FUNCTION (void, glGetObjectParameteriv,
(GLuint obj,
GLenum pname,
GLint *params))
COGL_EXT_FUNCTION (void, glDetachObject,
(GLuint container, GLuint obj))
COGL_EXT_FUNCTION (void, glGetAttachedObjects,
(GLuint program,
GLsizei maxcount,
GLsizei* count,
GLuint* shaders))
COGL_EXT_END ()
COGL_EXT_BEGIN (only_gl3, 3, 0, COGL_EXT_BEGIN (only_gl3, 3, 0,
0, /* not in either GLES */ 0, /* not in either GLES */
"\0", "\0",
@ -237,9 +194,6 @@ COGL_EXT_BEGIN (vertex_array_object, 3, 0,
"vertex_array_object\0") "vertex_array_object\0")
COGL_EXT_FUNCTION (void, glBindVertexArray, COGL_EXT_FUNCTION (void, glBindVertexArray,
(GLuint array)) (GLuint array))
COGL_EXT_FUNCTION (void, glDeleteVertexArrays,
(GLsizei n,
const GLuint *arrays))
COGL_EXT_FUNCTION (void, glGenVertexArrays, COGL_EXT_FUNCTION (void, glGenVertexArrays,
(GLsizei n, (GLsizei n,
GLuint *arrays)) GLuint *arrays))

View File

@ -136,22 +136,12 @@ COGL_EXT_FUNCTION (void, glGenBuffers,
GLuint *buffers)) GLuint *buffers))
COGL_EXT_FUNCTION (void, glGenTextures, COGL_EXT_FUNCTION (void, glGenTextures,
(GLsizei n, GLuint* textures)) (GLsizei n, GLuint* textures))
COGL_EXT_FUNCTION (void, glGetBufferParameteriv,
(GLenum target, GLenum pname, GLint* params))
COGL_EXT_FUNCTION (GLenum, glGetError, COGL_EXT_FUNCTION (GLenum, glGetError,
(void)) (void))
COGL_EXT_FUNCTION (void, glGetIntegerv, COGL_EXT_FUNCTION (void, glGetIntegerv,
(GLenum pname, GLint* params)) (GLenum pname, GLint* params))
COGL_EXT_FUNCTION (void, glGetBooleanv,
(GLenum pname, GLboolean* params))
COGL_EXT_FUNCTION (void, glGetFloatv,
(GLenum pname, GLfloat* params))
COGL_EXT_FUNCTION (const GLubyte*, glGetString, COGL_EXT_FUNCTION (const GLubyte*, glGetString,
(GLenum name)) (GLenum name))
COGL_EXT_FUNCTION (void, glHint,
(GLenum target, GLenum mode))
COGL_EXT_FUNCTION (GLboolean, glIsBuffer,
(GLuint buffer))
COGL_EXT_FUNCTION (GLboolean, glIsTexture, COGL_EXT_FUNCTION (GLboolean, glIsTexture,
(GLuint texture)) (GLuint texture))
COGL_EXT_FUNCTION (void, glPixelStorei, COGL_EXT_FUNCTION (void, glPixelStorei,
@ -182,18 +172,10 @@ COGL_EXT_FUNCTION (void, glTexImage2D,
GLenum format, GLenum format,
GLenum type, GLenum type,
const GLvoid* pixels)) const GLvoid* pixels))
COGL_EXT_FUNCTION (void, glTexParameterf,
(GLenum target, GLenum pname, GLfloat param))
COGL_EXT_FUNCTION (void, glTexParameterfv,
(GLenum target, GLenum pname, const GLfloat* params))
COGL_EXT_FUNCTION (void, glTexParameteri, COGL_EXT_FUNCTION (void, glTexParameteri,
(GLenum target, GLenum pname, GLint param)) (GLenum target, GLenum pname, GLint param))
COGL_EXT_FUNCTION (void, glTexParameteriv, COGL_EXT_FUNCTION (void, glTexParameteriv,
(GLenum target, GLenum pname, const GLint* params)) (GLenum target, GLenum pname, const GLint* params))
COGL_EXT_FUNCTION (void, glGetTexParameterfv,
(GLenum target, GLenum pname, GLfloat* params))
COGL_EXT_FUNCTION (void, glGetTexParameteriv,
(GLenum target, GLenum pname, GLint* params))
COGL_EXT_FUNCTION (void, glTexSubImage2D, COGL_EXT_FUNCTION (void, glTexSubImage2D,
(GLenum target, (GLenum target,
GLint level, GLint level,
@ -204,18 +186,6 @@ COGL_EXT_FUNCTION (void, glTexSubImage2D,
GLenum format, GLenum format,
GLenum type, GLenum type,
const GLvoid* pixels)) const GLvoid* pixels))
COGL_EXT_FUNCTION (void, glCopyTexImage2D,
(GLenum target,
GLint level,
GLenum internalformat,
GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLint border))
COGL_EXT_FUNCTION (void, glViewport, COGL_EXT_FUNCTION (void, glViewport,
(GLint x, GLint y, GLsizei width, GLsizei height)) (GLint x, GLint y, GLsizei width, GLsizei height))
COGL_EXT_FUNCTION (GLboolean, glIsEnabled, (GLenum cap))
COGL_EXT_FUNCTION (void, glLineWidth, (GLfloat width))
COGL_EXT_FUNCTION (void, glPolygonOffset, (GLfloat factor, GLfloat units))
COGL_EXT_END () COGL_EXT_END ()

View File

@ -1,115 +0,0 @@
/*
* Cogl
*
* A Low Level GPU Graphics and Utilities API
*
* Copyright (C) 2009, 2011 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*
*/
/* This is included multiple times with different definitions for
* these macros. The macros are given the following arguments:
*
* COGL_EXT_BEGIN:
*
* @name: a unique symbol name for this feature
*
* @min_gl_major: the major part of the minimum GL version where these
* functions are available in core, or 255 if it isn't available in
* any version.
* @min_gl_minor: the minor part of the minimum GL version where these
* functions are available in core, or 255 if it isn't available in
* any version.
*
* @gles_availability: flags to specify which versions of GLES the
* functions are available in. Should be a combination of
* COGL_EXT_IN_GLES and COGL_EXT_IN_GLES2.
*
* @extension_suffixes: A zero-separated list of suffixes in a
* string. These are appended to the extension name to get a complete
* extension name to try. The suffix is also appended to all of the
* function names. The suffix can optionally include a ':' to specify
* an alternate suffix for the function names.
*
* @extension_names: A list of extension names to try. If any of these
* extensions match then it will be used.
*/
/* These are the core GL functions which are available when the API
supports fixed-function (ie, GL and GLES1.1) */
COGL_EXT_BEGIN (fixed_function_core,
0, 0,
0,
"\0",
"\0")
COGL_EXT_FUNCTION (void, glAlphaFunc,
(GLenum func, GLclampf ref))
COGL_EXT_FUNCTION (void, glLoadMatrixf,
(const GLfloat *m))
COGL_EXT_FUNCTION (void, glMaterialfv,
(GLenum face, GLenum pname, const GLfloat *params))
COGL_EXT_FUNCTION (void, glPointSize,
(GLfloat size))
COGL_EXT_FUNCTION (void, glTexEnvfv,
(GLenum target, GLenum pname, const GLfloat *params))
COGL_EXT_FUNCTION (void, glColor4ub,
(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha))
COGL_EXT_FUNCTION (void, glColor4f,
(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha))
COGL_EXT_FUNCTION (void, glColorPointer,
(GLint size,
GLenum type,
GLsizei stride,
const GLvoid *pointer))
COGL_EXT_FUNCTION (void, glDisableClientState,
(GLenum array))
COGL_EXT_FUNCTION (void, glEnableClientState,
(GLenum array))
COGL_EXT_FUNCTION (void, glLoadIdentity,
(void))
COGL_EXT_FUNCTION (void, glMatrixMode,
(GLenum mode))
COGL_EXT_FUNCTION (void, glNormal3f,
(GLfloat x, GLfloat y, GLfloat z))
COGL_EXT_FUNCTION (void, glNormalPointer,
(GLenum type, GLsizei stride, const GLvoid *pointer))
COGL_EXT_FUNCTION (void, glMultiTexCoord4f,
(GLfloat s, GLfloat t, GLfloat r, GLfloat q))
COGL_EXT_FUNCTION (void, glTexCoordPointer,
(GLint size,
GLenum type,
GLsizei stride,
const GLvoid *pointer))
COGL_EXT_FUNCTION (void, glTexEnvi,
(GLenum target,
GLenum pname,
GLint param))
COGL_EXT_FUNCTION (void, glVertex4f,
(GLfloat x, GLfloat y, GLfloat z, GLfloat w))
COGL_EXT_FUNCTION (void, glVertexPointer,
(GLint size,
GLenum type,
GLsizei stride,
const GLvoid *pointer))
COGL_EXT_END ()

View File

@ -93,17 +93,6 @@ COGL_EXT_FUNCTION (void, glGetProgramiv,
(GLuint program, (GLuint program,
GLenum pname, GLenum pname,
GLint *params)) GLint *params))
COGL_EXT_FUNCTION (void, glDetachShader,
(GLuint program, GLuint shader))
COGL_EXT_FUNCTION (void, glGetAttachedShaders,
(GLuint program,
GLsizei maxcount,
GLsizei* count,
GLuint* shaders))
COGL_EXT_FUNCTION (GLboolean, glIsShader,
(GLuint shader))
COGL_EXT_FUNCTION (GLboolean, glIsProgram,
(GLuint program))
COGL_EXT_END () COGL_EXT_END ()
/* These functions are provided by GL_ARB_shader_objects or are in GL /* These functions are provided by GL_ARB_shader_objects or are in GL
@ -127,21 +116,6 @@ COGL_EXT_FUNCTION (GLint, glGetUniformLocation,
COGL_EXT_FUNCTION (void, glUniform1f, COGL_EXT_FUNCTION (void, glUniform1f,
(GLint location, (GLint location,
GLfloat v0)) GLfloat v0))
COGL_EXT_FUNCTION (void, glUniform2f,
(GLint location,
GLfloat v0,
GLfloat v1))
COGL_EXT_FUNCTION (void, glUniform3f,
(GLint location,
GLfloat v0,
GLfloat v1,
GLfloat v2))
COGL_EXT_FUNCTION (void, glUniform4f,
(GLint location,
GLfloat v0,
GLfloat v1,
GLfloat v2,
GLfloat v3))
COGL_EXT_FUNCTION (void, glUniform1fv, COGL_EXT_FUNCTION (void, glUniform1fv,
(GLint location, (GLint location,
GLsizei count, GLsizei count,
@ -161,21 +135,6 @@ COGL_EXT_FUNCTION (void, glUniform4fv,
COGL_EXT_FUNCTION (void, glUniform1i, COGL_EXT_FUNCTION (void, glUniform1i,
(GLint location, (GLint location,
GLint v0)) GLint v0))
COGL_EXT_FUNCTION (void, glUniform2i,
(GLint location,
GLint v0,
GLint v1))
COGL_EXT_FUNCTION (void, glUniform3i,
(GLint location,
GLint v0,
GLint v1,
GLint v2))
COGL_EXT_FUNCTION (void, glUniform4i,
(GLint location,
GLint v0,
GLint v1,
GLint v2,
GLint v3))
COGL_EXT_FUNCTION (void, glUniform1iv, COGL_EXT_FUNCTION (void, glUniform1iv,
(GLint location, (GLint location,
GLsizei count, GLsizei count,
@ -207,29 +166,6 @@ COGL_EXT_FUNCTION (void, glUniformMatrix4fv,
GLsizei count, GLsizei count,
GLboolean transpose, GLboolean transpose,
const GLfloat *value)) const GLfloat *value))
COGL_EXT_FUNCTION (void, glGetUniformfv,
(GLuint program,
GLint location,
GLfloat *params))
COGL_EXT_FUNCTION (void, glGetUniformiv,
(GLuint program,
GLint location,
GLint *params))
COGL_EXT_FUNCTION (void, glGetActiveUniform,
(GLuint program,
GLuint index,
GLsizei bufsize,
GLsizei* length,
GLint* size,
GLenum* type,
GLchar* name))
COGL_EXT_FUNCTION (void, glGetShaderSource,
(GLuint shader,
GLsizei bufsize,
GLsizei* length,
GLchar* source))
COGL_EXT_FUNCTION (void, glValidateProgram, (GLuint program))
COGL_EXT_END () COGL_EXT_END ()
/* These functions are provided by GL_ARB_vertex_shader or are in GL /* These functions are provided by GL_ARB_vertex_shader or are in GL
@ -249,38 +185,20 @@ COGL_EXT_FUNCTION (void, glEnableVertexAttribArray,
(GLuint index)) (GLuint index))
COGL_EXT_FUNCTION (void, glDisableVertexAttribArray, COGL_EXT_FUNCTION (void, glDisableVertexAttribArray,
(GLuint index)) (GLuint index))
COGL_EXT_FUNCTION (void, glVertexAttrib1f, (GLuint indx, GLfloat x))
COGL_EXT_FUNCTION (void, glVertexAttrib1fv, COGL_EXT_FUNCTION (void, glVertexAttrib1fv,
(GLuint indx, const GLfloat* values)) (GLuint indx, const GLfloat* values))
COGL_EXT_FUNCTION (void, glVertexAttrib2f, (GLuint indx, GLfloat x, GLfloat y))
COGL_EXT_FUNCTION (void, glVertexAttrib2fv, COGL_EXT_FUNCTION (void, glVertexAttrib2fv,
(GLuint indx, const GLfloat* values)) (GLuint indx, const GLfloat* values))
COGL_EXT_FUNCTION (void, glVertexAttrib3f,
(GLuint indx, GLfloat x, GLfloat y, GLfloat z))
COGL_EXT_FUNCTION (void, glVertexAttrib3fv, COGL_EXT_FUNCTION (void, glVertexAttrib3fv,
(GLuint indx, const GLfloat* values)) (GLuint indx, const GLfloat* values))
COGL_EXT_FUNCTION (void, glVertexAttrib4f, COGL_EXT_FUNCTION (void, glVertexAttrib4f,
(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w))
COGL_EXT_FUNCTION (void, glVertexAttrib4fv, COGL_EXT_FUNCTION (void, glVertexAttrib4fv,
(GLuint indx, const GLfloat* values)) (GLuint indx, const GLfloat* values))
COGL_EXT_FUNCTION (void, glGetVertexAttribfv,
(GLuint index, GLenum pname, GLfloat* params))
COGL_EXT_FUNCTION (void, glGetVertexAttribiv,
(GLuint index, GLenum pname, GLint* params))
COGL_EXT_FUNCTION (void, glGetVertexAttribPointerv,
(GLuint index, GLenum pname, GLvoid** pointer))
COGL_EXT_FUNCTION (GLint, glGetAttribLocation, COGL_EXT_FUNCTION (GLint, glGetAttribLocation,
(GLuint program, const char *name)) (GLuint program, const char *name))
COGL_EXT_FUNCTION (void, glBindAttribLocation, COGL_EXT_FUNCTION (void, glBindAttribLocation,
(GLuint program, (GLuint program,
GLuint index, GLuint index,
const GLchar* name)) const GLchar* name))
COGL_EXT_FUNCTION (void, glGetActiveAttrib,
(GLuint program,
GLuint index,
GLsizei bufsize,
GLsizei* length,
GLint* size,
GLenum* type,
GLchar* name))
COGL_EXT_END () COGL_EXT_END ()

View File

@ -63,6 +63,4 @@ COGL_EXT_BEGIN (only_in_both_gles,
"ES2_compatibility\0") "ES2_compatibility\0")
COGL_EXT_FUNCTION (void, glDepthRangef, COGL_EXT_FUNCTION (void, glDepthRangef,
(GLfloat near_val, GLfloat far_val)) (GLfloat near_val, GLfloat far_val))
COGL_EXT_FUNCTION (void, glClearDepthf,
(GLclampf depth))
COGL_EXT_END () COGL_EXT_END ()

View File

@ -95,8 +95,6 @@ COGL_EXT_FUNCTION (void, glFramebufferRenderbuffer,
GLenum attachment, GLenum attachment,
GLenum renderbuffertarget, GLenum renderbuffertarget,
GLuint renderbuffer)) GLuint renderbuffer))
COGL_EXT_FUNCTION (GLboolean, glIsRenderbuffer,
(GLuint renderbuffer))
COGL_EXT_FUNCTION (GLenum, glCheckFramebufferStatus, COGL_EXT_FUNCTION (GLenum, glCheckFramebufferStatus,
(GLenum target)) (GLenum target))
COGL_EXT_FUNCTION (void, glDeleteFramebuffers, COGL_EXT_FUNCTION (void, glDeleteFramebuffers,
@ -109,12 +107,6 @@ COGL_EXT_FUNCTION (void, glGetFramebufferAttachmentParameteriv,
GLenum attachment, GLenum attachment,
GLenum pname, GLenum pname,
GLint *params)) GLint *params))
COGL_EXT_FUNCTION (void, glGetRenderbufferParameteriv,
(GLenum target,
GLenum pname,
GLint *params))
COGL_EXT_FUNCTION (GLboolean, glIsFramebuffer,
(GLuint framebuffer))
COGL_EXT_END () COGL_EXT_END ()
COGL_EXT_BEGIN (blending, 1, 2, COGL_EXT_BEGIN (blending, 1, 2,
@ -149,36 +141,3 @@ COGL_EXT_FUNCTION (void, glBlendEquationSeparate,
(GLenum modeRGB, (GLenum modeRGB,
GLenum modeAlpha)) GLenum modeAlpha))
COGL_EXT_END () COGL_EXT_END ()
COGL_EXT_BEGIN (gles2_only_api,
4, 1,
COGL_EXT_IN_GLES2,
"ARB:\0",
"ES2_compatibility\0")
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 ()
/* GL and GLES 2.0 apis */
COGL_EXT_BEGIN (two_point_zero_api,
2, 0,
COGL_EXT_IN_GLES2,
"\0",
"\0")
COGL_EXT_FUNCTION (void, glStencilFuncSeparate,
(GLenum face, GLenum func, GLint ref, GLuint mask))
COGL_EXT_FUNCTION (void, glStencilMaskSeparate,
(GLenum face, GLuint mask))
COGL_EXT_FUNCTION (void, glStencilOpSeparate,
(GLenum face, GLenum fail, GLenum zfail, GLenum zpass))
COGL_EXT_END ()

View File

@ -336,7 +336,6 @@ cogl_sources = [
'cogl-poll-private.h', 'cogl-poll-private.h',
'cogl-poll.c', 'cogl-poll.c',
'gl-prototypes/cogl-all-functions.h', 'gl-prototypes/cogl-all-functions.h',
'gl-prototypes/cogl-fixed-functions.h',
'cogl-memory-stack-private.h', 'cogl-memory-stack-private.h',
'cogl-memory-stack.c', 'cogl-memory-stack.c',
'cogl-magazine-private.h', 'cogl-magazine-private.h',