Mercurial > sdl-ios-xcode
diff include/SDL_opengles.h @ 3087:0b6f51c29267
Date: Wed, 4 Mar 2009 15:38:22 +0200
From: "Mike Gorchak"
Subject: Re: About QNX support in SDL 1.3
Here is another batch of patches.
1) Makefile.in - added SDL_opengles.h header as header to install.
2) configure.in - Added special define to detect Common Lite OpenGL ES
library in case if Common library is not installed. Added check for
clock_gettime in libc (in QNX it is in libc).
3) SDL_config.h.in - Added SDL_VIDEO_RENDER_OPENGL_ES and
SDL_VIDEO_OPENGL_ES declarations for configure script autodetection.
4) SDL_opengles.h - Added GL_API definition if it is not defined. Added
extension GL_OES_draw_texture because OpenGL ES Renderer uses it without
declaration. Added GL_OES_vertex_buffer_object extension, which is supported
under QNX OpenGL ES. Added GL_OES_single_precision extension.
5) To the test directory I've added building OpenGL ES test applications
through the autotools suite. Was support for iPhone IDE building only.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 04 Mar 2009 15:10:47 +0000 |
parents | 0bc41e0361d3 |
children | 82e60908fab1 |
line wrap: on
line diff
--- a/include/SDL_opengles.h Wed Mar 04 09:35:32 2009 +0000 +++ b/include/SDL_opengles.h Wed Mar 04 15:10:47 2009 +0000 @@ -40,10 +40,6 @@ #include <OpenGLES/ES1/gl.h> /* Header File For The OpenGL ES Library */ #endif -#if defined(__QNXNTO__) && defined(SDL_VIDEO_OPENGL_ES) -#include <GLES/egl.h> -#endif - #ifndef APIENTRY #define APIENTRY #endif @@ -52,6 +48,9 @@ #define GL_APIENTRY #endif +#ifndef GL_API +#define GL_API +#endif /* GL_API */ /* ** License Applicability. Except to the extent portions of this file are @@ -659,6 +658,29 @@ #define GL_COORD_REPLACE_OES 0x8862 #endif +/* GL_OES_draw_texture */ +#ifndef GL_OES_draw_texture +#define GL_TEXTURE_CROP_RECT_OES 0x8B9D +#endif /* GL_OES_draw_texture */ + +/* GL_OES_vertex_buffer_object */ +#ifndef GL_OES_vertex_buffer_object +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_BUFFER_ACCESS 0x88BB +#endif /* GL_OES_vertex_buffer_object */ + /*************************************************************/ /* Available only in Common profile */ @@ -945,6 +967,42 @@ #define GL_OES_point_sprite 1 #endif +/* GL_OES_draw_texture */ +#ifndef GL_OES_draw_texture +#define GL_OES_draw_texture 1 + GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); + GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height); + GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); + GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords); + GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords); + GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords); + GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); + GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords); +#endif /* GL_OES_draw_texture */ + +/* GL_OES_single_precision */ +#ifndef GL_OES_single_precision +#define GL_OES_single_precision 1 + GL_API void GL_APIENTRY glDepthRangefOES (GLclampf zNear, GLclampf zFar); + GL_API void GL_APIENTRY glFrustumfOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); + GL_API void GL_APIENTRY glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); + GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation); + GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum pname, GLfloat eqn[4]); + GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth); +#endif /* GL_OES_single_precision */ + +/* GL_OES_vertex_buffer_object */ +#ifndef GL_OES_vertex_buffer_object +#define GL_OES_vertex_buffer_object 1 + GL_API void APIENTRY glBindBufferOES(GLenum, GLuint); + GL_API void APIENTRY glDeleteBuffersOES(GLsizei, const GLuint *); + GL_API void APIENTRY glGenBuffersOES(GLsizei, GLuint *); + GL_API GLboolean APIENTRY glIsBufferOES(GLuint); + GL_API void APIENTRY glBufferDataOES(GLenum, GLsizeiptr, const GLvoid *, GLenum); + GL_API void APIENTRY glBufferSubDataOES(GLenum, GLintptr, GLsizeiptr, const GLvoid *); + GL_API void APIENTRY glGetBufferParameterivOES(GLenum, GLenum, GLint *); +#endif /* GL_OES_vertex_buffer_object */ + #ifdef __cplusplus } #endif