Fixed building on Android, added SDL_opengles2.h, removed unnecessary SDL_glesfuncs.h
--HG-- rename : src/video/SDL_glfuncs.h => src/render/opengl/SDL_glfuncs.h
This commit is contained in:
parent
cc1f36b7dc
commit
58e9ea986f
13 changed files with 152 additions and 1387 deletions
|
@ -31,8 +31,7 @@ LOCAL_SRC_FILES := \
|
|||
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/power/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/render/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/render/opengles/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/render/software/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/thread/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
|
||||
|
@ -41,6 +40,6 @@ LOCAL_SRC_FILES := \
|
|||
$(wildcard $(LOCAL_PATH)/src/video/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/video/android/*.c))
|
||||
|
||||
LOCAL_LDLIBS := -ldl -lGLESv1_CM -llog
|
||||
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
0402A85812FE70C600CECEE3 /* SDL_render_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85512FE70C600CECEE3 /* SDL_render_gles2.c */; };
|
||||
0402A85912FE70C600CECEE3 /* SDL_shaders_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85612FE70C600CECEE3 /* SDL_shaders_gles2.c */; };
|
||||
0402A85A12FE70C600CECEE3 /* SDL_shaders_gles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 0402A85712FE70C600CECEE3 /* SDL_shaders_gles2.h */; };
|
||||
04043B8D12FEA9350076DB1F /* SDL_opengles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 04043B8C12FEA9350076DB1F /* SDL_opengles2.h */; };
|
||||
041B2CD912FA0E9E0087D585 /* SDL_render.h in Headers */ = {isa = PBXBuildFile; fileRef = 041B2CD812FA0E9E0087D585 /* SDL_render.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
041B2CF112FA0F680087D585 /* SDL_render.c in Sources */ = {isa = PBXBuildFile; fileRef = 041B2CEA12FA0F680087D585 /* SDL_render.c */; };
|
||||
041B2CF212FA0F680087D585 /* SDL_sysrender.h in Headers */ = {isa = PBXBuildFile; fileRef = 041B2CEB12FA0F680087D585 /* SDL_sysrender.h */; };
|
||||
|
@ -89,8 +90,6 @@
|
|||
047677BC0EA76A31008ABAF1 /* SDL_haptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 047677B90EA76A31008ABAF1 /* SDL_haptic.c */; };
|
||||
047677BD0EA76A31008ABAF1 /* SDL_syshaptic.h in Headers */ = {isa = PBXBuildFile; fileRef = 047677BA0EA76A31008ABAF1 /* SDL_syshaptic.h */; };
|
||||
047AF1B30EA98D6C00811173 /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = 047AF1B20EA98D6C00811173 /* SDL_sysloadso.c */; };
|
||||
0495E68A0E97408800152DFE /* SDL_glesfuncs.h in Headers */ = {isa = PBXBuildFile; fileRef = 0495E6840E97408800152DFE /* SDL_glesfuncs.h */; };
|
||||
0495E68B0E97408800152DFE /* SDL_glfuncs.h in Headers */ = {isa = PBXBuildFile; fileRef = 0495E6850E97408800152DFE /* SDL_glfuncs.h */; };
|
||||
04B2ECEC1025CE4800F9BC5F /* SDL_atomic.h in Headers */ = {isa = PBXBuildFile; fileRef = 04B2ECE61025CE4800F9BC5F /* SDL_atomic.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
04B2ECED1025CE4800F9BC5F /* SDL_power.h in Headers */ = {isa = PBXBuildFile; fileRef = 04B2ECE71025CE4800F9BC5F /* SDL_power.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
04B2ECEE1025CE4800F9BC5F /* SDL_revision.h in Headers */ = {isa = PBXBuildFile; fileRef = 04B2ECE81025CE4800F9BC5F /* SDL_revision.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
|
@ -330,6 +329,7 @@
|
|||
0402A85512FE70C600CECEE3 /* SDL_render_gles2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render_gles2.c; sourceTree = "<group>"; };
|
||||
0402A85612FE70C600CECEE3 /* SDL_shaders_gles2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_shaders_gles2.c; sourceTree = "<group>"; };
|
||||
0402A85712FE70C600CECEE3 /* SDL_shaders_gles2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_gles2.h; sourceTree = "<group>"; };
|
||||
04043B8C12FEA9350076DB1F /* SDL_opengles2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_opengles2.h; path = ../../include/SDL_opengles2.h; sourceTree = SOURCE_ROOT; };
|
||||
041B2CD812FA0E9E0087D585 /* SDL_render.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_render.h; path = ../../include/SDL_render.h; sourceTree = SOURCE_ROOT; };
|
||||
041B2CEA12FA0F680087D585 /* SDL_render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render.c; sourceTree = "<group>"; };
|
||||
041B2CEB12FA0F680087D585 /* SDL_sysrender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysrender.h; sourceTree = "<group>"; };
|
||||
|
@ -354,8 +354,6 @@
|
|||
047677B90EA76A31008ABAF1 /* SDL_haptic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_haptic.c; path = ../../src/haptic/SDL_haptic.c; sourceTree = SOURCE_ROOT; };
|
||||
047677BA0EA76A31008ABAF1 /* SDL_syshaptic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_syshaptic.h; path = ../../src/haptic/SDL_syshaptic.h; sourceTree = SOURCE_ROOT; };
|
||||
047AF1B20EA98D6C00811173 /* SDL_sysloadso.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sysloadso.c; sourceTree = "<group>"; };
|
||||
0495E6840E97408800152DFE /* SDL_glesfuncs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_glesfuncs.h; sourceTree = "<group>"; };
|
||||
0495E6850E97408800152DFE /* SDL_glfuncs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_glfuncs.h; sourceTree = "<group>"; };
|
||||
04B2ECE61025CE4800F9BC5F /* SDL_atomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_atomic.h; path = ../../include/SDL_atomic.h; sourceTree = SOURCE_ROOT; };
|
||||
04B2ECE71025CE4800F9BC5F /* SDL_power.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_power.h; path = ../../include/SDL_power.h; sourceTree = SOURCE_ROOT; };
|
||||
04B2ECE81025CE4800F9BC5F /* SDL_revision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_revision.h; path = ../../include/SDL_revision.h; sourceTree = SOURCE_ROOT; };
|
||||
|
@ -941,6 +939,7 @@
|
|||
FD99B8E50DD52EB400FB1D6B /* SDL_name.h */,
|
||||
FD99B8E60DD52EB400FB1D6B /* SDL_opengl.h */,
|
||||
FD8BD7AB0E27DCA400B52CD5 /* SDL_opengles.h */,
|
||||
04043B8C12FEA9350076DB1F /* SDL_opengles2.h */,
|
||||
FD99B8E70DD52EB400FB1D6B /* SDL_pixels.h */,
|
||||
FD99B8E80DD52EB400FB1D6B /* SDL_platform.h */,
|
||||
04B2ECE71025CE4800F9BC5F /* SDL_power.h */,
|
||||
|
@ -1124,8 +1123,6 @@
|
|||
children = (
|
||||
FD689F090E26E5D900F90B21 /* uikit */,
|
||||
FDA685F40DF244C800F98A1A /* dummy */,
|
||||
0495E6850E97408800152DFE /* SDL_glfuncs.h */,
|
||||
0495E6840E97408800152DFE /* SDL_glesfuncs.h */,
|
||||
FDA683000DF2374E00F98A1A /* SDL_blit.c */,
|
||||
FDA683010DF2374E00F98A1A /* SDL_blit.h */,
|
||||
FDA683020DF2374E00F98A1A /* SDL_blit_0.c */,
|
||||
|
@ -1232,8 +1229,6 @@
|
|||
FD8BD7AC0E27DCA400B52CD5 /* SDL_opengles.h in Headers */,
|
||||
FDC656490E560DF800311C8E /* jumphack.h in Headers */,
|
||||
FD24846D0E5655AE0021E198 /* SDL_uikitkeyboard.h in Headers */,
|
||||
0495E68A0E97408800152DFE /* SDL_glesfuncs.h in Headers */,
|
||||
0495E68B0E97408800152DFE /* SDL_glfuncs.h in Headers */,
|
||||
047677BD0EA76A31008ABAF1 /* SDL_syshaptic.h in Headers */,
|
||||
04461DEE0EA76BA3006C462D /* SDL_haptic.h in Headers */,
|
||||
046387420F0B5B7D0041FD65 /* SDL_blit_slow.h in Headers */,
|
||||
|
@ -1267,6 +1262,7 @@
|
|||
0442EC4B12FE1BFF004C9285 /* SDL_hints.h in Headers */,
|
||||
0442EC5012FE1C1E004C9285 /* SDL_render_sw_c.h in Headers */,
|
||||
0402A85A12FE70C600CECEE3 /* SDL_shaders_gles2.h in Headers */,
|
||||
04043B8D12FEA9350076DB1F /* SDL_opengles2.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -142,5 +142,6 @@ typedef unsigned int size_t;
|
|||
/* Enable OpenGL ES */
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
|
||||
#endif /* _SDL_config_minimal_h */
|
||||
|
|
File diff suppressed because it is too large
Load diff
39
include/SDL_opengles2.h
Normal file
39
include/SDL_opengles2.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
SDL - Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2010 Sam Lantinga
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Sam Lantinga
|
||||
slouken@libsdl.org
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_opengles.h
|
||||
*
|
||||
* This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
|
||||
*/
|
||||
|
||||
#ifdef __IPHONEOS__
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#endif
|
||||
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
|
@ -3,6 +3,7 @@
|
|||
change it's entry from SDL_PROC_UNUSED to SDL_PROC and rebuild.
|
||||
*/
|
||||
#define SDL_PROC_UNUSED(ret,func,params)
|
||||
|
||||
SDL_PROC_UNUSED(void, glAccum, (GLenum, GLfloat))
|
||||
SDL_PROC_UNUSED(void, glAlphaFunc, (GLenum, GLclampf))
|
||||
SDL_PROC_UNUSED(GLboolean, glAreTexturesResident,
|
|
@ -88,7 +88,7 @@ typedef struct
|
|||
|
||||
/* OpenGL functions */
|
||||
#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params;
|
||||
#include "../../video/SDL_glfuncs.h"
|
||||
#include "SDL_glfuncs.h"
|
||||
#undef SDL_PROC
|
||||
|
||||
void (*glTextureRangeAPPLE) (GLenum target, GLsizei length,
|
||||
|
@ -161,7 +161,7 @@ GL_LoadFunctions(GL_RenderData * data)
|
|||
} while ( 0 );
|
||||
#endif /* __SDL_NOGETPROCADDR__ */
|
||||
|
||||
#include "../../video/SDL_glfuncs.h"
|
||||
#include "SDL_glfuncs.h"
|
||||
#undef SDL_PROC
|
||||
return 0;
|
||||
}
|
||||
|
@ -213,11 +213,6 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
|
||||
renderer->info.flags = SDL_RENDERER_ACCELERATED;
|
||||
|
||||
if (GL_LoadFunctions(data) < 0) {
|
||||
GL_DestroyRenderer(renderer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
data->context = SDL_GL_CreateContext(window);
|
||||
if (!data->context) {
|
||||
GL_DestroyRenderer(renderer);
|
||||
|
@ -227,6 +222,12 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
GL_DestroyRenderer(renderer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (GL_LoadFunctions(data) < 0) {
|
||||
GL_DestroyRenderer(renderer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef __MACOSX__
|
||||
/* Enable multi-threaded rendering */
|
||||
/* Disabled until Ryan finishes his VBO/PBO code...
|
||||
|
|
|
@ -88,18 +88,8 @@ typedef struct
|
|||
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 "../../video/SDL_glesfuncs.h"
|
||||
#undef SDL_PROC
|
||||
|
||||
} GLES_RenderData;
|
||||
|
||||
typedef struct
|
||||
|
@ -148,18 +138,6 @@ GLES_SetError(const char *prefix, GLenum result)
|
|||
SDL_SetError("%s: %s", prefix, error);
|
||||
}
|
||||
|
||||
static int
|
||||
GLES_LoadFunctions(GLES_RenderData * data)
|
||||
{
|
||||
|
||||
#define SDL_PROC(ret,func,params) \
|
||||
data->func = func;
|
||||
#include "../../video/SDL_glesfuncs.h"
|
||||
#undef SDL_PROC
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SDL_Renderer *
|
||||
GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
|
||||
{
|
||||
|
@ -206,11 +184,6 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
|
||||
renderer->info.flags = SDL_RENDERER_ACCELERATED;
|
||||
|
||||
if (GLES_LoadFunctions(data) < 0) {
|
||||
GLES_DestroyRenderer(renderer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
data->context = SDL_GL_CreateContext(window);
|
||||
if (!data->context) {
|
||||
GLES_DestroyRenderer(renderer);
|
||||
|
@ -243,19 +216,19 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
}
|
||||
#endif
|
||||
|
||||
data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
|
||||
renderer->info.max_texture_width = value;
|
||||
data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
|
||||
renderer->info.max_texture_height = value;
|
||||
|
||||
/* Set up parameters for rendering */
|
||||
data->blendMode = -1;
|
||||
data->glDisable(GL_DEPTH_TEST);
|
||||
data->glDisable(GL_CULL_FACE);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_CULL_FACE);
|
||||
data->updateSize = SDL_TRUE;
|
||||
|
||||
data->glEnableClientState(GL_VERTEX_ARRAY);
|
||||
data->glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
|
||||
return renderer;
|
||||
}
|
||||
|
@ -278,12 +251,12 @@ GLES_ActivateRenderer(SDL_Renderer * renderer)
|
|||
int w, h;
|
||||
|
||||
SDL_GetWindowSize(window, &w, &h);
|
||||
data->glMatrixMode(GL_PROJECTION);
|
||||
data->glLoadIdentity();
|
||||
data->glMatrixMode(GL_MODELVIEW);
|
||||
data->glLoadIdentity();
|
||||
data->glViewport(0, 0, w, h);
|
||||
data->glOrthof(0.0, (GLfloat) w, (GLfloat) h, 0.0, 0.0, 1.0);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
glViewport(0, 0, w, h);
|
||||
glOrthof(0.0, (GLfloat) w, (GLfloat) h, 0.0, 0.0, 1.0);
|
||||
data->updateSize = SDL_FALSE;
|
||||
}
|
||||
return 0;
|
||||
|
@ -353,9 +326,9 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
|||
|
||||
texture->driverdata = data;
|
||||
|
||||
renderdata->glGetError();
|
||||
renderdata->glEnable(GL_TEXTURE_2D);
|
||||
renderdata->glGenTextures(1, &data->texture);
|
||||
glGetError();
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glGenTextures(1, &data->texture);
|
||||
|
||||
data->type = GL_TEXTURE_2D;
|
||||
/* no NPOV textures allowed in OpenGL ES (yet) */
|
||||
|
@ -366,21 +339,21 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
|||
|
||||
data->format = format;
|
||||
data->formattype = type;
|
||||
renderdata->glBindTexture(data->type, data->texture);
|
||||
renderdata->glTexParameteri(data->type, GL_TEXTURE_MIN_FILTER,
|
||||
glBindTexture(data->type, data->texture);
|
||||
glTexParameteri(data->type, GL_TEXTURE_MIN_FILTER,
|
||||
GL_LINEAR);
|
||||
renderdata->glTexParameteri(data->type, GL_TEXTURE_MAG_FILTER,
|
||||
glTexParameteri(data->type, GL_TEXTURE_MAG_FILTER,
|
||||
GL_LINEAR);
|
||||
renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_S,
|
||||
glTexParameteri(data->type, GL_TEXTURE_WRAP_S,
|
||||
GL_CLAMP_TO_EDGE);
|
||||
renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_T,
|
||||
glTexParameteri(data->type, GL_TEXTURE_WRAP_T,
|
||||
GL_CLAMP_TO_EDGE);
|
||||
|
||||
renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w,
|
||||
glTexImage2D(data->type, 0, internalFormat, texture_w,
|
||||
texture_h, 0, format, type, NULL);
|
||||
renderdata->glDisable(GL_TEXTURE_2D);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
result = renderdata->glGetError();
|
||||
result = glGetError();
|
||||
if (result != GL_NO_ERROR) {
|
||||
GLES_SetError("glTexImage2D()", result);
|
||||
return -1;
|
||||
|
@ -402,10 +375,10 @@ GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
|
|||
|
||||
GLES_ActivateRenderer(renderer);
|
||||
|
||||
renderdata->glGetError();
|
||||
renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
renderdata->glEnable(data->type);
|
||||
renderdata->glBindTexture(data->type, data->texture);
|
||||
glGetError();
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
glEnable(data->type);
|
||||
glBindTexture(data->type, data->texture);
|
||||
|
||||
if( rect->w * bpp == pitch ) {
|
||||
temp_buffer = (void *)pixels; /* No need to reformat */
|
||||
|
@ -420,7 +393,7 @@ GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
|
|||
}
|
||||
}
|
||||
|
||||
renderdata->glTexSubImage2D(data->type, 0, rect->x, rect->y, rect->w,
|
||||
glTexSubImage2D(data->type, 0, rect->x, rect->y, rect->w,
|
||||
rect->h, data->format, data->formattype,
|
||||
temp_buffer);
|
||||
|
||||
|
@ -428,8 +401,8 @@ GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
|
|||
SDL_free(temp_buffer);
|
||||
}
|
||||
|
||||
renderdata->glDisable(data->type);
|
||||
result = renderdata->glGetError();
|
||||
glDisable(data->type);
|
||||
result = glGetError();
|
||||
if (result != GL_NO_ERROR) {
|
||||
GLES_SetError("glTexSubImage2D()", result);
|
||||
return -1;
|
||||
|
@ -458,13 +431,13 @@ GLES_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
|||
|
||||
GLES_ActivateRenderer(renderer);
|
||||
|
||||
renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
renderdata->glEnable(data->type);
|
||||
renderdata->glBindTexture(data->type, data->texture);
|
||||
renderdata->glTexSubImage2D(data->type, 0, 0, 0, texture->w,
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
glEnable(data->type);
|
||||
glBindTexture(data->type, data->texture);
|
||||
glTexSubImage2D(data->type, 0, 0, 0, texture->w,
|
||||
texture->h, data->format, data->formattype,
|
||||
data->pixels);
|
||||
renderdata->glDisable(data->type);
|
||||
glDisable(data->type);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -473,23 +446,23 @@ GLES_SetBlendMode(GLES_RenderData * data, int blendMode)
|
|||
if (blendMode != data->blendMode) {
|
||||
switch (blendMode) {
|
||||
case SDL_BLENDMODE_NONE:
|
||||
data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
data->glDisable(GL_BLEND);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
glDisable(GL_BLEND);
|
||||
break;
|
||||
case SDL_BLENDMODE_BLEND:
|
||||
data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
data->glEnable(GL_BLEND);
|
||||
data->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
break;
|
||||
case SDL_BLENDMODE_ADD:
|
||||
data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
data->glEnable(GL_BLEND);
|
||||
data->glBlendFunc(GL_SRC_ALPHA, GL_ONE);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
|
||||
break;
|
||||
case SDL_BLENDMODE_MOD:
|
||||
data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
data->glEnable(GL_BLEND);
|
||||
data->glBlendFunc(GL_ZERO, GL_SRC_COLOR);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_ZERO, GL_SRC_COLOR);
|
||||
break;
|
||||
}
|
||||
data->blendMode = blendMode;
|
||||
|
@ -508,7 +481,7 @@ GLES_RenderDrawPoints(SDL_Renderer * renderer, const SDL_Point * points,
|
|||
|
||||
GLES_SetBlendMode(data, renderer->blendMode);
|
||||
|
||||
data->glColor4f((GLfloat) renderer->r * inv255f,
|
||||
glColor4f((GLfloat) renderer->r * inv255f,
|
||||
(GLfloat) renderer->g * inv255f,
|
||||
(GLfloat) renderer->b * inv255f,
|
||||
(GLfloat) renderer->a * inv255f);
|
||||
|
@ -518,8 +491,8 @@ GLES_RenderDrawPoints(SDL_Renderer * renderer, const SDL_Point * points,
|
|||
vertices[2*i+0] = (GLshort)points[i].x;
|
||||
vertices[2*i+1] = (GLshort)points[i].y;
|
||||
}
|
||||
data->glVertexPointer(2, GL_SHORT, 0, vertices);
|
||||
data->glDrawArrays(GL_POINTS, 0, count);
|
||||
glVertexPointer(2, GL_SHORT, 0, vertices);
|
||||
glDrawArrays(GL_POINTS, 0, count);
|
||||
SDL_stack_free(vertices);
|
||||
|
||||
return 0;
|
||||
|
@ -537,7 +510,7 @@ GLES_RenderDrawLines(SDL_Renderer * renderer, const SDL_Point * points,
|
|||
|
||||
GLES_SetBlendMode(data, renderer->blendMode);
|
||||
|
||||
data->glColor4f((GLfloat) renderer->r * inv255f,
|
||||
glColor4f((GLfloat) renderer->r * inv255f,
|
||||
(GLfloat) renderer->g * inv255f,
|
||||
(GLfloat) renderer->b * inv255f,
|
||||
(GLfloat) renderer->a * inv255f);
|
||||
|
@ -547,14 +520,14 @@ GLES_RenderDrawLines(SDL_Renderer * renderer, const SDL_Point * points,
|
|||
vertices[2*i+0] = (GLshort)points[i].x;
|
||||
vertices[2*i+1] = (GLshort)points[i].y;
|
||||
}
|
||||
data->glVertexPointer(2, GL_SHORT, 0, vertices);
|
||||
glVertexPointer(2, GL_SHORT, 0, vertices);
|
||||
if (count > 2 &&
|
||||
points[0].x == points[count-1].x && points[0].y == points[count-1].y) {
|
||||
/* GL_LINE_LOOP takes care of the final segment */
|
||||
--count;
|
||||
data->glDrawArrays(GL_LINE_LOOP, 0, count);
|
||||
glDrawArrays(GL_LINE_LOOP, 0, count);
|
||||
} else {
|
||||
data->glDrawArrays(GL_LINE_STRIP, 0, count);
|
||||
glDrawArrays(GL_LINE_STRIP, 0, count);
|
||||
}
|
||||
SDL_stack_free(vertices);
|
||||
|
||||
|
@ -572,7 +545,7 @@ GLES_RenderFillRects(SDL_Renderer * renderer, const SDL_Rect ** rects,
|
|||
|
||||
GLES_SetBlendMode(data, renderer->blendMode);
|
||||
|
||||
data->glColor4f((GLfloat) renderer->r * inv255f,
|
||||
glColor4f((GLfloat) renderer->r * inv255f,
|
||||
(GLfloat) renderer->g * inv255f,
|
||||
(GLfloat) renderer->b * inv255f,
|
||||
(GLfloat) renderer->a * inv255f);
|
||||
|
@ -593,8 +566,8 @@ GLES_RenderFillRects(SDL_Renderer * renderer, const SDL_Rect ** rects,
|
|||
vertices[6] = maxx;
|
||||
vertices[7] = maxy;
|
||||
|
||||
data->glVertexPointer(2, GL_SHORT, 0, vertices);
|
||||
data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||
glVertexPointer(2, GL_SHORT, 0, vertices);
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -615,17 +588,17 @@ GLES_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
|
|||
|
||||
GLES_ActivateRenderer(renderer);
|
||||
|
||||
data->glEnable(GL_TEXTURE_2D);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
data->glBindTexture(texturedata->type, texturedata->texture);
|
||||
glBindTexture(texturedata->type, texturedata->texture);
|
||||
|
||||
if (texture->modMode) {
|
||||
data->glColor4f((GLfloat) texture->r * inv255f,
|
||||
glColor4f((GLfloat) texture->r * inv255f,
|
||||
(GLfloat) texture->g * inv255f,
|
||||
(GLfloat) texture->b * inv255f,
|
||||
(GLfloat) texture->a * inv255f);
|
||||
} else {
|
||||
data->glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
}
|
||||
|
||||
GLES_SetBlendMode(data, texture->blendMode);
|
||||
|
@ -641,9 +614,9 @@ GLES_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
|
|||
cropRect[1] = srcrect->y + srcrect->h;
|
||||
cropRect[2] = srcrect->w;
|
||||
cropRect[3] = -srcrect->h;
|
||||
data->glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES,
|
||||
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES,
|
||||
cropRect);
|
||||
data->glDrawTexiOES(dstrect->x, h - dstrect->y - dstrect->h, 0,
|
||||
glDrawTexiOES(dstrect->x, h - dstrect->y - dstrect->h, 0,
|
||||
dstrect->w, dstrect->h);
|
||||
} else {
|
||||
|
||||
|
@ -682,12 +655,12 @@ GLES_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
|
|||
texCoords[6] = maxu;
|
||||
texCoords[7] = maxv;
|
||||
|
||||
data->glVertexPointer(2, GL_SHORT, 0, vertices);
|
||||
data->glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
|
||||
data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||
glVertexPointer(2, GL_SHORT, 0, vertices);
|
||||
glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||
}
|
||||
|
||||
data->glDisable(GL_TEXTURE_2D);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -25,13 +25,7 @@
|
|||
|
||||
#if SDL_VIDEO_RENDER_OGL_ES2
|
||||
|
||||
#ifdef __IPHONEOS__
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#endif
|
||||
#include "SDL_opengles2.h"
|
||||
#include "../SDL_sysrender.h"
|
||||
#include "SDL_shaders_gles2.h"
|
||||
|
||||
|
@ -1098,6 +1092,8 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags)
|
|||
renderer->window = window;
|
||||
renderer->driverdata = rdata;
|
||||
|
||||
renderer->info.flags = SDL_RENDERER_ACCELERATED;
|
||||
|
||||
/* Create the GL context */
|
||||
rdata->context = SDL_GL_CreateContext(window);
|
||||
if (!rdata->context)
|
||||
|
|
|
@ -25,14 +25,8 @@
|
|||
|
||||
#if SDL_VIDEO_RENDER_OGL_ES2
|
||||
|
||||
#ifdef __IPHONEOS__
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#endif
|
||||
#include "SDL_video.h"
|
||||
#include "SDL_opengles2.h"
|
||||
#include "SDL_shaders_gles2.h"
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
|
|
|
@ -28,12 +28,6 @@
|
|||
#ifndef SDL_shaderdata_h_
|
||||
#define SDL_shaderdata_h_
|
||||
|
||||
#ifdef __IPHONEOS__
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#endif
|
||||
|
||||
typedef struct GLES2_ShaderInstance
|
||||
{
|
||||
GLenum type;
|
||||
|
|
|
@ -1,229 +0,0 @@
|
|||
/* list of OpenGL ES functions sorted alphabetically
|
||||
If you need to use a GLES function from the SDL video subsystem,
|
||||
change it's entry from SDL_PROC_UNUSED to SDL_PROC and rebuild.
|
||||
*/
|
||||
#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_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, 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, 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_UNUSED(void, glLightModelf, (GLenum pname, GLfloat param))
|
||||
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, glLineWidth, (GLfloat width))
|
||||
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, 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_UNUSED(void, glPointParameterf, (GLenum pname, GLfloat param))
|
||||
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, 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(void, glTexParameterf, (GLenum target, GLenum pname, GLfloat param))
|
||||
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 */
|
||||
SDL_PROC_UNUSED(void, glActiveTexture, (GLenum texture))
|
||||
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(void, glClear, (GLbitfield mask))
|
||||
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(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, 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(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(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, 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, 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(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, 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, 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, glLightx, (GLenum light, GLenum pname, GLfixed param))
|
||||
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, 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(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, 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(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, 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, 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))
|
||||
SDL_PROC(void, glScissor, (GLint x, GLint y, GLsizei width, GLsizei height))
|
||||
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_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(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, glTranslatex, (GLfixed x, GLfixed y, GLfixed z))
|
||||
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))
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -56,7 +56,7 @@ SDL_GLContext
|
|||
Android_GL_CreateContext(_THIS, SDL_Window * window)
|
||||
{
|
||||
Android_JNI_CreateContext();
|
||||
return 1;
|
||||
return (SDL_GLContext)1;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue