Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
3086:0102ed19c21a | 3087:0b6f51c29267 |
---|---|
38 | 38 |
39 #ifdef __IPHONEOS__ | 39 #ifdef __IPHONEOS__ |
40 #include <OpenGLES/ES1/gl.h> /* Header File For The OpenGL ES Library */ | 40 #include <OpenGLES/ES1/gl.h> /* Header File For The OpenGL ES Library */ |
41 #endif | 41 #endif |
42 | 42 |
43 #if defined(__QNXNTO__) && defined(SDL_VIDEO_OPENGL_ES) | |
44 #include <GLES/egl.h> | |
45 #endif | |
46 | |
47 #ifndef APIENTRY | 43 #ifndef APIENTRY |
48 #define APIENTRY | 44 #define APIENTRY |
49 #endif | 45 #endif |
50 | 46 |
51 #ifndef GL_APIENTRY | 47 #ifndef GL_APIENTRY |
52 #define GL_APIENTRY | 48 #define GL_APIENTRY |
53 #endif | 49 #endif |
54 | 50 |
51 #ifndef GL_API | |
52 #define GL_API | |
53 #endif /* GL_API */ | |
55 | 54 |
56 /* | 55 /* |
57 ** License Applicability. Except to the extent portions of this file are | 56 ** License Applicability. Except to the extent portions of this file are |
58 ** made subject to an alternative license as permitted in the SGI Free | 57 ** made subject to an alternative license as permitted in the SGI Free |
59 ** Software License B, Version 1.0 (the "License"), the contents of this | 58 ** Software License B, Version 1.0 (the "License"), the contents of this |
656 /* GL_OES_point_sprite */ | 655 /* GL_OES_point_sprite */ |
657 #ifndef GL_OES_point_sprite | 656 #ifndef GL_OES_point_sprite |
658 #define GL_POINT_SPRITE_OES 0x8861 | 657 #define GL_POINT_SPRITE_OES 0x8861 |
659 #define GL_COORD_REPLACE_OES 0x8862 | 658 #define GL_COORD_REPLACE_OES 0x8862 |
660 #endif | 659 #endif |
660 | |
661 /* GL_OES_draw_texture */ | |
662 #ifndef GL_OES_draw_texture | |
663 #define GL_TEXTURE_CROP_RECT_OES 0x8B9D | |
664 #endif /* GL_OES_draw_texture */ | |
665 | |
666 /* GL_OES_vertex_buffer_object */ | |
667 #ifndef GL_OES_vertex_buffer_object | |
668 #define GL_ARRAY_BUFFER 0x8892 | |
669 #define GL_ELEMENT_ARRAY_BUFFER 0x8893 | |
670 #define GL_ARRAY_BUFFER_BINDING 0x8894 | |
671 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 | |
672 #define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 | |
673 #define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 | |
674 #define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 | |
675 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A | |
676 #define GL_STATIC_DRAW 0x88E4 | |
677 #define GL_DYNAMIC_DRAW 0x88E8 | |
678 #define GL_WRITE_ONLY 0x88B9 | |
679 #define GL_BUFFER_SIZE 0x8764 | |
680 #define GL_BUFFER_USAGE 0x8765 | |
681 #define GL_BUFFER_ACCESS 0x88BB | |
682 #endif /* GL_OES_vertex_buffer_object */ | |
661 | 683 |
662 /*************************************************************/ | 684 /*************************************************************/ |
663 | 685 |
664 /* Available only in Common profile */ | 686 /* Available only in Common profile */ |
665 GL_API void GL_APIENTRY glAlphaFunc(GLenum func, GLclampf ref); | 687 GL_API void GL_APIENTRY glAlphaFunc(GLenum func, GLclampf ref); |
943 /* GL_OES_point_sprite */ | 965 /* GL_OES_point_sprite */ |
944 #ifndef GL_OES_point_sprite | 966 #ifndef GL_OES_point_sprite |
945 #define GL_OES_point_sprite 1 | 967 #define GL_OES_point_sprite 1 |
946 #endif | 968 #endif |
947 | 969 |
970 /* GL_OES_draw_texture */ | |
971 #ifndef GL_OES_draw_texture | |
972 #define GL_OES_draw_texture 1 | |
973 GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); | |
974 GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height); | |
975 GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); | |
976 GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords); | |
977 GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords); | |
978 GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords); | |
979 GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); | |
980 GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords); | |
981 #endif /* GL_OES_draw_texture */ | |
982 | |
983 /* GL_OES_single_precision */ | |
984 #ifndef GL_OES_single_precision | |
985 #define GL_OES_single_precision 1 | |
986 GL_API void GL_APIENTRY glDepthRangefOES (GLclampf zNear, GLclampf zFar); | |
987 GL_API void GL_APIENTRY glFrustumfOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); | |
988 GL_API void GL_APIENTRY glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); | |
989 GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation); | |
990 GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum pname, GLfloat eqn[4]); | |
991 GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth); | |
992 #endif /* GL_OES_single_precision */ | |
993 | |
994 /* GL_OES_vertex_buffer_object */ | |
995 #ifndef GL_OES_vertex_buffer_object | |
996 #define GL_OES_vertex_buffer_object 1 | |
997 GL_API void APIENTRY glBindBufferOES(GLenum, GLuint); | |
998 GL_API void APIENTRY glDeleteBuffersOES(GLsizei, const GLuint *); | |
999 GL_API void APIENTRY glGenBuffersOES(GLsizei, GLuint *); | |
1000 GL_API GLboolean APIENTRY glIsBufferOES(GLuint); | |
1001 GL_API void APIENTRY glBufferDataOES(GLenum, GLsizeiptr, const GLvoid *, GLenum); | |
1002 GL_API void APIENTRY glBufferSubDataOES(GLenum, GLintptr, GLsizeiptr, const GLvoid *); | |
1003 GL_API void APIENTRY glGetBufferParameterivOES(GLenum, GLenum, GLint *); | |
1004 #endif /* GL_OES_vertex_buffer_object */ | |
1005 | |
948 #ifdef __cplusplus | 1006 #ifdef __cplusplus |
949 } | 1007 } |
950 #endif | 1008 #endif |
951 | 1009 |
952 #endif /* __gles_h_ */ | 1010 #endif /* __gles_h_ */ |