Commit a9ba7ee0 authored by Sam Lantinga's avatar Sam Lantinga

indent

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403208
parent 5f94466c
......@@ -673,7 +673,7 @@
0014B89A09C0DAAE003A99D5 /* Xvlibint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Xvlibint.h; sourceTree = "<group>"; };
0014B89F09C0DAB9003A99D5 /* Xinerama.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = Xinerama.c; sourceTree = "<group>"; };
0014B8A209C0DAC4003A99D5 /* xme.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = xme.c; sourceTree = "<group>"; };
0014B9A909C0E585003A99D5 /* Info-FrameworkNoX11.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Info-FrameworkNoX11.plist"; sourceTree = "<group>"; };
0014B9A909C0E585003A99D5 /* Info-FrameworkNoX11.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-FrameworkNoX11.plist"; sourceTree = "<group>"; };
00162D3409BD1FA90037C8D0 /* SDL_config_macosx.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_config_macosx.h; path = ../../include/SDL_config_macosx.h; sourceTree = SOURCE_ROOT; };
00162D3709BD1FA90037C8D0 /* SDL_config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_config.h; path = ../../include/SDL_config.h; sourceTree = SOURCE_ROOT; };
00162D3809BD1FA90037C8D0 /* SDL_platform.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_platform.h; path = ../../include/SDL_platform.h; sourceTree = SOURCE_ROOT; };
......@@ -791,7 +791,7 @@
B2CF8DC705C4450500E5DC7F /* SDL_name.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_name.h; path = ../../include/SDL_name.h; sourceTree = SOURCE_ROOT; };
BECDF5D50761B759005FE872 /* SDL_coreaudio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SDL_coreaudio.c; sourceTree = "<group>"; };
BECDF5D60761B759005FE872 /* SDL_coreaudio.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SDL_coreaudio.h; sourceTree = "<group>"; };
BECDF66B0761BA81005FE872 /* Info-Framework.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Info-Framework.plist"; sourceTree = "<group>"; };
BECDF66B0761BA81005FE872 /* Info-Framework.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-Framework.plist"; sourceTree = "<group>"; };
BECDF66C0761BA81005FE872 /* SDL.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL.framework; sourceTree = BUILT_PRODUCTS_DIR; };
BECDF6B30761BA81005FE872 /* libSDL.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL.a; sourceTree = BUILT_PRODUCTS_DIR; };
BECDF6BE0761BA81005FE872 /* Standard DMG */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "Standard DMG"; sourceTree = BUILT_PRODUCTS_DIR; };
......
......@@ -32,19 +32,20 @@
/* $Id: gl.h 4533 2007-11-26 11:19:35Z markc $ */
#ifdef __cplusplus
extern "C" {
extern "C"
{
#endif
#ifndef APIENTRY
#define APIENTRY
#endif
#endif
#ifndef GL_APIENTRY
#define GL_APIENTRY
#endif
#endif
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
......@@ -79,24 +80,24 @@ extern "C" {
** compliant with the OpenGL(R) version 1.2.1 Specification.
*/
typedef unsigned int GLenum;
typedef unsigned char GLboolean;
typedef unsigned int GLbitfield;
typedef signed char GLbyte;
typedef short GLshort;
typedef int GLint;
typedef int GLsizei;
typedef unsigned char GLubyte;
typedef unsigned short GLushort;
typedef unsigned int GLuint;
typedef float GLfloat;
typedef float GLclampf;
typedef void GLvoid;
typedef int GLfixed;
typedef int GLclampx;
typedef int GLintptr;
typedef int GLsizeiptr;
typedef unsigned int GLenum;
typedef unsigned char GLboolean;
typedef unsigned int GLbitfield;
typedef signed char GLbyte;
typedef short GLshort;
typedef int GLint;
typedef int GLsizei;
typedef unsigned char GLubyte;
typedef unsigned short GLushort;
typedef unsigned int GLuint;
typedef float GLfloat;
typedef float GLclampf;
typedef void GLvoid;
typedef int GLfixed;
typedef int GLclampx;
typedef int GLintptr;
typedef int GLsizeiptr;
/*************************************************************/
......@@ -654,152 +655,262 @@ typedef int GLsizeiptr;
/*************************************************************/
/* Available only in Common profile */
GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLclampf ref);
GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
GL_API void GL_APIENTRY glClearDepthf (GLclampf depth);
GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation);
GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
GL_API void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param);
GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params);
GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
GL_API void GL_APIENTRY glGetClipPlanef (GLenum pname, GLfloat eqn[4]);
GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *params);
GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
GL_API void GL_APIENTRY glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params);
GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param);
GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
GL_API void GL_APIENTRY glLineWidth (GLfloat width);
GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m);
GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m);
GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
GL_API void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param);
GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
GL_API void GL_APIENTRY glPointSize (GLfloat size);
GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
GL_API void GL_APIENTRY glAlphaFunc(GLenum func, GLclampf ref);
GL_API void GL_APIENTRY glClearColor(GLclampf red, GLclampf green,
GLclampf blue, GLclampf alpha);
GL_API void GL_APIENTRY glClearDepthf(GLclampf depth);
GL_API void GL_APIENTRY glClipPlanef(GLenum plane,
const GLfloat * equation);
GL_API void GL_APIENTRY glColor4f(GLfloat red, GLfloat green,
GLfloat blue, GLfloat alpha);
GL_API void GL_APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar);
GL_API void GL_APIENTRY glFogf(GLenum pname, GLfloat param);
GL_API void GL_APIENTRY glFogfv(GLenum pname, const GLfloat * params);
GL_API void GL_APIENTRY glFrustumf(GLfloat left, GLfloat right,
GLfloat bottom, GLfloat top,
GLfloat zNear, GLfloat zFar);
GL_API void GL_APIENTRY glGetClipPlanef(GLenum pname, GLfloat eqn[4]);
GL_API void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat * params);
GL_API void GL_APIENTRY glGetLightfv(GLenum light, GLenum pname,
GLfloat * params);
GL_API void GL_APIENTRY glGetMaterialfv(GLenum face, GLenum pname,
GLfloat * params);
GL_API void GL_APIENTRY glGetTexEnvfv(GLenum env, GLenum pname,
GLfloat * params);
GL_API void GL_APIENTRY glGetTexParameterfv(GLenum target, GLenum pname,
GLfloat * params);
GL_API void GL_APIENTRY glLightModelf(GLenum pname, GLfloat param);
GL_API void GL_APIENTRY glLightModelfv(GLenum pname,
const GLfloat * params);
GL_API void GL_APIENTRY glLightf(GLenum light, GLenum pname,
GLfloat param);
GL_API void GL_APIENTRY glLightfv(GLenum light, GLenum pname,
const GLfloat * params);
GL_API void GL_APIENTRY glLineWidth(GLfloat width);
GL_API void GL_APIENTRY glLoadMatrixf(const GLfloat * m);
GL_API void GL_APIENTRY glMaterialf(GLenum face, GLenum pname,
GLfloat param);
GL_API void GL_APIENTRY glMaterialfv(GLenum face, GLenum pname,
const GLfloat * params);
GL_API void GL_APIENTRY glMultMatrixf(const GLfloat * m);
GL_API void GL_APIENTRY glMultiTexCoord4f(GLenum target, GLfloat s,
GLfloat t, GLfloat r,
GLfloat q);
GL_API void GL_APIENTRY glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz);
GL_API void GL_APIENTRY glOrthof(GLfloat left, GLfloat right,
GLfloat bottom, GLfloat top,
GLfloat zNear, GLfloat zFar);
GL_API void GL_APIENTRY glPointParameterf(GLenum pname, GLfloat param);
GL_API void GL_APIENTRY glPointParameterfv(GLenum pname,
const GLfloat * params);
GL_API void GL_APIENTRY glPointSize(GLfloat size);
GL_API void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units);
GL_API void GL_APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y,
GLfloat z);
GL_API void GL_APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z);
GL_API void GL_APIENTRY glTexEnvf(GLenum target, GLenum pname,
GLfloat param);
GL_API void GL_APIENTRY glTexEnvfv(GLenum target, GLenum pname,
const GLfloat * params);
GL_API void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname,
GLfloat param);
GL_API void GL_APIENTRY glTexParameterfv(GLenum target, GLenum pname,
const GLfloat * params);
GL_API void GL_APIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z);
/* Available in both Common and Common-Lite profiles */
GL_API void GL_APIENTRY glActiveTexture (GLenum texture);
GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLclampx ref);
GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
GL_API void GL_APIENTRY glClear (GLbitfield mask);
GL_API void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
GL_API void GL_APIENTRY glClearDepthx (GLclampx depth);
GL_API void GL_APIENTRY glClearStencil (GLint s);
GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture);
GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation);
GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
GL_API void GL_APIENTRY glCullFace (GLenum mode);
GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
GL_API void GL_APIENTRY glDepthFunc (GLenum func);
GL_API void GL_APIENTRY glDepthMask (GLboolean flag);
GL_API void GL_APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar);
GL_API void GL_APIENTRY glDisable (GLenum cap);
GL_API void GL_APIENTRY glDisableClientState (GLenum array);
GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
GL_API void GL_APIENTRY glEnable (GLenum cap);
GL_API void GL_APIENTRY glEnableClientState (GLenum array);
GL_API void GL_APIENTRY glFinish (void);
GL_API void GL_APIENTRY glFlush (void);
GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param);
GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *params);
GL_API void GL_APIENTRY glFrontFace (GLenum mode);
GL_API void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *params);
GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
GL_API void GL_APIENTRY glGetClipPlanex (GLenum pname, GLfixed eqn[4]);
GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
GL_API GLenum GL_APIENTRY glGetError (void);
GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params);
GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params);
GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
GL_API void GL_APIENTRY glGetPointerv (GLenum pname, void **params);
GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name);
GL_API void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params);
GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params);
GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params);
GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode);
GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture);
GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param);
GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *params);
GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param);
GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params);
GL_API void GL_APIENTRY glLineWidthx (GLfixed width);
GL_API void GL_APIENTRY glLoadIdentity (void);
GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m);
GL_API void GL_APIENTRY glLogicOp (GLenum opcode);
GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param);
GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params);
GL_API void GL_APIENTRY glMatrixMode (GLenum mode);
GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m);
GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
GL_API void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param);
GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params);
GL_API void GL_APIENTRY glPointSizex (GLfixed size);
GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units);
GL_API void GL_APIENTRY glPopMatrix (void);
GL_API void GL_APIENTRY glPushMatrix (void);
GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
GL_API void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert);
GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z);
GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
GL_API void GL_APIENTRY glShadeModel (GLenum mode);
GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
GL_API void GL_APIENTRY glStencilMask (GLuint mask);
GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param);
GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param);
GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params);
GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param);
GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params);
GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
GL_API void GL_APIENTRY glActiveTexture(GLenum texture);
GL_API void GL_APIENTRY glAlphaFuncx(GLenum func, GLclampx ref);
GL_API void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer);
GL_API void GL_APIENTRY glBindTexture(GLenum target, GLuint texture);
GL_API void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor);
GL_API void GL_APIENTRY glBufferData(GLenum target, GLsizeiptr size,
const GLvoid * data, GLenum usage);
GL_API void GL_APIENTRY glBufferSubData(GLenum target, GLintptr offset,
GLsizeiptr size,
const GLvoid * data);
GL_API void GL_APIENTRY glClear(GLbitfield mask);
GL_API void GL_APIENTRY glClearColorx(GLclampx red, GLclampx green,
GLclampx blue, GLclampx alpha);
GL_API void GL_APIENTRY glClearDepthx(GLclampx depth);
GL_API void GL_APIENTRY glClearStencil(GLint s);
GL_API void GL_APIENTRY glClientActiveTexture(GLenum texture);
GL_API void GL_APIENTRY glClipPlanex(GLenum plane,
const GLfixed * equation);
GL_API void GL_APIENTRY glColor4ub(GLubyte red, GLubyte green,
GLubyte blue, GLubyte alpha);
GL_API void GL_APIENTRY glColor4x(GLfixed red, GLfixed green,
GLfixed blue, GLfixed alpha);
GL_API void GL_APIENTRY glColorMask(GLboolean red, GLboolean green,
GLboolean blue, GLboolean alpha);
GL_API void GL_APIENTRY glColorPointer(GLint size, GLenum type,
GLsizei stride,
const GLvoid * pointer);
GL_API void GL_APIENTRY glCompressedTexImage2D(GLenum target, GLint level,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLint border,
GLsizei imageSize,
const GLvoid * data);
GL_API void GL_APIENTRY glCompressedTexSubImage2D(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
GLsizei imageSize,
const GLvoid * data);
GL_API void GL_APIENTRY glCopyTexImage2D(GLenum target, GLint level,
GLenum internalformat, GLint x,
GLint y, GLsizei width,
GLsizei height, GLint border);
GL_API void GL_APIENTRY glCopyTexSubImage2D(GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint x, GLint y,
GLsizei width,
GLsizei height);
GL_API void GL_APIENTRY glCullFace(GLenum mode);
GL_API void GL_APIENTRY glDeleteBuffers(GLsizei n,
const GLuint * buffers);
GL_API void GL_APIENTRY glDeleteTextures(GLsizei n,
const GLuint * textures);
GL_API void GL_APIENTRY glDepthFunc(GLenum func);
GL_API void GL_APIENTRY glDepthMask(GLboolean flag);
GL_API void GL_APIENTRY glDepthRangex(GLclampx zNear, GLclampx zFar);
GL_API void GL_APIENTRY glDisable(GLenum cap);
GL_API void GL_APIENTRY glDisableClientState(GLenum array);
GL_API void GL_APIENTRY glDrawArrays(GLenum mode, GLint first,
GLsizei count);
GL_API void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count,
GLenum type,
const GLvoid * indices);
GL_API void GL_APIENTRY glEnable(GLenum cap);
GL_API void GL_APIENTRY glEnableClientState(GLenum array);
GL_API void GL_APIENTRY glFinish(void);
GL_API void GL_APIENTRY glFlush(void);
GL_API void GL_APIENTRY glFogx(GLenum pname, GLfixed param);
GL_API void GL_APIENTRY glFogxv(GLenum pname, const GLfixed * params);
GL_API void GL_APIENTRY glFrontFace(GLenum mode);
GL_API void GL_APIENTRY glFrustumx(GLfixed left, GLfixed right,
GLfixed bottom, GLfixed top,
GLfixed zNear, GLfixed zFar);
GL_API void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean * params);
GL_API void GL_APIENTRY glGetBufferParameteriv(GLenum target,
GLenum pname,
GLint * params);
GL_API void GL_APIENTRY glGetClipPlanex(GLenum pname, GLfixed eqn[4]);
GL_API void GL_APIENTRY glGenBuffers(GLsizei n, GLuint * buffers);
GL_API void GL_APIENTRY glGenTextures(GLsizei n, GLuint * textures);
GL_API GLenum GL_APIENTRY glGetError(void);
GL_API void GL_APIENTRY glGetFixedv(GLenum pname, GLfixed * params);
GL_API void GL_APIENTRY glGetIntegerv(GLenum pname, GLint * params);
GL_API void GL_APIENTRY glGetLightxv(GLenum light, GLenum pname,
GLfixed * params);
GL_API void GL_APIENTRY glGetMaterialxv(GLenum face, GLenum pname,
GLfixed * params);
GL_API void GL_APIENTRY glGetPointerv(GLenum pname, void **params);
GL_API const GLubyte *GL_APIENTRY glGetString(GLenum name);
GL_API void GL_APIENTRY glGetTexEnviv(GLenum env, GLenum pname,
GLint * params);
GL_API void GL_APIENTRY glGetTexEnvxv(GLenum env, GLenum pname,
GLfixed * params);
GL_API void GL_APIENTRY glGetTexParameteriv(GLenum target, GLenum pname,
GLint * params);
GL_API void GL_APIENTRY glGetTexParameterxv(GLenum target, GLenum pname,
GLfixed * params);
GL_API void GL_APIENTRY glHint(GLenum target, GLenum mode);
GL_API GLboolean GL_APIENTRY glIsBuffer(GLuint buffer);
GL_API GLboolean GL_APIENTRY glIsEnabled(GLenum cap);
GL_API GLboolean GL_APIENTRY glIsTexture(GLuint texture);
GL_API void GL_APIENTRY glLightModelx(GLenum pname, GLfixed param);
GL_API void GL_APIENTRY glLightModelxv(GLenum pname,
const GLfixed * params);
GL_API void GL_APIENTRY glLightx(GLenum light, GLenum pname,
GLfixed param);
GL_API void GL_APIENTRY glLightxv(GLenum light, GLenum pname,
const GLfixed * params);
GL_API void GL_APIENTRY glLineWidthx(GLfixed width);
GL_API void GL_APIENTRY glLoadIdentity(void);
GL_API void GL_APIENTRY glLoadMatrixx(const GLfixed * m);
GL_API void GL_APIENTRY glLogicOp(GLenum opcode);
GL_API void GL_APIENTRY glMaterialx(GLenum face, GLenum pname,
GLfixed param);
GL_API void GL_APIENTRY glMaterialxv(GLenum face, GLenum pname,
const GLfixed * params);
GL_API void GL_APIENTRY glMatrixMode(GLenum mode);
GL_API void GL_APIENTRY glMultMatrixx(const GLfixed * m);
GL_API void GL_APIENTRY glMultiTexCoord4x(GLenum target, GLfixed s,
GLfixed t, GLfixed r,
GLfixed q);
GL_API void GL_APIENTRY glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz);
GL_API void GL_APIENTRY glNormalPointer(GLenum type, GLsizei stride,
const GLvoid * pointer);
GL_API void GL_APIENTRY glOrthox(GLfixed left, GLfixed right,
GLfixed bottom, GLfixed top,
GLfixed zNear, GLfixed zFar);
GL_API void GL_APIENTRY glPixelStorei(GLenum pname, GLint param);
GL_API void GL_APIENTRY glPointParameterx(GLenum pname, GLfixed param);
GL_API void GL_APIENTRY glPointParameterxv(GLenum pname,
const GLfixed * params);
GL_API void GL_APIENTRY glPointSizex(GLfixed size);
GL_API void GL_APIENTRY glPolygonOffsetx(GLfixed factor, GLfixed units);
GL_API void GL_APIENTRY glPopMatrix(void);
GL_API void GL_APIENTRY glPushMatrix(void);
GL_API void GL_APIENTRY glReadPixels(GLint x, GLint y, GLsizei width,
GLsizei height, GLenum format,
GLenum type, GLvoid * pixels);
GL_API void GL_APIENTRY glRotatex(GLfixed angle, GLfixed x, GLfixed y,
GLfixed z);
GL_API void GL_APIENTRY glSampleCoverage(GLclampf value,
GLboolean invert);
GL_API void GL_APIENTRY glSampleCoveragex(GLclampx value,
GLboolean invert);
GL_API void GL_APIENTRY glScalex(GLfixed x, GLfixed y, GLfixed z);
GL_API void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width,
GLsizei height);
GL_API void GL_APIENTRY glShadeModel(GLenum mode);
GL_API void GL_APIENTRY glStencilFunc(GLenum func, GLint ref,
GLuint mask);
GL_API void GL_APIENTRY glStencilMask(GLuint mask);
GL_API void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail,
GLenum zpass);
GL_API void GL_APIENTRY glTexCoordPointer(GLint size, GLenum type,
GLsizei stride,
const GLvoid * pointer);
GL_API void GL_APIENTRY glTexEnvi(GLenum target, GLenum pname,
GLint param);
GL_API void GL_APIENTRY glTexEnvx(GLenum target, GLenum pname,
GLfixed param);
GL_API void GL_APIENTRY glTexEnviv(GLenum target, GLenum pname,
const GLint * params);
GL_API void GL_APIENTRY glTexEnvxv(GLenum target, GLenum pname,
const GLfixed * params);
GL_API void GL_APIENTRY glTexImage2D(GLenum target, GLint level,
GLint internalformat, GLsizei width,
GLsizei height, GLint border,
GLenum format, GLenum type,
const GLvoid * pixels);
GL_API void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname,
GLint param);
GL_API void GL_APIENTRY glTexParameterx(GLenum target, GLenum pname,
GLfixed param);
GL_API void GL_APIENTRY glTexParameteriv(GLenum target, GLenum pname,
const GLint * params);
GL_API void GL_APIENTRY glTexParameterxv(GLenum target, GLenum pname,
const GLfixed * params);
GL_API void GL_APIENTRY glTexSubImage2D(GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
const GLvoid * pixels);
GL_API void GL_APIENTRY glTranslatex(GLfixed x, GLfixed y, GLfixed z);
GL_API void GL_APIENTRY glVertexPointer(GLint size, GLenum type,
GLsizei stride,
const GLvoid * pointer);
GL_API void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width,
GLsizei height);
/*------------------------------------------------------------------------*
* Required OES extension functions
......@@ -818,7 +929,8 @@ GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei hei
/* GL_OES_point_size_array */
#ifndef GL_OES_point_size_array
#define GL_OES_point_size_array 1
GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer);
GL_API void GL_APIENTRY glPointSizePointerOES(GLenum type, GLsizei stride,
const GLvoid * pointer);
#endif
/* GL_OES_point_sprite */
......@@ -830,5 +942,4 @@ GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, cons
}
#endif
#endif /* __gles_h_ */
#endif /* __gles_h_ */
......@@ -5,42 +5,59 @@
#define SDL_PROC_UNUSED(ret,func,params)
SDL_PROC_UNUSED(void, glAlphaFunc, (GLenum func, GLclampf ref))
SDL_PROC(void, glClearColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha))
SDL_PROC(void, glClearColor,
(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha))
SDL_PROC_UNUSED(void, glClearDepthf, (GLclampf depth))
SDL_PROC_UNUSED(void, glClipPlanef, (GLenum plane, const GLfloat *equation))
SDL_PROC(void, glColor4f, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha))
SDL_PROC_UNUSED(void, glClipPlanef, (GLenum plane, const GLfloat * equation))
SDL_PROC(void, glColor4f,
(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha))
SDL_PROC_UNUSED(void, glDepthRangef, (GLclampf zNear, GLclampf zFar))
SDL_PROC_UNUSED(void, glFogf, (GLenum pname, GLfloat param))
SDL_PROC_UNUSED(void, glFogfv, (GLenum pname, const GLfloat *params))
SDL_PROC_UNUSED(void, glFrustumf, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar))
SDL_PROC_UNUSED(void, glFogfv, (GLenum pname, const GLfloat * params))
SDL_PROC_UNUSED(void, glFrustumf,
(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top,
GLfloat zNear, GLfloat zFar))
SDL_PROC_UNUSED(void, glGetClipPlanef, (GLenum pname, GLfloat eqn[4]))
SDL_PROC(void, glGetFloatv, (GLenum pname, GLfloat *params))
SDL_PROC_UNUSED(void, glGetLightfv, (GLenum light, GLenum pname, GLfloat *params))
SDL_PROC_UNUSED(void, glGetMaterialfv, (GLenum face, GLenum pname, GLfloat *params))
SDL_PROC_UNUSED(void, glGetTexEnvfv, (GLenum env, GLenum pname, GLfloat *params))
SDL_PROC_UNUSED(void, glGetTexParameterfv, (GLenum target, GLenum pname, GLfloat *params))
SDL_PROC(void, glGetFloatv, (GLenum pname, GLfloat * params))
SDL_PROC_UNUSED(void, glGetLightfv,
(GLenum light, GLenum pname, GLfloat * params))
SDL_PROC_UNUSED(void, glGetMaterialfv,
(GLenum face, GLenum pname, GLfloat * params))
SDL_PROC_UNUSED(void, glGetTexEnvfv,
(GLenum env, GLenum pname, GLfloat * params))
SDL_PROC_UNUSED(void, glGetTexParameterfv,
(GLenum target, GLenum pname, GLfloat * params))
SDL_PROC_UNUSED(void, glLightModelf, (GLenum pname, GLfloat param))
SDL_PROC_UNUSED(void, glLightModelfv, (GLenum pname, const GLfloat *params))
SDL_PROC_UNUSED(void, glLightModelfv, (GLenum pname, const GLfloat * params))
SDL_PROC_UNUSED(void, glLightf, (GLenum light, GLenum pname, GLfloat param))
SDL_PROC_UNUSED(void, glLightfv, (GLenum light, GLenum pname, const GLfloat *params))
SDL_PROC_UNUSED(void, glLightfv,
(GLenum light, GLenum pname, const GLfloat * params))
SDL_PROC_UNUSED(void, glLineWidth, (GLfloat width))
SDL_PROC_UNUSED(void, glLoadMatrixf, (const GLfloat *m))
SDL_PROC_UNUSED(void, glLoadMatrixf, (const GLfloat * m))
SDL_PROC_UNUSED(void, glMaterialf, (GLenum face, GLenum pname, GLfloat param))
SDL_PROC_UNUSED(void, glMaterialfv, (GLenum face, GLenum pname, const GLfloat *params))
SDL_PROC_UNUSED(void, glMultMatrixf, (const GLfloat *m))
SDL_PROC_UNUSED(void, glMultiTexCoord4f, (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q))
SDL_PROC_UNUSED(void, glMaterialfv,
(GLenum face, GLenum pname, const GLfloat * params))
SDL_PROC_UNUSED(void, glMultMatrixf, (const GLfloat * m))
SDL_PROC_UNUSED(void, glMultiTexCoord4f,
(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q))
SDL_PROC_UNUSED(void, glNormal3f, (GLfloat nx, GLfloat ny, GLfloat nz))
SDL_PROC(void, glOrthof, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar))
SDL_PROC(void, glOrthof,
(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top,
GLfloat zNear, GLfloat zFar))
SDL_PROC_UNUSED(void, glPointParameterf, (GLenum pname, GLfloat param))
SDL_PROC_UNUSED(void, glPointParameterfv, (GLenum pname, const GLfloat *params))
SDL_PROC_UNUSED(void, glPointParameterfv,
(GLenum pname, const GLfloat * params))
SDL_PROC_UNUSED(void, glPointSize, (GLfloat size))
SDL_PROC_UNUSED(void, glPolygonOffset, (GLfloat factor, GLfloat units))
SDL_PROC_UNUSED(void, glRotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z))
SDL_PROC_UNUSED(void, glRotatef,
(GLfloat angle, GLfloat x, GLfloat y, GLfloat z))
SDL_PROC_UNUSED(void, glScalef, (GLfloat x, GLfloat y, GLfloat z))
SDL_PROC(void, glTexEnvf, (GLenum target, GLenum pname, GLfloat param))
SDL_PROC_UNUSED(void, glTexEnvfv, (GLenum target, GLenum pname, const GLfloat *params))
SDL_PROC_UNUSED(void, glTexEnvfv,
(GLenum target, GLenum pname, const GLfloat * params))
SDL_PROC(void, glTexParameterf, (GLenum target, GLenum pname, GLfloat param))
SDL_PROC_UNUSED(void, glTexParameterfv, (GLenum target, GLenum pname, const GLfloat *params))
SDL_PROC_UNUSED(void, glTexParameterfv,
(GLenum target, GLenum pname, const GLfloat * params))
SDL_PROC_UNUSED(void, glTranslatef, (GLfloat x, GLfloat y, GLfloat z))
/* Available in both Common and Common-Lite profiles */
......@@ -49,85 +66,127 @@ SDL_PROC_UNUSED(void, glAlphaFuncx, (GLenum func, GLclampx ref))
SDL_PROC_UNUSED(void, glBindBuffer, (GLenum target, GLuint buffer))
SDL_PROC(void, glBindTexture, (GLenum target, GLuint texture))
SDL_PROC(void, glBlendFunc, (GLenum sfactor, GLenum dfactor))
SDL_PROC_UNUSED(void, glBufferData, (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage))
SDL_PROC_UNUSED(void, glBufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data))
SDL_PROC_UNUSED(void, glBufferData,
(GLenum target, GLsizeiptr size, const GLvoid * data,
GLenum usage))
SDL_PROC_UNUSED(void, glBufferSubData,
(GLenum target, GLintptr offset, GLsizeiptr size,
const GLvoid * data))
SDL_PROC(void, glClear, (GLbitfield mask))
SDL_PROC_UNUSED(void, glClearColorx, (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha))
SDL_PROC_UNUSED(void, glClearColorx,
(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha))
SDL_PROC_UNUSED(void, glClearDepthx, (GLclampx depth))
SDL_PROC_UNUSED(void, glClearStencil, (GLint s))
SDL_PROC_UNUSED(void, glClientActiveTexture, (GLenum texture))
SDL_PROC_UNUSED(void, glClipPlanex, (GLenum plane, const GLfixed *equation))
SDL_PROC_UNUSED(void, glColor4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha))
SDL_PROC_UNUSED(void, glColor4x, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha))
SDL_PROC_UNUSED(void, glColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha))
SDL_PROC_UNUSED(void, glColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer))
SDL_PROC_UNUSED(void, glCompressedTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data))
SDL_PROC_UNUSED(void, glCompressedTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data))
SDL_PROC_UNUSED(void, glCopyTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border))
SDL_PROC_UNUSED(void, glCopyTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height))
SDL_PROC_UNUSED(void, glClipPlanex, (GLenum plane, const GLfixed * equation))
SDL_PROC_UNUSED(void, glColor4ub,
(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha))
SDL_PROC_UNUSED(void, glColor4x,
(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha))
SDL_PROC_UNUSED(void, glColorMask,
(GLboolean red, GLboolean green, GLboolean blue,
GLboolean alpha))
SDL_PROC_UNUSED(void, glColorPointer,
(GLint size, GLenum type, GLsizei stride,
const GLvoid * pointer))
SDL_PROC_UNUSED(void, glCompressedTexImage2D,
(GLenum target, GLint level, GLenum internalformat,
GLsizei width, GLsizei height, GLint border,
GLsizei imageSize, const GLvoid * data))
SDL_PROC_UNUSED(void, glCompressedTexSubImage2D,
(GLenum target, GLint level, GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height, GLenum format,
GLsizei imageSize, const GLvoid * data))
SDL_PROC_UNUSED(void, glCopyTexImage2D,
(GLenum target, GLint level, GLenum internalformat, GLint x,
GLint y, GLsizei width, GLsizei height, GLint border))
SDL_PROC_UNUSED(void, glCopyTexSubImage2D,
(GLenum target, GLint level, GLint xoffset, GLint yoffset,
GLint x, GLint y, GLsizei width, GLsizei height))
SDL_PROC_UNUSED(void, glCullFace, (GLenum mode))
SDL_PROC_UNUSED(void, glDeleteBuffers, (GLsizei n, const GLuint *buffers))
SDL_PROC_UNUSED(void, glDeleteTextures, (GLsizei n, const GLuint *textures))
SDL_PROC_UNUSED(void, glDeleteBuffers, (GLsizei n, const GLuint * buffers))
SDL_PROC_UNUSED(void, glDeleteTextures, (GLsizei n, const GLuint * textures))
SDL_PROC_UNUSED(void, glDepthFunc, (GLenum func))
SDL_PROC_UNUSED(void, glDepthMask, (GLboolean flag))
SDL_PROC_UNUSED(void, glDepthRangex, (GLclampx zNear, GLclampx zFar))
SDL_PROC(void, glDisable, (GLenum cap))
SDL_PROC_UNUSED(void, glDisableClientState, (GLenum array))
SDL_PROC(void, glDrawArrays, (GLenum mode, GLint first, GLsizei count))
SDL_PROC_UNUSED(void, glDrawElements, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices))
SDL_PROC_UNUSED(void, glDrawElements,
(GLenum mode, GLsizei count, GLenum type,
const GLvoid * indices))
SDL_PROC(void, glEnable, (GLenum cap))
SDL_PROC(void, glEnableClientState, (GLenum array))
SDL_PROC_UNUSED(void, glFinish, (void))
SDL_PROC_UNUSED(void, glFlush, (void))
SDL_PROC_UNUSED(void, glFogx, (GLenum pname, GLfixed param))
SDL_PROC_UNUSED(void, glFogxv, (GLenum pname, const GLfixed *params))
SDL_PROC_UNUSED(void, glFogxv, (GLenum pname, const GLfixed * params))
SDL_PROC_UNUSED(void, glFrontFace, (GLenum mode))
SDL_PROC_UNUSED(void, glFrustumx, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar))
SDL_PROC_UNUSED(void, glGetBooleanv, (GLenum pname, GLboolean *params))
SDL_PROC_UNUSED(void, glGetBufferParameteriv, (GLenum target, GLenum pname, GLint *params))
SDL_PROC_UNUSED(void, glFrustumx,
(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top,
GLfixed zNear, GLfixed zFar))
SDL_PROC_UNUSED(void, glGetBooleanv, (GLenum pname, GLboolean * params))
SDL_PROC_UNUSED(void, glGetBufferParameteriv,
(GLenum target, GLenum pname, GLint * params))
SDL_PROC_UNUSED(void, glGetClipPlanex, (GLenum pname, GLfixed eqn[4]))
SDL_PROC_UNUSED(void, glGenBuffers, (GLsizei n, GLuint *buffers))
SDL_PROC(void, glGenTextures, (GLsizei n, GLuint *textures))
SDL_PROC_UNUSED(void, glGenBuffers, (GLsizei n, GLuint * buffers))
SDL_PROC(void, glGenTextures, (GLsizei n, GLuint * textures))
SDL_PROC(GLenum, glGetError, (void))
SDL_PROC_UNUSED(void, glGetFixedv, (GLenum pname, GLfixed *params))
SDL_PROC(void, glGetIntegerv, (GLenum pname, GLint *params))
SDL_PROC_UNUSED(void, glGetLightxv, (GLenum light, GLenum pname, GLfixed *params))
SDL_PROC_UNUSED(void, glGetMaterialxv, (GLenum face, GLenum pname, GLfixed *params))
SDL_PROC_UNUSED(void, glGetFixedv, (GLenum pname, GLfixed * params))
SDL_PROC(void, glGetIntegerv, (GLenum pname, GLint * params))
SDL_PROC_UNUSED(void, glGetLightxv,
(GLenum light, GLenum pname, GLfixed * params))
SDL_PROC_UNUSED(void, glGetMaterialxv,
(GLenum face, GLenum pname, GLfixed * params))
SDL_PROC_UNUSED(void, glGetPointerv, (GLenum pname, void **params))
SDL_PROC_UNUSED(const GLubyte *, glGetString, (GLenum name))
SDL_PROC_UNUSED(void, glGetTexEnviv, (GLenum env, GLenum pname, GLint *params))
SDL_PROC_UNUSED(void, glGetTexEnvxv, (GLenum env, GLenum pname, GLfixed *params))
SDL_PROC_UNUSED(void, glGetTexParameteriv, (GLenum target, GLenum pname, GLint *params))
SDL_PROC_UNUSED(void, glGetTexParameterxv, (GLenum target, GLenum pname, GLfixed *params))
SDL_PROC_UNUSED(void, glGetTexEnviv,
(GLenum env, GLenum pname, GLint * params))
SDL_PROC_UNUSED(void, glGetTexEnvxv,
(GLenum env, GLenum pname, GLfixed * params))
SDL_PROC_UNUSED(void, glGetTexParameteriv,
(GLenum target, GLenum pname, GLint * params))
SDL_PROC_UNUSED(void, glGetTexParameterxv,
(GLenum target, GLenum pname, GLfixed * params))
SDL_PROC_UNUSED(void, glHint, (GLenum target, GLenum mode))
SDL_PROC_UNUSED(GLboolean, glIsBuffer, (GLuint buffer))
SDL_PROC_UNUSED(GLboolean, glIsEnabled, (GLenum cap))
SDL_PROC_UNUSED(GLboolean, glIsTexture, (GLuint texture))
SDL_PROC_UNUSED(void, glLightModelx, (GLenum pname, GLfixed param))
SDL_PROC_UNUSED(void, glLightModelxv, (GLenum pname, const GLfixed *params))
SDL_PROC_UNUSED(void, glLightModelxv, (GLenum pname, const GLfixed * params))
SDL_PROC_UNUSED(void, glLightx, (GLenum light, GLenum pname, GLfixed param))
SDL_PROC_UNUSED(void, glLightxv, (GLenum light, GLenum pname, const GLfixed *params))
SDL_PROC_UNUSED(void, glLightxv,
(GLenum light, GLenum pname, const GLfixed * params))
SDL_PROC_UNUSED(void, glLineWidthx, (GLfixed width))
SDL_PROC(void, glLoadIdentity, (void))
SDL_PROC_UNUSED(void, glLoadMatrixx, (const GLfixed *m))
SDL_PROC_UNUSED(void, glLoadMatrixx, (const GLfixed * m))
SDL_PROC_UNUSED(void, glLogicOp, (GLenum opcode))
SDL_PROC_UNUSED(void, glMaterialx, (GLenum face, GLenum pname, GLfixed param))
SDL_PROC_UNUSED(void, glMaterialxv, (GLenum face, GLenum pname, const GLfixed *params))
SDL_PROC_UNUSED(void, glMaterialxv,
(GLenum face, GLenum pname, const GLfixed * params))
SDL_PROC(void, glMatrixMode, (GLenum mode))
SDL_PROC_UNUSED(void, glMultMatrixx, (const GLfixed *m))
SDL_PROC_UNUSED(void, glMultiTexCoord4x, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q))
SDL_PROC_UNUSED(void, glMultMatrixx, (const GLfixed * m))
SDL_PROC_UNUSED(void, glMultiTexCoord4x,
(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q))
SDL_PROC_UNUSED(void, glNormal3x, (GLfixed nx, GLfixed ny, GLfixed nz))
SDL_PROC_UNUSED(void, glNormalPointer, (GLenum type, GLsizei stride, const GLvoid *pointer))
SDL_PROC_UNUSED(void, glOrthox, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar))
SDL_PROC_UNUSED(void, glNormalPointer,
(GLenum type, GLsizei stride, const GLvoid * pointer))
SDL_PROC_UNUSED(void, glOrthox,
(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top,
GLfixed zNear, GLfixed zFar))
SDL_PROC(void, glPixelStorei, (GLenum pname, GLint param))
SDL_PROC_UNUSED(void, glPointParameterx, (GLenum pname, GLfixed param))
SDL_PROC_UNUSED(void, glPointParameterxv, (GLenum pname, const GLfixed *params))
SDL_PROC_UNUSED(void, glPointParameterxv,
(GLenum pname, const GLfixed * params))
SDL_PROC_UNUSED(void, glPointSizex, (GLfixed size))
SDL_PROC_UNUSED(void, glPolygonOffsetx, (GLfixed factor, GLfixed units))
SDL_PROC_UNUSED(void, glPopMatrix, (void))
SDL_PROC_UNUSED(void, glPushMatrix, (void))
SDL_PROC_UNUSED(void, glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels))
SDL_PROC_UNUSED(void, glRotatex, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z))
SDL_PROC_UNUSED(void, glReadPixels,
(GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type, GLvoid * pixels))
SDL_PROC_UNUSED(void, glRotatex,
(GLfixed angle, GLfixed x, GLfixed y, GLfixed z))
SDL_PROC_UNUSED(void, glSampleCoverage, (GLclampf value, GLboolean invert))
SDL_PROC_UNUSED(void, glSampleCoveragex, (GLclampx value, GLboolean invert))
SDL_PROC_UNUSED(void, glScalex, (GLfixed x, GLfixed y, GLfixed z))
......@@ -136,22 +195,36 @@ SDL_PROC_UNUSED(void, glShadeModel, (GLenum mode))
SDL_PROC_UNUSED(void, glStencilFunc, (GLenum func, GLint ref, GLuint mask))
SDL_PROC_UNUSED(void, glStencilMask, (GLuint mask))
SDL_PROC_UNUSED(void, glStencilOp, (GLenum fail, GLenum zfail, GLenum zpass))
SDL_PROC(void, glTexCoordPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer))
SDL_PROC(void, glTexCoordPointer,
(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer))
SDL_PROC_UNUSED(void, glTexEnvi, (GLenum target, GLenum pname, GLint param))
SDL_PROC_UNUSED(void, glTexEnvx, (GLenum target, GLenum pname, GLfixed param))
SDL_PROC_UNUSED(void, glTexEnviv, (GLenum target, GLenum pname, const GLint *params))
SDL_PROC_UNUSED(void, glTexEnvxv, (GLenum target, GLenum pname, const GLfixed *params))
SDL_PROC(void, glTexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
SDL_PROC_UNUSED(void, glTexEnviv,
(GLenum target, GLenum pname, const GLint * params))
SDL_PROC_UNUSED(void, glTexEnvxv,
(GLenum target, GLenum pname, const GLfixed * params))
SDL_PROC(void, glTexImage2D,
(GLenum target, GLint level, GLint internalformat, GLsizei width,
GLsizei height, GLint border, GLenum format, GLenum type,
const GLvoid * pixels))
SDL_PROC(void, glTexParameteri, (GLenum target, GLenum pname, GLint param))
SDL_PROC_UNUSED(void, glTexParameterx, (GLenum target, GLenum pname, GLfixed param))
SDL_PROC(void, glTexParameteriv, (GLenum target, GLenum pname, const GLint *params))
SDL_PROC_UNUSED(void, glTexParameterxv, (GLenum target, GLenum pname, const GLfixed *params))
SDL_PROC(void, glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels))
SDL_PROC_UNUSED(void, glTexParameterx,
(GLenum target, GLenum pname, GLfixed param))
SDL_PROC(void, glTexParameteriv,
(GLenum target, GLenum pname, const GLint * params))
SDL_PROC_UNUSED(void, glTexParameterxv,
(GLenum target, GLenum pname, const GLfixed * params))
SDL_PROC(void, glTexSubImage2D,
(GLenum target, GLint level, GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height, GLenum format, GLenum type,
const GLvoid * pixels))
SDL_PROC_UNUSED(void, glTranslatex, (GLfixed x, GLfixed y, GLfixed z))
SDL_PROC(void, glVertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer))
SDL_PROC(void, glVertexPointer,
(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer))
SDL_PROC(void, glViewport, (GLint x, GLint y, GLsizei width, GLsizei height))
/* extension functions used */
SDL_PROC(void, glDrawTexiOES, (GLint x, GLint y, GLint z, GLint width, GLint height))
SDL_PROC(void, glDrawTexiOES,
(GLint x, GLint y, GLint z, GLint width, GLint height))
/* vi: set ts=4 sw=4 expandtab: */
......@@ -39,38 +39,41 @@ static int GLES_ActivateRenderer(SDL_Renderer * renderer);
static int GLES_DisplayModeChanged(SDL_Renderer * renderer);
static int GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture);
static int GLES_QueryTexturePixels(SDL_Renderer * renderer,
SDL_Texture * texture, void **pixels,
int *pitch);
SDL_Texture * texture, void **pixels,
int *pitch);
static int GLES_SetTexturePalette(SDL_Renderer * renderer,
SDL_Texture * texture,
const SDL_Color * colors, int firstcolor,
int ncolors);
SDL_Texture * texture,
const SDL_Color * colors, int firstcolor,
int ncolors);
static int GLES_GetTexturePalette(SDL_Renderer * renderer,
SDL_Texture * texture, SDL_Color * colors,
int firstcolor, int ncolors);
SDL_Texture * texture, SDL_Color * colors,
int firstcolor, int ncolors);
static int GLES_SetTextureColorMod(SDL_Renderer * renderer,
SDL_Texture * texture);
SDL_Texture * texture);
static int GLES_SetTextureAlphaMod(SDL_Renderer * renderer,
SDL_Texture * texture);
SDL_Texture * texture);
static int GLES_SetTextureBlendMode(SDL_Renderer * renderer,
SDL_Texture * texture);
SDL_Texture * texture);
static int GLES_SetTextureScaleMode(SDL_Renderer * renderer,
SDL_Texture * texture);
SDL_Texture * texture);
static int GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, const void *pixels,
int pitch);
const SDL_Rect * rect, const void *pixels,
int pitch);
static int GLES_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, int markDirty, void **pixels,
int *pitch);
static void GLES_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
const SDL_Rect * rect, int markDirty,
void **pixels, int *pitch);
static void GLES_UnlockTexture(SDL_Renderer * renderer,
SDL_Texture * texture);
static void GLES_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture,
int numrects, const SDL_Rect * rects);
int numrects, const SDL_Rect * rects);
static int GLES_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b,
Uint8 a, const SDL_Rect * rect);
Uint8 a, const SDL_Rect * rect);
static int GLES_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_Rect * dstrect);
const SDL_Rect * srcrect,
const SDL_Rect * dstrect);
static void GLES_RenderPresent(SDL_Renderer * renderer);
static void GLES_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture);
static void GLES_DestroyTexture(SDL_Renderer * renderer,
SDL_Texture * texture);
static void GLES_DestroyRenderer(SDL_Renderer * renderer);
......@@ -87,11 +90,11 @@ SDL_RenderDriver GL_ES_RenderDriver = {
SDL_TEXTUREBLENDMODE_MOD),
(SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST |
SDL_TEXTURESCALEMODE_SLOW), 2,
{
SDL_PIXELFORMAT_RGB24,
SDL_PIXELFORMAT_ABGR8888,
},
0,
{
SDL_PIXELFORMAT_RGB24,
SDL_PIXELFORMAT_ABGR8888,
},
0,
0}
};
......@@ -100,18 +103,18 @@ typedef struct
SDL_GLContext context;
SDL_bool updateSize;
int blendMode;
#ifndef APIENTRY
#define APIENTRY
#endif
SDL_bool useDrawTexture;
SDL_bool GL_OES_draw_texture_supported;
/* OpenGL ES functions */
#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params;
#include "SDL_glesfuncs.h"
#undef SDL_PROC
SDL_bool useDrawTexture;
SDL_bool GL_OES_draw_texture_supported;
/* OpenGL ES functions */
#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params;
#include "SDL_glesfuncs.h"
#undef SDL_PROC
} GLES_RenderData;
......@@ -165,12 +168,12 @@ GLES_SetError(const char *prefix, GLenum result)
static int
GLES_LoadFunctions(GLES_RenderData * data)
{
#define SDL_PROC(ret,func,params) \
#define SDL_PROC(ret,func,params) \
data->func = func;
#include "SDL_glesfuncs.h"
#undef SDL_PROC
#include "SDL_glesfuncs.h"
#undef SDL_PROC
return 0;
}
......@@ -185,7 +188,7 @@ GLES_AddRenderDriver(_THIS)
SDL_Renderer *
GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
{
SDL_Renderer *renderer;
GLES_RenderData *data;
GLint value;
......@@ -232,9 +235,10 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
renderer->info = GL_ES_RenderDriver.info;
renderer->window = window->id;
renderer->driverdata = data;
renderer->info.flags = (SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED);
renderer->info.flags =
(SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED);
if (GLES_LoadFunctions(data) < 0) {
GLES_DestroyRenderer(renderer);
......@@ -265,15 +269,14 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
renderer->info.flags |= SDL_RENDERER_SINGLEBUFFER;
}
}
if (SDL_GL_ExtensionSupported("GL_OES_draw_texture")) {
data->GL_OES_draw_texture_supported = SDL_TRUE;
data->useDrawTexture = SDL_TRUE;
}
else {
data->GL_OES_draw_texture_supported = SDL_FALSE;
data->useDrawTexture = SDL_FALSE;
}
if (SDL_GL_ExtensionSupported("GL_OES_draw_texture")) {
data->GL_OES_draw_texture_supported = SDL_TRUE;
data->useDrawTexture = SDL_TRUE;
} else {
data->GL_OES_draw_texture_supported = SDL_FALSE;
data->useDrawTexture = SDL_FALSE;
}
data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
renderer->info.max_texture_width = value;
......@@ -284,18 +287,19 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
data->blendMode = -1;
data->glDisable(GL_DEPTH_TEST);
data->glDisable(GL_CULL_FACE);
data->glEnable(GL_TEXTURE_2D);
data->glEnable(GL_TEXTURE_2D);
data->updateSize = SDL_TRUE;
return renderer;
}
static int GLES_ActivateRenderer(SDL_Renderer * renderer)
static int
GLES_ActivateRenderer(SDL_Renderer * renderer)
{
GLES_RenderData *data = (GLES_RenderData *)renderer->driverdata;
GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
SDL_Window *window = SDL_GetWindowFromID(renderer->window);
if (SDL_GL_MakeCurrent(window->id, data->context) < 0) {
return -1;
}
......@@ -305,8 +309,8 @@ static int GLES_ActivateRenderer(SDL_Renderer * renderer)
data->glMatrixMode(GL_MODELVIEW);
data->glLoadIdentity();
data->glViewport(0, 0, window->w, window->h);
data->glOrthof(0.0, (GLfloat)window->w, (GLfloat)window->h, 0.0,
0.0, 1.0);
data->glOrthof(0.0, (GLfloat) window->w, (GLfloat) window->h, 0.0,
0.0, 1.0);
data->updateSize = SDL_FALSE;
}
return 0;
......@@ -342,55 +346,55 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
GLenum format, type;
int texture_w, texture_h;
GLenum result;
switch (texture->format) {
case SDL_PIXELFORMAT_INDEX1LSB:
case SDL_PIXELFORMAT_INDEX1MSB:
case SDL_PIXELFORMAT_INDEX8:
case SDL_PIXELFORMAT_RGB332:
case SDL_PIXELFORMAT_RGB444:
case SDL_PIXELFORMAT_RGB555:
case SDL_PIXELFORMAT_ARGB4444:
case SDL_PIXELFORMAT_ARGB1555:
case SDL_PIXELFORMAT_BGR24:
case SDL_PIXELFORMAT_BGR888:
case SDL_PIXELFORMAT_RGB888:
case SDL_PIXELFORMAT_RGBA8888:
case SDL_PIXELFORMAT_ARGB2101010:
case SDL_PIXELFORMAT_ARGB8888:
case SDL_PIXELFORMAT_RGB24:
internalFormat = GL_RGB;
format = GL_RGB;
type = GL_UNSIGNED_BYTE;
break;
case SDL_PIXELFORMAT_ABGR8888:
internalFormat = GL_RGBA;
format = GL_RGBA;
type = GL_UNSIGNED_BYTE;
break;
/*
These formats would be supported if SDL had the necessary pixel formats
case SDL_PIXELFORMAT_BGR565:
internalFormat = GL_RGB;
format = GL_RGB;
type = GL_UNSIGNED_SHORT_5_6_5;
break;
case SDL_PIXELFORMAT_ABGR5551:
internalFormat = GL_RGBA;
format = GL_RGBA;
type = GL_UNSIGNED_SHORT_5_5_5_1;
break;
case SDL_PIXELFORMAT_ABGR4444:
internalFormat = GL_RGBA;
format = GL_RGBA;
type = GL_UNSIGNED_SHORT_4_4_4_4;
break;
*/
default:
SDL_SetError("Unsupported texture format");
return -1;
}
data = (GLES_TextureData *) SDL_calloc(1, sizeof(*data));
switch (texture->format) {
case SDL_PIXELFORMAT_INDEX1LSB:
case SDL_PIXELFORMAT_INDEX1MSB:
case SDL_PIXELFORMAT_INDEX8:
case SDL_PIXELFORMAT_RGB332:
case SDL_PIXELFORMAT_RGB444:
case SDL_PIXELFORMAT_RGB555:
case SDL_PIXELFORMAT_ARGB4444:
case SDL_PIXELFORMAT_ARGB1555:
case SDL_PIXELFORMAT_BGR24:
case SDL_PIXELFORMAT_BGR888:
case SDL_PIXELFORMAT_RGB888:
case SDL_PIXELFORMAT_RGBA8888:
case SDL_PIXELFORMAT_ARGB2101010:
case SDL_PIXELFORMAT_ARGB8888:
case SDL_PIXELFORMAT_RGB24:
internalFormat = GL_RGB;
format = GL_RGB;
type = GL_UNSIGNED_BYTE;
break;
case SDL_PIXELFORMAT_ABGR8888:
internalFormat = GL_RGBA;
format = GL_RGBA;
type = GL_UNSIGNED_BYTE;
break;
/*
These formats would be supported if SDL had the necessary pixel formats
case SDL_PIXELFORMAT_BGR565:
internalFormat = GL_RGB;
format = GL_RGB;
type = GL_UNSIGNED_SHORT_5_6_5;
break;
case SDL_PIXELFORMAT_ABGR5551:
internalFormat = GL_RGBA;
format = GL_RGBA;
type = GL_UNSIGNED_SHORT_5_5_5_1;
break;
case SDL_PIXELFORMAT_ABGR4444:
internalFormat = GL_RGBA;
format = GL_RGBA;
type = GL_UNSIGNED_SHORT_4_4_4_4;
break;
*/
default:
SDL_SetError("Unsupported texture format");
return -1;
}
data = (GLES_TextureData *) SDL_calloc(1, sizeof(*data));
if (!data) {
SDL_OutOfMemory();
return -1;
......@@ -410,14 +414,14 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
renderdata->glGetError();
renderdata->glGenTextures(1, &data->texture);
data->type = GL_TEXTURE_2D;
/* no NPOV textures allowed in OpenGL ES (yet) */
texture_w = power_of_2(texture->w);
texture_h = power_of_2(texture->h);
data->texw = (GLfloat) texture->w / texture_w;
data->texh = (GLfloat) texture->h / texture_h;
data->type = GL_TEXTURE_2D;
/* no NPOV textures allowed in OpenGL ES (yet) */
texture_w = power_of_2(texture->w);
texture_h = power_of_2(texture->h);
data->texw = (GLfloat) texture->w / texture_w;
data->texh = (GLfloat) texture->h / texture_h;
data->format = format;
data->formattype = type;
renderdata->glBindTexture(data->type, data->texture);
......@@ -429,9 +433,9 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
GL_CLAMP_TO_EDGE);
renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_T,
GL_CLAMP_TO_EDGE);
renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w,
texture_h, 0, format, type, NULL);
renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w,
texture_h, 0, format, type, NULL);
result = renderdata->glGetError();
if (result != GL_NO_ERROR) {
......@@ -443,7 +447,7 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
static int
GLES_QueryTexturePixels(SDL_Renderer * renderer, SDL_Texture * texture,
void **pixels, int *pitch)
void **pixels, int *pitch)
{
GLES_TextureData *data = (GLES_TextureData *) texture->driverdata;
......@@ -454,17 +458,17 @@ GLES_QueryTexturePixels(SDL_Renderer * renderer, SDL_Texture * texture,
static int
GLES_SetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Color * colors, int firstcolor, int ncolors)
const SDL_Color * colors, int firstcolor, int ncolors)
{
SDL_SetError("OpenGL ES does not support paletted textures");
SDL_SetError("OpenGL ES does not support paletted textures");
return -1;
}
static int
GLES_GetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture,
SDL_Color * colors, int firstcolor, int ncolors)
SDL_Color * colors, int firstcolor, int ncolors)
{
SDL_SetError("OpenGL ES does not support paletted textures");
SDL_SetError("OpenGL ES does not support paletted textures");
return -1;
}
......@@ -472,10 +476,10 @@ static void
SetupTextureUpdate(GLES_RenderData * renderdata, SDL_Texture * texture,
int pitch)
{
GLES_TextureData *data = (GLES_TextureData *) texture->driverdata;
renderdata->glBindTexture(data->type, data->texture);
GLES_TextureData *data = (GLES_TextureData *) texture->driverdata;
renderdata->glBindTexture(data->type, data->texture);
renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
}
......@@ -518,7 +522,7 @@ GLES_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
return 0;
case SDL_TEXTURESCALEMODE_BEST:
SDL_Unsupported();
texture->scaleMode = SDL_TEXTURESCALEMODE_SLOW;
texture->scaleMode = SDL_TEXTURESCALEMODE_SLOW;
return -1;
default:
SDL_Unsupported();
......@@ -529,15 +533,15 @@ GLES_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
static int
GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, const void *pixels, int pitch)
const SDL_Rect * rect, const void *pixels, int pitch)
{
GLES_RenderData *renderdata = (GLES_RenderData *) renderer->driverdata;
GLES_TextureData *data = (GLES_TextureData *) texture->driverdata;
GLenum result;
SetupTextureUpdate(renderdata, texture, pitch);
renderdata->glGetError();
renderdata->glTexSubImage2D(data->type, 0, rect->x, rect->y, rect->w,
renderdata->glGetError();
renderdata->glTexSubImage2D(data->type, 0, rect->x, rect->y, rect->w,
rect->h, data->format, data->formattype,
pixels);
result = renderdata->glGetError();
......@@ -550,8 +554,8 @@ GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
static int
GLES_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, int markDirty, void **pixels,
int *pitch)
const SDL_Rect * rect, int markDirty, void **pixels,
int *pitch)
{
GLES_TextureData *data = (GLES_TextureData *) texture->driverdata;
......@@ -572,8 +576,8 @@ GLES_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
}
static void
GLES_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture, int numrects,
const SDL_Rect * rects)
GLES_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture,
int numrects, const SDL_Rect * rects)
{
GLES_TextureData *data = (GLES_TextureData *) texture->driverdata;
int i;
......@@ -585,44 +589,45 @@ GLES_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture, int numrects,
static int
GLES_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a,
const SDL_Rect * rect)
const SDL_Rect * rect)
{
GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
SDL_Window *window = SDL_GetWindowFromID(renderer->window);
/* set proper drawing color */
GLfloat oldClearColor[4];
data->glGetFloatv(GL_COLOR_CLEAR_VALUE, oldClearColor);
data->glClearColor((GLclampf) r * inv255f, (GLclampf) g * inv255f,
(GLclampf) b * inv255f, (GLclampf) a * inv255f);
data->glScissor(rect->x, window->h - rect->y - rect->h, rect->w, rect->h);
data->glEnable(GL_SCISSOR_TEST);
data->glClear(GL_COLOR_BUFFER_BIT);
data->glDisable(GL_SCISSOR_TEST);
/* reset clear color */
data->glClearColor(oldClearColor[0], oldClearColor[1], oldClearColor[2], oldClearColor[2]);
return 0;
/* set proper drawing color */
GLfloat oldClearColor[4];
data->glGetFloatv(GL_COLOR_CLEAR_VALUE, oldClearColor);
data->glClearColor((GLclampf) r * inv255f, (GLclampf) g * inv255f,
(GLclampf) b * inv255f, (GLclampf) a * inv255f);
data->glScissor(rect->x, window->h - rect->y - rect->h, rect->w, rect->h);
data->glEnable(GL_SCISSOR_TEST);
data->glClear(GL_COLOR_BUFFER_BIT);
data->glDisable(GL_SCISSOR_TEST);
/* reset clear color */
data->glClearColor(oldClearColor[0], oldClearColor[1], oldClearColor[2],
oldClearColor[2]);
return 0;
}
static int
GLES_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_Rect * dstrect)
const SDL_Rect * srcrect, const SDL_Rect * dstrect)
{
GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
GLES_TextureData *texturedata = (GLES_TextureData *) texture->driverdata;
int minx, miny, maxx, maxy;
GLfloat minu, maxu, minv, maxv;
int i;
void *temp_buffer; /* used for reformatting dirty rect pixels */
void *temp_ptr;
int i;
void *temp_buffer; /* used for reformatting dirty rect pixels */
void *temp_ptr;
if (texturedata->dirty.list) {
SDL_DirtyRect *dirty;
void *pixels;
......@@ -630,38 +635,40 @@ GLES_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
int pitch = texturedata->pitch;
SetupTextureUpdate(data, texture, pitch);
data->glBindTexture(texturedata->type, texturedata->texture);
for (dirty = texturedata->dirty.list; dirty; dirty = dirty->next) {
SDL_Rect *rect = &dirty->rect;
pixels = (void *) ((Uint8 *) texturedata->pixels + rect->y * pitch + rect->x * bpp);
/* There is no GL_UNPACK_ROW_LENGTH in OpenGLES
we must do this reformatting ourselves(!)
maybe it'd be a good idea to keep a temp buffer around
for this purpose rather than allocating it each time
*/
temp_buffer = SDL_malloc(rect->w * rect->h * bpp);
temp_ptr = temp_buffer;
for (i=0; i<rect->h; i++) {
SDL_memcpy(temp_ptr, pixels, rect->w * bpp);
temp_ptr += rect->w * bpp;
pixels += pitch;
}
pixels =
(void *) ((Uint8 *) texturedata->pixels + rect->y * pitch +
rect->x * bpp);
/* There is no GL_UNPACK_ROW_LENGTH in OpenGLES
we must do this reformatting ourselves(!)
maybe it'd be a good idea to keep a temp buffer around
for this purpose rather than allocating it each time
*/
temp_buffer = SDL_malloc(rect->w * rect->h * bpp);
temp_ptr = temp_buffer;
for (i = 0; i < rect->h; i++) {
SDL_memcpy(temp_ptr, pixels, rect->w * bpp);
temp_ptr += rect->w * bpp;
pixels += pitch;
}
data->glTexSubImage2D(texturedata->type, 0, rect->x, rect->y,
rect->w, rect->h, texturedata->format,
texturedata->formattype, temp_buffer);
SDL_free(temp_buffer);
SDL_free(temp_buffer);
}
SDL_ClearDirtyRects(&texturedata->dirty);
}
data->glBindTexture(texturedata->type, texturedata->texture);
data->glEnable(GL_TEXTURE_2D);
data->glEnable(GL_TEXTURE_2D);
if (texture->modMode) {
data->glColor4f((GLfloat) texture->r * inv255f,
(GLfloat) texture->g * inv255f,
......@@ -697,71 +704,80 @@ GLES_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
data->blendMode = texture->blendMode;
}
switch (texture->scaleMode) {
case SDL_TEXTURESCALEMODE_NONE:
case SDL_TEXTURESCALEMODE_FAST:
data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
GL_NEAREST);
data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
GL_NEAREST);
break;
case SDL_TEXTURESCALEMODE_SLOW:
case SDL_TEXTURESCALEMODE_BEST:
data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
GL_LINEAR);
data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
GL_LINEAR);
break;
}
if (data->GL_OES_draw_texture_supported && data->useDrawTexture) {
/* this code is a little funny because the viewport is upside down vs SDL's coordinate system */
SDL_Window *window = SDL_GetWindowFromID(renderer->window);
GLint cropRect[4];
cropRect[0] = srcrect->x;
cropRect[1] = srcrect->y + srcrect->h;
cropRect[2] = srcrect->w;
cropRect[3] = -srcrect->h;
data->glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, cropRect);
data->glDrawTexiOES(dstrect->x, window->h - dstrect->y - dstrect->h, 0, dstrect->w, dstrect->h);
}
else {
minx = dstrect->x;
miny = dstrect->y;
maxx = dstrect->x + dstrect->w;
maxy = dstrect->y + dstrect->h;
minu = (GLfloat) srcrect->x / texture->w;
minu *= texturedata->texw;
maxu = (GLfloat) (srcrect->x + srcrect->w) / texture->w;
maxu *= texturedata->texw;
minv = (GLfloat) srcrect->y / texture->h;
minv *= texturedata->texh;
maxv = (GLfloat) (srcrect->y + srcrect->h) / texture->h;
maxv *= texturedata->texh;
GLshort vertices[8];
GLfloat texCoords[8];
vertices[0] = minx; vertices[1] = miny;
vertices[2] = maxx; vertices[3] = miny;
vertices[4] = minx; vertices[5] = maxy;
vertices[6] = maxx; vertices[7] = maxy;
texCoords[0] = minu; texCoords[1] = minv;
texCoords[2] = maxu; texCoords[3] = minv;
texCoords[4] = minu; texCoords[5] = maxv;
texCoords[6] = maxu; texCoords[7] = maxv;
data->glVertexPointer(2, GL_SHORT, 0, vertices);
data->glEnableClientState(GL_VERTEX_ARRAY);
data->glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
data->glEnableClientState(GL_TEXTURE_COORD_ARRAY);
data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
switch (texture->scaleMode) {
case SDL_TEXTURESCALEMODE_NONE:
case SDL_TEXTURESCALEMODE_FAST:
data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
GL_NEAREST);
data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
GL_NEAREST);
break;
case SDL_TEXTURESCALEMODE_SLOW:
case SDL_TEXTURESCALEMODE_BEST:
data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
GL_LINEAR);
data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
GL_LINEAR);
break;
}
if (data->GL_OES_draw_texture_supported && data->useDrawTexture) {
/* this code is a little funny because the viewport is upside down vs SDL's coordinate system */
SDL_Window *window = SDL_GetWindowFromID(renderer->window);
GLint cropRect[4];
cropRect[0] = srcrect->x;
cropRect[1] = srcrect->y + srcrect->h;
cropRect[2] = srcrect->w;
cropRect[3] = -srcrect->h;
data->glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES,
cropRect);
data->glDrawTexiOES(dstrect->x, window->h - dstrect->y - dstrect->h,
0, dstrect->w, dstrect->h);
} else {
minx = dstrect->x;
miny = dstrect->y;
maxx = dstrect->x + dstrect->w;
maxy = dstrect->y + dstrect->h;
minu = (GLfloat) srcrect->x / texture->w;
minu *= texturedata->texw;
maxu = (GLfloat) (srcrect->x + srcrect->w) / texture->w;
maxu *= texturedata->texw;
minv = (GLfloat) srcrect->y / texture->h;
minv *= texturedata->texh;
maxv = (GLfloat) (srcrect->y + srcrect->h) / texture->h;
maxv *= texturedata->texh;
GLshort vertices[8];
GLfloat texCoords[8];
vertices[0] = minx;
vertices[1] = miny;
vertices[2] = maxx;
vertices[3] = miny;
vertices[4] = minx;
vertices[5] = maxy;
vertices[6] = maxx;
vertices[7] = maxy;
texCoords[0] = minu;
texCoords[1] = minv;
texCoords[2] = maxu;
texCoords[3] = minv;
texCoords[4] = minu;
texCoords[5] = maxv;
texCoords[6] = maxu;
texCoords[7] = maxv;
data->glVertexPointer(2, GL_SHORT, 0, vertices);
data->glEnableClientState(GL_VERTEX_ARRAY);
data->glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
data->glEnableClientState(GL_TEXTURE_COORD_ARRAY);
data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
return 0;
}
......@@ -781,7 +797,7 @@ GLES_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture)
return;
}
if (data->texture) {
glDeleteTextures(1, &data->texture);
glDeleteTextures(1, &data->texture);
}
if (data->pixels) {
SDL_free(data->pixels);
......
......@@ -37,95 +37,99 @@ typedef struct SDL_VideoDisplay SDL_VideoDisplay;
typedef struct SDL_VideoDevice SDL_VideoDevice;
/* Define the SDL texture structure */
struct SDL_Texture {
Uint32 id;
struct SDL_Texture
{
Uint32 id;
Uint32 format; /**< The pixel format of the texture */
int access; /**< SDL_TextureAccess */
int w; /**< The width of the texture */
int h; /**< The height of the texture */
int modMode;/**< The texture modulation mode */
int blendMode; /**< The texture blend mode */
int scaleMode; /**< The texture scale mode */
Uint8 r, g, b, a; /**< Texture modulation values */
Uint32 format; /**< The pixel format of the texture */
int access; /**< SDL_TextureAccess */
int w; /**< The width of the texture */
int h; /**< The height of the texture */
int modMode; /**< The texture modulation mode */
int blendMode; /**< The texture blend mode */
int scaleMode; /**< The texture scale mode */
Uint8 r, g, b, a; /**< Texture modulation values */
SDL_Renderer *renderer;
SDL_Renderer *renderer;
void *driverdata; /**< Driver specific texture representation */
void *driverdata; /**< Driver specific texture representation */
SDL_Texture *next;
SDL_Texture *next;
};
/* Define the SDL renderer structure */
struct SDL_Renderer {
int (*ActivateRenderer) (SDL_Renderer * renderer);
int (*DisplayModeChanged) (SDL_Renderer * renderer);
int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
int (*QueryTexturePixels) (SDL_Renderer * renderer, SDL_Texture * texture,
void **pixels, int *pitch);
int (*SetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Color * colors, int firstcolor,
int ncolors);
int (*GetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
SDL_Color * colors, int firstcolor,
int ncolors);
int (*SetTextureColorMod) (SDL_Renderer * renderer,
SDL_Texture * texture);
int (*SetTextureAlphaMod) (SDL_Renderer * renderer,
SDL_Texture * texture);
int (*SetTextureBlendMode) (SDL_Renderer * renderer,
SDL_Texture * texture);
int (*SetTextureScaleMode) (SDL_Renderer * renderer,
SDL_Texture * texture);
int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, const void *pixels,
int pitch);
int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, int markDirty, void **pixels,
int *pitch);
void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
int numrects, const SDL_Rect * rects);
int (*RenderFill) (SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b,
Uint8 a, const SDL_Rect * rect);
int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_Rect * dstrect);
void (*RenderPresent) (SDL_Renderer * renderer);
void (*DestroyTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
void (*DestroyRenderer) (SDL_Renderer * renderer);
/* The current renderer info */
SDL_RendererInfo info;
/* The window associated with the renderer */
SDL_WindowID window;
void *driverdata;
struct SDL_Renderer
{
int (*ActivateRenderer) (SDL_Renderer * renderer);
int (*DisplayModeChanged) (SDL_Renderer * renderer);
int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
int (*QueryTexturePixels) (SDL_Renderer * renderer, SDL_Texture * texture,
void **pixels, int *pitch);
int (*SetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Color * colors, int firstcolor,
int ncolors);
int (*GetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
SDL_Color * colors, int firstcolor,
int ncolors);
int (*SetTextureColorMod) (SDL_Renderer * renderer,
SDL_Texture * texture);
int (*SetTextureAlphaMod) (SDL_Renderer * renderer,
SDL_Texture * texture);
int (*SetTextureBlendMode) (SDL_Renderer * renderer,
SDL_Texture * texture);
int (*SetTextureScaleMode) (SDL_Renderer * renderer,
SDL_Texture * texture);
int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, const void *pixels,
int pitch);
int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, int markDirty, void **pixels,
int *pitch);
void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
int numrects, const SDL_Rect * rects);
int (*RenderFill) (SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b,
Uint8 a, const SDL_Rect * rect);
int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_Rect * dstrect);
void (*RenderPresent) (SDL_Renderer * renderer);
void (*DestroyTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
void (*DestroyRenderer) (SDL_Renderer * renderer);
/* The current renderer info */
SDL_RendererInfo info;
/* The window associated with the renderer */
SDL_WindowID window;
void *driverdata;
};
/* Define the SDL render driver structure */
struct SDL_RenderDriver {
SDL_Renderer *(*CreateRenderer) (SDL_Window * window, Uint32 flags);
struct SDL_RenderDriver
{
SDL_Renderer *(*CreateRenderer) (SDL_Window * window, Uint32 flags);
/* Info about the renderer capabilities */
SDL_RendererInfo info;
/* Info about the renderer capabilities */
SDL_RendererInfo info;
};
/* Define the SDL window structure, corresponding to toplevel windows */
struct SDL_Window {
Uint32 id;
struct SDL_Window
{
Uint32 id;
char *title;
int x, y;
int w, h;
Uint32 flags;
char *title;
int x, y;
int w, h;
Uint32 flags;
int display;
SDL_Renderer *renderer;
int display;
SDL_Renderer *renderer;
void *userdata;
void *driverdata;
void *userdata;
void *driverdata;
};
#define FULLSCREEN_VISIBLE(W) \
(((W)->flags & SDL_WINDOW_FULLSCREEN) && \
......@@ -136,177 +140,181 @@ struct SDL_Window {
* Define the SDL display structure This corresponds to physical monitors
* attached to the system.
*/
struct SDL_VideoDisplay {
int max_display_modes;
int num_display_modes;
SDL_DisplayMode *display_modes;
SDL_DisplayMode desktop_mode;
SDL_DisplayMode current_mode;
SDL_DisplayMode fullscreen_mode;
SDL_Palette *palette;
struct SDL_VideoDisplay
{
int max_display_modes;
int num_display_modes;
SDL_DisplayMode *display_modes;
SDL_DisplayMode desktop_mode;
SDL_DisplayMode current_mode;
SDL_DisplayMode fullscreen_mode;
SDL_Palette *palette;
Uint16 *gamma;
Uint16 *saved_gamma; /* (just offset into gamma) */
Uint16 *gamma;
Uint16 *saved_gamma; /* (just offset into gamma) */
int num_render_drivers;
SDL_RenderDriver *render_drivers;
int num_render_drivers;
SDL_RenderDriver *render_drivers;
int num_windows;
SDL_Window *windows;
int num_windows;
SDL_Window *windows;
SDL_Renderer *current_renderer;
SDL_Renderer *current_renderer;
/* The hash list of textures */
SDL_Texture *textures[64];
/* The hash list of textures */
SDL_Texture *textures[64];
SDL_VideoDevice *device;
SDL_VideoDevice *device;
void *driverdata;
void *driverdata;
};
/* Define the SDL video driver structure */
#define _THIS SDL_VideoDevice *_this
struct SDL_VideoDevice {
/* * * */
/* The name of this video driver */
const char *name;
/* * * */
/* Initialization/Query functions */
/*
* Initialize the native video subsystem, filling in the list of
* displays for this driver, returning 0 or -1 if there's an error.
*/
int (*VideoInit) (_THIS);
/*
* Reverse the effects VideoInit() -- called if VideoInit() fails or
* if the application is shutting down the video subsystem.
*/
void (*VideoQuit) (_THIS);
/* * * */
/*
* Display functions
*/
/*
* Get a list of the available display modes. e.g.
* SDL_AddDisplayMode(_this->current_display, mode)
*/
void (*GetDisplayModes) (_THIS);
/*
* Setting the display mode is independent of creating windows, so
* when the display mode is changed, all existing windows should have
* their data updated accordingly, including the display surfaces
* associated with them.
*/
int (*SetDisplayMode) (_THIS, SDL_DisplayMode * mode);
/* Set the color entries of the display palette */
int (*SetDisplayPalette) (_THIS, SDL_Palette * palette);
/* Get the color entries of the display palette */
int (*GetDisplayPalette) (_THIS, SDL_Palette * palette);
/* Set the gamma ramp */
int (*SetDisplayGammaRamp) (_THIS, Uint16 * ramp);
/* Get the gamma ramp */
int (*GetDisplayGammaRamp) (_THIS, Uint16 * ramp);
/* * * */
/*
* Window functions
*/
int (*CreateWindow) (_THIS, SDL_Window * window);
int (*CreateWindowFrom) (_THIS, SDL_Window * window, const void *data);
void (*SetWindowTitle) (_THIS, SDL_Window * window);
void (*SetWindowPosition) (_THIS, SDL_Window * window);
void (*SetWindowSize) (_THIS, SDL_Window * window);
void (*ShowWindow) (_THIS, SDL_Window * window);
void (*HideWindow) (_THIS, SDL_Window * window);
void (*RaiseWindow) (_THIS, SDL_Window * window);
void (*MaximizeWindow) (_THIS, SDL_Window * window);
void (*MinimizeWindow) (_THIS, SDL_Window * window);
void (*RestoreWindow) (_THIS, SDL_Window * window);
void (*SetWindowGrab) (_THIS, SDL_Window * window);
void (*DestroyWindow) (_THIS, SDL_Window * window);
/* Get some platform dependent window information */
SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,
struct SDL_SysWMinfo * info);
/* * * */
/*
* OpenGL support
*/
int (*GL_LoadLibrary) (_THIS, const char *path);
void *(*GL_GetProcAddress) (_THIS, const char *proc);
SDL_GLContext(*GL_CreateContext) (_THIS, SDL_Window * window);
int (*GL_MakeCurrent) (_THIS, SDL_Window * window, SDL_GLContext context);
int (*GL_SetSwapInterval) (_THIS, int interval);
int (*GL_GetSwapInterval) (_THIS);
void (*GL_SwapWindow) (_THIS, SDL_Window * window);
void (*GL_DeleteContext) (_THIS, SDL_GLContext context);
/* * * */
/*
* Event manager functions
*/
void (*PumpEvents) (_THIS);
/* * * */
/* Data common to all drivers */
int num_displays;
SDL_VideoDisplay *displays;
int current_display;
Uint32 next_object_id;
/* * * */
/* Data used by the GL drivers */
struct {
int red_size;
int green_size;
int blue_size;
int alpha_size;
int depth_size;
int buffer_size;
int stencil_size;
int double_buffer;
int accum_red_size;
int accum_green_size;
int accum_blue_size;
int accum_alpha_size;
int stereo;
int multisamplebuffers;
int multisamplesamples;
int accelerated;
int retained_backing;
int driver_loaded;
char driver_path[256];
void *dll_handle;
} gl_config;
/* * * */
/* Data private to this driver */
void *driverdata;
struct SDL_GLDriverData *gl_data;
/* * * */
/* The function used to dispose of this structure */
void (*free) (_THIS);
struct SDL_VideoDevice
{
/* * * */
/* The name of this video driver */
const char *name;
/* * * */
/* Initialization/Query functions */
/*
* Initialize the native video subsystem, filling in the list of
* displays for this driver, returning 0 or -1 if there's an error.
*/
int (*VideoInit) (_THIS);
/*
* Reverse the effects VideoInit() -- called if VideoInit() fails or
* if the application is shutting down the video subsystem.
*/
void (*VideoQuit) (_THIS);
/* * * */
/*
* Display functions
*/
/*
* Get a list of the available display modes. e.g.
* SDL_AddDisplayMode(_this->current_display, mode)
*/
void (*GetDisplayModes) (_THIS);
/*
* Setting the display mode is independent of creating windows, so
* when the display mode is changed, all existing windows should have
* their data updated accordingly, including the display surfaces
* associated with them.
*/
int (*SetDisplayMode) (_THIS, SDL_DisplayMode * mode);
/* Set the color entries of the display palette */
int (*SetDisplayPalette) (_THIS, SDL_Palette * palette);
/* Get the color entries of the display palette */
int (*GetDisplayPalette) (_THIS, SDL_Palette * palette);
/* Set the gamma ramp */
int (*SetDisplayGammaRamp) (_THIS, Uint16 * ramp);
/* Get the gamma ramp */
int (*GetDisplayGammaRamp) (_THIS, Uint16 * ramp);
/* * * */
/*
* Window functions
*/
int (*CreateWindow) (_THIS, SDL_Window * window);
int (*CreateWindowFrom) (_THIS, SDL_Window * window, const void *data);
void (*SetWindowTitle) (_THIS, SDL_Window * window);
void (*SetWindowPosition) (_THIS, SDL_Window * window);
void (*SetWindowSize) (_THIS, SDL_Window * window);
void (*ShowWindow) (_THIS, SDL_Window * window);
void (*HideWindow) (_THIS, SDL_Window * window);
void (*RaiseWindow) (_THIS, SDL_Window * window);
void (*MaximizeWindow) (_THIS, SDL_Window * window);
void (*MinimizeWindow) (_THIS, SDL_Window * window);
void (*RestoreWindow) (_THIS, SDL_Window * window);
void (*SetWindowGrab) (_THIS, SDL_Window * window);
void (*DestroyWindow) (_THIS, SDL_Window * window);
/* Get some platform dependent window information */
SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,
struct SDL_SysWMinfo * info);
/* * * */
/*
* OpenGL support
*/
int (*GL_LoadLibrary) (_THIS, const char *path);
void *(*GL_GetProcAddress) (_THIS, const char *proc);
SDL_GLContext(*GL_CreateContext) (_THIS, SDL_Window * window);
int (*GL_MakeCurrent) (_THIS, SDL_Window * window, SDL_GLContext context);
int (*GL_SetSwapInterval) (_THIS, int interval);
int (*GL_GetSwapInterval) (_THIS);
void (*GL_SwapWindow) (_THIS, SDL_Window * window);
void (*GL_DeleteContext) (_THIS, SDL_GLContext context);
/* * * */
/*
* Event manager functions
*/
void (*PumpEvents) (_THIS);
/* * * */
/* Data common to all drivers */
int num_displays;
SDL_VideoDisplay *displays;
int current_display;
Uint32 next_object_id;
/* * * */
/* Data used by the GL drivers */
struct
{
int red_size;
int green_size;
int blue_size;
int alpha_size;
int depth_size;
int buffer_size;
int stencil_size;
int double_buffer;
int accum_red_size;
int accum_green_size;
int accum_blue_size;
int accum_alpha_size;
int stereo;
int multisamplebuffers;
int multisamplesamples;
int accelerated;
int retained_backing;
int driver_loaded;
char driver_path[256];
void *dll_handle;
} gl_config;
/* * * */
/* Data private to this driver */
void *driverdata;
struct SDL_GLDriverData *gl_data;
/* * * */
/* The function used to dispose of this structure */
void (*free) (_THIS);
};
typedef struct VideoBootStrap {
const char *name;
const char *desc;
int (*available) (void);
SDL_VideoDevice *(*create) (int devindex);
} VideoBootStrap;
typedef struct VideoBootStrap
{
const char *name;
const char *desc;
int (*available) (void);
SDL_VideoDevice *(*create) (int devindex);
} VideoBootStrap;
#if SDL_VIDEO_DRIVER_COCOA
extern VideoBootStrap COCOA_bootstrap;
......@@ -381,26 +389,24 @@ extern VideoBootStrap NDS_bootstrap;
#define SDL_CurrentDisplay (_this->displays[_this->current_display])
extern SDL_VideoDevice *SDL_GetVideoDevice();
extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
extern int SDL_AddVideoDisplay(const SDL_VideoDisplay * display);
extern SDL_bool
SDL_AddDisplayMode(int displayIndex,
const SDL_DisplayMode * mode);
extern void
SDL_AddRenderDriver(int displayIndex,
const SDL_RenderDriver * driver);
extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
extern int SDL_AddVideoDisplay(const SDL_VideoDisplay * display);
extern SDL_bool
SDL_AddDisplayMode(int displayIndex, const SDL_DisplayMode * mode);
extern void
SDL_AddRenderDriver(int displayIndex, const SDL_RenderDriver * driver);
extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
extern SDL_Window *SDL_GetWindowFromID(SDL_WindowID windowID);
extern SDL_VideoDisplay *SDL_GetDisplayFromWindow(SDL_Window * window);
extern void SDL_OnWindowShown(SDL_Window * window);
extern void SDL_OnWindowHidden(SDL_Window * window);
extern void SDL_OnWindowResized(SDL_Window * window);
extern void SDL_OnWindowFocusGained(SDL_Window * window);
extern void SDL_OnWindowFocusLost(SDL_Window * window);
extern void SDL_OnWindowShown(SDL_Window * window);
extern void SDL_OnWindowHidden(SDL_Window * window);
extern void SDL_OnWindowResized(SDL_Window * window);
extern void SDL_OnWindowFocusGained(SDL_Window * window);
extern void SDL_OnWindowFocusLost(SDL_Window * window);
extern SDL_WindowID SDL_GetFocusWindow(void);
#endif /* _SDL_sysvideo_h */
#endif /* _SDL_sysvideo_h */
/* vi: set ts=4 sw=4 expandtab: */
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -292,7 +292,7 @@ SDL_NAME(XF86VidModeModeLine) * modeline;
_XRead(dpy, (char *) modeline->private,
modeline->privsize * sizeof(INT32));
} else {
zap_ptr((char *)&modeline->private, sizeof(modeline->private))
zap_ptr((char *) &modeline->private, sizeof(modeline->private))
}
UnlockDisplay(dpy);
SyncHandle();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment