gl: reorganize the extension headers by function rather than api

This commit is contained in:
Matthew Waters 2014-03-23 00:38:16 +11:00 committed by Tim-Philipp Müller
parent 350981b14c
commit 45c71eb3e1
15 changed files with 396 additions and 466 deletions

View file

@ -18,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/
#include "glprototypes/base.h"
#include "glprototypes/blending.h"
#include "glprototypes/eglimage.h"
#include "glprototypes/fbo.h"
#include "glprototypes/fixedfunction.h"
#include "glprototypes/gles.h"
#include "glprototypes/opengl.h"
#include "glprototypes/gles1.h"
#include "glprototypes/gles1gles2.h"
#include "glprototypes/gles1opengl.h"
#include "glprototypes/gles1gles2opengl.h"
#include "glprototypes/gles2.h"
#include "glprototypes/gles2opengl.h"
#include "glprototypes/gles3opengl.h"
#include "glprototypes/shaders.h"

View file

@ -178,6 +178,25 @@ GST_GL_EXT_FUNCTION (void, LineWidth, (GLfloat width))
GST_GL_EXT_FUNCTION (void, PolygonOffset, (GLfloat factor, GLfloat units))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (texture_3d, 1, 2,
0, /* not in either GLES */
"OES\0",
"texture_3D\0")
GST_GL_EXT_FUNCTION (void, TexImage3D,
(GLenum target, GLint level,
GLint internalFormat,
GLsizei width, GLsizei height,
GLsizei depth, GLint border,
GLenum format, GLenum type,
const GLvoid *pixels))
GST_GL_EXT_FUNCTION (void, TexSubImage3D,
(GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint zoffset, GLsizei width,
GLsizei height, GLsizei depth,
GLenum format,
GLenum type, const GLvoid *pixels))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (only_in_both_gles_and_gl_1_3,
1, 3,
@ -270,3 +289,12 @@ GST_GL_EXT_FUNCTION (void *, MapBuffer,
GST_GL_EXT_FUNCTION (GLboolean, UnmapBuffer,
(GLenum target))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (gl3,
3, 1,
GST_GL_API_GLES3,
"\0",
"\0")
GST_GL_EXT_FUNCTION (const GLubyte*, GetStringi,
(GLenum name, GLint index))
GST_GL_EXT_END ()

View file

@ -0,0 +1,88 @@
/*
* GStreamer
* Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
/*
* Cogl
*
* An object oriented GL/GLES Abstraction/Utility Layer
*
* Copyright (C) 2009, 2011 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
GST_GL_EXT_BEGIN (blending, 1, 2,
GST_GL_API_GLES2,
"\0",
"\0")
GST_GL_EXT_FUNCTION (void, BlendEquation,
(GLenum mode))
GST_GL_EXT_FUNCTION (void, BlendColor,
(GLclampf red,
GLclampf green,
GLclampf blue,
GLclampf alpha))
GST_GL_EXT_END ()
/* Optional, declared in 1.4 or GLES 1.2 */
GST_GL_EXT_BEGIN (blend_func_separate, 1, 4,
GST_GL_API_GLES2,
"EXT\0",
"blend_func_separate\0")
GST_GL_EXT_FUNCTION (void, BlendFuncSeparate,
(GLenum srcRGB,
GLenum dstRGB,
GLenum srcAlpha,
GLenum dstAlpha))
GST_GL_EXT_END ()
/* Optional, declared in 2.0 */
GST_GL_EXT_BEGIN (blend_equation_separate, 2, 0,
GST_GL_API_GLES2,
"EXT\0",
"blend_equation_separate\0")
GST_GL_EXT_FUNCTION (void, BlendEquationSeparate,
(GLenum modeRGB,
GLenum modeAlpha))
GST_GL_EXT_END ()
/* GL and GLES 2.0 apis */
GST_GL_EXT_BEGIN (two_point_zero_api,
2, 0,
GST_GL_API_GLES2,
"\0",
"\0")
GST_GL_EXT_FUNCTION (void, StencilFuncSeparate,
(GLenum face, GLenum func, GLint ref, GLuint mask))
GST_GL_EXT_FUNCTION (void, StencilMaskSeparate,
(GLenum face, GLuint mask))
GST_GL_EXT_FUNCTION (void, StencilOpSeparate,
(GLenum face, GLenum fail, GLenum zfail, GLenum zpass))
GST_GL_EXT_END ()

View file

@ -38,18 +38,6 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
GST_GL_EXT_BEGIN (only_in_both_gles,
255, 255,
GST_GL_API_GLES1 |
GST_GL_API_GLES2,
"\0",
"\0")
GST_GL_EXT_FUNCTION (void, DepthRangef,
(GLfloat near_val, GLfloat far_val))
GST_GL_EXT_FUNCTION (void, ClearDepthf,
(GLclampf depth))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (EGL_image, 255, 255,
0, /* not in either GLES */
"OES\0",

View file

@ -0,0 +1,144 @@
/*
* GStreamer
* Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
/*
* Cogl
*
* An object oriented GL/GLES Abstraction/Utility Layer
*
* Copyright (C) 2009, 2011 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
GST_GL_EXT_BEGIN (offscreen,
3, 0,
GST_GL_API_GLES2,
/* for some reason the ARB version of this
extension doesn't have an ARB suffix for the
functions */
"ARB:\0EXT\0OES\0",
"framebuffer_object\0")
GST_GL_EXT_FUNCTION (void, GenRenderbuffers,
(GLsizei n,
GLuint *renderbuffers))
GST_GL_EXT_FUNCTION (void, DeleteRenderbuffers,
(GLsizei n,
const GLuint *renderbuffers))
GST_GL_EXT_FUNCTION (void, BindRenderbuffer,
(GLenum target,
GLuint renderbuffer))
GST_GL_EXT_FUNCTION (void, RenderbufferStorage,
(GLenum target,
GLenum internalformat,
GLsizei width,
GLsizei height))
GST_GL_EXT_FUNCTION (void, GenFramebuffers,
(GLsizei n,
GLuint *framebuffers))
GST_GL_EXT_FUNCTION (void, BindFramebuffer,
(GLenum target,
GLuint framebuffer))
GST_GL_EXT_FUNCTION (void, FramebufferTexture2D,
(GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
GLint level))
GST_GL_EXT_FUNCTION (void, FramebufferRenderbuffer,
(GLenum target,
GLenum attachment,
GLenum renderbuffertarget,
GLuint renderbuffer))
GST_GL_EXT_FUNCTION (GLboolean, IsRenderbuffer,
(GLuint renderbuffer))
GST_GL_EXT_FUNCTION (GLenum, CheckFramebufferStatus,
(GLenum target))
GST_GL_EXT_FUNCTION (void, DeleteFramebuffers,
(GLsizei n,
const GLuint *framebuffers))
GST_GL_EXT_FUNCTION (void, GenerateMipmap,
(GLenum target))
GST_GL_EXT_FUNCTION (void, GetFramebufferAttachmentParameteriv,
(GLenum target,
GLenum attachment,
GLenum pname,
GLint *params))
GST_GL_EXT_FUNCTION (void, GetRenderbufferParameteriv,
(GLenum target,
GLenum pname,
GLint *params))
GST_GL_EXT_FUNCTION (GLboolean, IsFramebuffer,
(GLuint framebuffer))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (offscreen_blit, 255, 255,
0, /* not in either GLES */
"EXT\0ANGLE\0",
"framebuffer_blit\0")
GST_GL_EXT_FUNCTION (void, BlitFramebuffer,
(GLint srcX0,
GLint srcY0,
GLint srcX1,
GLint srcY1,
GLint dstX0,
GLint dstY0,
GLint dstX1,
GLint dstY1,
GLbitfield mask,
GLenum filter))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (framebuffer_discard, 255, 255,
0, /* not in either GLES */
"EXT\0",
"framebuffer_discard\0")
GST_GL_EXT_FUNCTION (void, DiscardFramebuffer,
(GLenum target,
GLsizei numAttachments,
const GLenum *attachments))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (read_buffer, 1, 0,
GST_GL_API_GLES3,
"NV\0",
"read_buffer\0")
GST_GL_EXT_FUNCTION (void, ReadBuffer,
(GLenum mode))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (draw_buffers, 2, 1,
GST_GL_API_GLES3,
"ARB\0ATI\0NV\0",
"draw_buffers\0")
GST_GL_EXT_FUNCTION (void, DrawBuffers,
(GLsizei n, const GLenum *bufs))
GST_GL_EXT_END ()

View file

@ -103,3 +103,36 @@ GST_GL_EXT_FUNCTION (void, PushMatrix,
GST_GL_EXT_FUNCTION (void, PopMatrix,
(void))
GST_GL_EXT_END ()
/* Eventually we want to remove this category */
GST_GL_EXT_BEGIN (fixed_function_gl_only,
0, 0,
0,
"\0",
"\0")
GST_GL_EXT_FUNCTION (void, PushAttrib,
(GLbitfield mask))
GST_GL_EXT_FUNCTION (void, PopAttrib,
(void))
GST_GL_EXT_FUNCTION (void, TexImage1D,
(GLenum target,
GLint level,
GLint internalFormat,
GLsizei width,
GLint border,
GLenum format,
GLenum type,
const GLvoid *data))
GST_GL_EXT_FUNCTION (void, Rotatef,
(GLfloat angle, GLfloat x, GLfloat y, GLfloat z))
GST_GL_EXT_FUNCTION (void, Translatef,
(GLfloat x, GLfloat y, GLfloat z))
GST_GL_EXT_FUNCTION (void, Scalef,
(GLfloat x, GLfloat y, GLfloat z))
GST_GL_EXT_FUNCTION (void, Lightfv,
(GLenum light, GLenum pname, const GLfloat *params))
GST_GL_EXT_FUNCTION (void, ColorMaterial,
(GLenum face, GLenum pname))
GST_GL_EXT_FUNCTION (void, ShadeModel,
(GLenum value))
GST_GL_EXT_END ()

View file

@ -38,6 +38,26 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
GST_GL_EXT_BEGIN (only_in_both_gles,
255, 255,
GST_GL_API_GLES1 |
GST_GL_API_GLES2,
"\0",
"\0")
GST_GL_EXT_FUNCTION (void, DepthRangef,
(GLfloat near_val, GLfloat far_val))
GST_GL_EXT_FUNCTION (void, ClearDepthf,
(GLclampf depth))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (only_in_gles1,
255, 255,
GST_GL_API_GLES1,
"\0",
"\0")
GST_GL_EXT_FUNCTION (void, ClipPlanef, (GLenum plane, const GLfloat *equation))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (gles2_only_api,
255, 255,
GST_GL_API_GLES2,

View file

@ -1,47 +0,0 @@
/*
* GStreamer
* Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
/*
* Cogl
*
* An object oriented GL/GLES Abstraction/Utility Layer
*
* Copyright (C) 2009, 2011 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
GST_GL_EXT_BEGIN (only_in_gles1,
255, 255,
GST_GL_API_GLES1,
"\0",
"\0")
GST_GL_EXT_FUNCTION (void, ClipPlanef, (GLenum plane, const GLfloat *equation))
GST_GL_EXT_END ()

View file

@ -1,24 +0,0 @@
/*
* GStreamer
* Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "glprototypes/gles1.h"
#include "glprototypes/gles1gles2.h"
#include "glprototypes/gles1opengl.h"
#include "glprototypes/gles1gles2opengl.h"

View file

@ -1,24 +0,0 @@
/*
* GStreamer
* Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "glprototypes/gles1gles2.h"
#include "glprototypes/gles1gles2opengl.h"
#include "glprototypes/gles2.h"
#include "glprototypes/gles2opengl.h"

View file

@ -1,56 +0,0 @@
/*
* GStreamer
* Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
/* This lists functions that are unique to GL 2.1 or GLES 3.0 and are
* not in the old GLSL extensions */
GST_GL_EXT_BEGIN (shaders_2_1, 2, 1,
GST_GL_API_GLES3,
"\0",
"\0")
GST_GL_EXT_FUNCTION (void, UniformMatrix2x3fv,
(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
GST_GL_EXT_FUNCTION (void, UniformMatrix3x2fv,
(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
GST_GL_EXT_FUNCTION (void, UniformMatrix2x4fv,
(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
GST_GL_EXT_FUNCTION (void, UniformMatrix4x2fv,
(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
GST_GL_EXT_FUNCTION (void, UniformMatrix3x4fv,
(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
GST_GL_EXT_FUNCTION (void, UniformMatrix4x3fv,
(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (read_buffer, 1, 0,
GST_GL_API_GLES3,
"NV\0",
"read_buffer\0")
GST_GL_EXT_FUNCTION (void, ReadBuffer,
(GLenum mode))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (draw_buffers, 2, 1,
GST_GL_API_GLES3,
"ARB\0ATI\0NV\0",
"draw_buffers\0")
GST_GL_EXT_FUNCTION (void, DrawBuffers,
(GLsizei n, const GLenum *bufs))
GST_GL_EXT_END ()

View file

@ -59,116 +59,3 @@ GST_GL_EXT_FUNCTION (void, DepthRange,
GST_GL_EXT_FUNCTION (void, DrawBuffer,
(GLenum mode))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (framebuffer_discard, 255, 255,
0, /* not in either GLES */
"EXT\0",
"framebuffer_discard\0")
GST_GL_EXT_FUNCTION (void, DiscardFramebuffer,
(GLenum target,
GLsizei numAttachments,
const GLenum *attachments))
GST_GL_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 */
GST_GL_EXT_BEGIN (shader_objects, 255, 255,
0, /* not in either GLES */
"ARB\0",
"shader_objects\0")
GST_GL_EXT_FUNCTION (GLuint, CreateProgramObject,
(void))
GST_GL_EXT_FUNCTION (GLuint, CreateShaderObject,
(GLenum shaderType))
GST_GL_EXT_FUNCTION (void, DeleteObject,
(GLuint obj))
GST_GL_EXT_FUNCTION (void, AttachObject,
(GLuint container, GLuint obj))
GST_GL_EXT_FUNCTION (void, UseProgramObject,
(GLuint programObj))
GST_GL_EXT_FUNCTION (void, GetInfoLog,
(GLuint obj,
GLsizei maxLength,
GLsizei *length,
char *infoLog))
GST_GL_EXT_FUNCTION (void, GetObjectParameteriv,
(GLuint obj,
GLenum pname,
GLint *params))
GST_GL_EXT_FUNCTION (void, DetachObject,
(GLuint container, GLuint obj))
GST_GL_EXT_FUNCTION (void, GetAttachedObjects,
(GLuint program,
GLsizei maxcount,
GLsizei* count,
GLuint* shaders))
GST_GL_EXT_END ()
/* ARB_fragment_program */
GST_GL_EXT_BEGIN (arbfp, 255, 255,
0, /* not in either GLES */
"ARB\0",
"fragment_program\0")
GST_GL_EXT_FUNCTION (void, GenPrograms,
(GLsizei n,
GLuint *programs))
GST_GL_EXT_FUNCTION (void, DeletePrograms,
(GLsizei n,
GLuint *programs))
GST_GL_EXT_FUNCTION (void, BindProgram,
(GLenum target,
GLuint program))
GST_GL_EXT_FUNCTION (void, ProgramString,
(GLenum target,
GLenum format,
GLsizei len,
const void *program))
GST_GL_EXT_FUNCTION (void, ProgramLocalParameter4fv,
(GLenum target,
GLuint index,
GLfloat *params))
GST_GL_EXT_END ()
/* Eventually we want to remove this category */
GST_GL_EXT_BEGIN (fixed_function_gl_only,
0, 0,
0,
"\0",
"\0")
GST_GL_EXT_FUNCTION (void, PushAttrib,
(GLbitfield mask))
GST_GL_EXT_FUNCTION (void, PopAttrib,
(void))
GST_GL_EXT_FUNCTION (void, TexImage1D,
(GLenum target,
GLint level,
GLint internalFormat,
GLsizei width,
GLint border,
GLenum format,
GLenum type,
const GLvoid *data))
GST_GL_EXT_FUNCTION (void, Rotatef,
(GLfloat angle, GLfloat x, GLfloat y, GLfloat z))
GST_GL_EXT_FUNCTION (void, Translatef,
(GLfloat x, GLfloat y, GLfloat z))
GST_GL_EXT_FUNCTION (void, Scalef,
(GLfloat x, GLfloat y, GLfloat z))
GST_GL_EXT_FUNCTION (void, Lightfv,
(GLenum light, GLenum pname, const GLfloat *params))
GST_GL_EXT_FUNCTION (void, ColorMaterial,
(GLenum face, GLenum pname))
GST_GL_EXT_FUNCTION (void, ShadeModel,
(GLenum value))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (gl3,
3, 1,
GST_GL_API_GLES3, /* not in GLES */
"\0",
"\0")
GST_GL_EXT_FUNCTION (const GLubyte*, GetStringi,
(GLenum name, GLint index))
GST_GL_EXT_END ()

View file

@ -1,25 +0,0 @@
/*
* GStreamer
* Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "glprototypes/opengl.h"
#include "glprototypes/gles1opengl.h"
#include "glprototypes/gles1gles2opengl.h"
#include "glprototypes/gles2opengl.h"
#include "glprototypes/gles3opengl.h"

View file

@ -38,116 +38,6 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
GST_GL_EXT_BEGIN (offscreen,
3, 0,
GST_GL_API_GLES2,
/* for some reason the ARB version of this
extension doesn't have an ARB suffix for the
functions */
"ARB:\0EXT\0OES\0",
"framebuffer_object\0")
GST_GL_EXT_FUNCTION (void, GenRenderbuffers,
(GLsizei n,
GLuint *renderbuffers))
GST_GL_EXT_FUNCTION (void, DeleteRenderbuffers,
(GLsizei n,
const GLuint *renderbuffers))
GST_GL_EXT_FUNCTION (void, BindRenderbuffer,
(GLenum target,
GLuint renderbuffer))
GST_GL_EXT_FUNCTION (void, RenderbufferStorage,
(GLenum target,
GLenum internalformat,
GLsizei width,
GLsizei height))
GST_GL_EXT_FUNCTION (void, GenFramebuffers,
(GLsizei n,
GLuint *framebuffers))
GST_GL_EXT_FUNCTION (void, BindFramebuffer,
(GLenum target,
GLuint framebuffer))
GST_GL_EXT_FUNCTION (void, FramebufferTexture2D,
(GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
GLint level))
GST_GL_EXT_FUNCTION (void, FramebufferRenderbuffer,
(GLenum target,
GLenum attachment,
GLenum renderbuffertarget,
GLuint renderbuffer))
GST_GL_EXT_FUNCTION (GLboolean, IsRenderbuffer,
(GLuint renderbuffer))
GST_GL_EXT_FUNCTION (GLenum, CheckFramebufferStatus,
(GLenum target))
GST_GL_EXT_FUNCTION (void, DeleteFramebuffers,
(GLsizei n,
const GLuint *framebuffers))
GST_GL_EXT_FUNCTION (void, GenerateMipmap,
(GLenum target))
GST_GL_EXT_FUNCTION (void, GetFramebufferAttachmentParameteriv,
(GLenum target,
GLenum attachment,
GLenum pname,
GLint *params))
GST_GL_EXT_FUNCTION (void, GetRenderbufferParameteriv,
(GLenum target,
GLenum pname,
GLint *params))
GST_GL_EXT_FUNCTION (GLboolean, IsFramebuffer,
(GLuint framebuffer))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (blending, 1, 2,
GST_GL_API_GLES2,
"\0",
"\0")
GST_GL_EXT_FUNCTION (void, BlendEquation,
(GLenum mode))
GST_GL_EXT_FUNCTION (void, BlendColor,
(GLclampf red,
GLclampf green,
GLclampf blue,
GLclampf alpha))
GST_GL_EXT_END ()
/* Optional, declared in 1.4 or GLES 1.2 */
GST_GL_EXT_BEGIN (blend_func_separate, 1, 4,
GST_GL_API_GLES2,
"EXT\0",
"blend_func_separate\0")
GST_GL_EXT_FUNCTION (void, BlendFuncSeparate,
(GLenum srcRGB,
GLenum dstRGB,
GLenum srcAlpha,
GLenum dstAlpha))
GST_GL_EXT_END ()
/* Optional, declared in 2.0 */
GST_GL_EXT_BEGIN (blend_equation_separate, 2, 0,
GST_GL_API_GLES2,
"EXT\0",
"blend_equation_separate\0")
GST_GL_EXT_FUNCTION (void, BlendEquationSeparate,
(GLenum modeRGB,
GLenum modeAlpha))
GST_GL_EXT_END ()
/* GL and GLES 2.0 apis */
GST_GL_EXT_BEGIN (two_point_zero_api,
2, 0,
GST_GL_API_GLES2,
"\0",
"\0")
GST_GL_EXT_FUNCTION (void, StencilFuncSeparate,
(GLenum face, GLenum func, GLint ref, GLuint mask))
GST_GL_EXT_FUNCTION (void, StencilMaskSeparate,
(GLenum face, GLuint mask))
GST_GL_EXT_FUNCTION (void, StencilOpSeparate,
(GLenum face, GLenum fail, GLenum zfail, GLenum zpass))
GST_GL_EXT_END ()
/* This lists functions that are unique to GL 2.0 or GLES 2.0 and are
* not in the old GLSL extensions */
GST_GL_EXT_BEGIN (shaders_glsl_2_only, 2, 0,
@ -377,40 +267,82 @@ GST_GL_EXT_FUNCTION (void, GetActiveAttrib,
GLchar* name))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (texture_3d, 1, 2,
/* 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 */
GST_GL_EXT_BEGIN (shader_objects, 255, 255,
0, /* not in either GLES */
"OES\0",
"texture_3D\0")
GST_GL_EXT_FUNCTION (void, TexImage3D,
(GLenum target, GLint level,
GLint internalFormat,
GLsizei width, GLsizei height,
GLsizei depth, GLint border,
GLenum format, GLenum type,
const GLvoid *pixels))
GST_GL_EXT_FUNCTION (void, TexSubImage3D,
(GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint zoffset, GLsizei width,
GLsizei height, GLsizei depth,
"ARB\0",
"shader_objects\0")
GST_GL_EXT_FUNCTION (GLuint, CreateProgramObject,
(void))
GST_GL_EXT_FUNCTION (GLuint, CreateShaderObject,
(GLenum shaderType))
GST_GL_EXT_FUNCTION (void, DeleteObject,
(GLuint obj))
GST_GL_EXT_FUNCTION (void, AttachObject,
(GLuint container, GLuint obj))
GST_GL_EXT_FUNCTION (void, UseProgramObject,
(GLuint programObj))
GST_GL_EXT_FUNCTION (void, GetInfoLog,
(GLuint obj,
GLsizei maxLength,
GLsizei *length,
char *infoLog))
GST_GL_EXT_FUNCTION (void, GetObjectParameteriv,
(GLuint obj,
GLenum pname,
GLint *params))
GST_GL_EXT_FUNCTION (void, DetachObject,
(GLuint container, GLuint obj))
GST_GL_EXT_FUNCTION (void, GetAttachedObjects,
(GLuint program,
GLsizei maxcount,
GLsizei* count,
GLuint* shaders))
GST_GL_EXT_END ()
/* ARB_fragment_program */
GST_GL_EXT_BEGIN (arbfp, 255, 255,
0, /* not in either GLES */
"ARB\0",
"fragment_program\0")
GST_GL_EXT_FUNCTION (void, GenPrograms,
(GLsizei n,
GLuint *programs))
GST_GL_EXT_FUNCTION (void, DeletePrograms,
(GLsizei n,
GLuint *programs))
GST_GL_EXT_FUNCTION (void, BindProgram,
(GLenum target,
GLuint program))
GST_GL_EXT_FUNCTION (void, ProgramString,
(GLenum target,
GLenum format,
GLenum type, const GLvoid *pixels))
GLsizei len,
const void *program))
GST_GL_EXT_FUNCTION (void, ProgramLocalParameter4fv,
(GLenum target,
GLuint index,
GLfloat *params))
GST_GL_EXT_END ()
GST_GL_EXT_BEGIN (offscreen_blit, 255, 255,
0, /* not in either GLES */
"EXT\0ANGLE\0",
"framebuffer_blit\0")
GST_GL_EXT_FUNCTION (void, BlitFramebuffer,
(GLint srcX0,
GLint srcY0,
GLint srcX1,
GLint srcY1,
GLint dstX0,
GLint dstY0,
GLint dstX1,
GLint dstY1,
GLbitfield mask,
GLenum filter))
/* This lists functions that are unique to GL 2.1 or GLES 3.0 and are
* not in the old GLSL extensions */
GST_GL_EXT_BEGIN (shaders_2_1, 2, 1,
GST_GL_API_GLES3,
"\0",
"\0")
GST_GL_EXT_FUNCTION (void, UniformMatrix2x3fv,
(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
GST_GL_EXT_FUNCTION (void, UniformMatrix3x2fv,
(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
GST_GL_EXT_FUNCTION (void, UniformMatrix2x4fv,
(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
GST_GL_EXT_FUNCTION (void, UniformMatrix4x2fv,
(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
GST_GL_EXT_FUNCTION (void, UniformMatrix3x4fv,
(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
GST_GL_EXT_FUNCTION (void, UniformMatrix4x3fv,
(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
GST_GL_EXT_END ()

View file

@ -114,22 +114,8 @@ typedef enum
typedef struct _GstGLFuncs
{
#include <gst/gl/glprototypes/opengl.h>
gpointer padding1[GST_PADDING_LARGE];
#include <gst/gl/glprototypes/gles1.h>
gpointer padding2[GST_PADDING_LARGE];
#include <gst/gl/glprototypes/gles1gles2.h>
gpointer padding3[GST_PADDING_LARGE];
#include <gst/gl/glprototypes/gles1opengl.h>
gpointer padding4[GST_PADDING_LARGE*2];
#include <gst/gl/glprototypes/gles2.h>
gpointer padding5[GST_PADDING_LARGE*2];
#include <gst/gl/glprototypes/gles2opengl.h>
gpointer padding6[GST_PADDING_LARGE*2];
#include <gst/gl/glprototypes/gles1gles2opengl.h>
gpointer padding7[GST_PADDING_LARGE*2];
#include <gst/gl/glprototypes/gles3opengl.h>
gpointer padding8[GST_PADDING_LARGE*4];
#include <gst/gl/glprototypes/all_functions.h>
gpointer padding[GST_PADDING_LARGE*6];
} GstGLFuncs;
#undef GST_GL_EXT_BEGIN