Merge branch 'sdl_android' of github.com:pelya/commandergenius into python3_testing
This commit is contained in:
@@ -7,10 +7,10 @@ AppName="Ninslash"
|
||||
AppFullName=ninslash.com
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=02117
|
||||
AppVersionCode=02219
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="0.2.1.17"
|
||||
AppVersionName="0.2.2.19"
|
||||
|
||||
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
|
||||
# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu
|
||||
|
||||
@@ -41,8 +41,6 @@ LOCAL_SRC_FILES := \
|
||||
src/gl/texture.c \
|
||||
src/gl/wrap/gl.c \
|
||||
src/gl/wrap/gles.c \
|
||||
src/gl/wrap/gles2.c \
|
||||
src/gl/wrap/glesext.c \
|
||||
src/gl/wrap/glstub.c \
|
||||
src/gl/math/eval.c \
|
||||
src/glx/hardext.c \
|
||||
|
||||
@@ -235,7 +235,10 @@ VAO Caching
|
||||
Version history
|
||||
----
|
||||
|
||||
##### current version
|
||||
##### 0.9.4
|
||||
* Fixed some extended functions (like glBlendFuncSeparate) not working inside list (fixing some issues with Batch mode)
|
||||
* Added back GL_TEXTURE_RECTANGLE_ARB handling (and using npot texture, even limited, if available)
|
||||
* Added tracking of Lights and Materials
|
||||
* Fixed (Added in fact) support for Multisampling on the GLX Context creation (a bit hacky, but seems to works)
|
||||
* Added LIBGL_NODOWNSAMPLING and associated Hint
|
||||
* Try to implement some caching on VAO to avoid some memcpy in renderlist (with a way to disable it just in case)
|
||||
|
||||
@@ -2,18 +2,16 @@
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
base=../src/
|
||||
gles1=$(ls -1 yml/*-1.1.yml | tr '\n' ',' | sed -e 's/,$//')
|
||||
if [ -e yml/gles-1.1-full.yml ]; then rm yml/gles-1.1-full.yml ;fi
|
||||
touch yml/gles-1.1-full.yml
|
||||
cat yml/*-1.1.yml >> yml/gles-1.1-full.yml
|
||||
gles1=$(ls -1 yml/*-1.1-full.yml | tr '\n' ',' | sed -e 's/,$//')
|
||||
gles=$(ls -1 yml/*es-1.1.yml | tr '\n' ',' | sed -e 's/,$//')
|
||||
glext=$(ls -1 yml/*ext-1.1.yml | tr '\n' ',' | sed -e 's/,$//')
|
||||
#gles2=$(ls -1 yml/*-2.0.yml | tr '\n' ',' | sed -e 's/,$//')
|
||||
|
||||
./gen.py "$gles" --ifndef USE_ES2 gleswrap.c.j2 gleswrap.c gles.h > "$base/gl/wrap/gles.c"
|
||||
./gen.py "$glext" --ifndef USE_ES2 glextwrap.c.j2 glextwrap.c gles.h > "$base/gl/wrap/glesext.c"
|
||||
./gen.py "$gles1" --ifndef USE_ES2 glwrap.h.j2 gleswrap.h ../gl.h > "$base/gl/wrap/gles.h"
|
||||
./gen.py "$gles1" --ifndef USE_ES2 glxfuncs.j2 glxfuncs.inc ../gl/gl.h > "$base/glx/glesfuncs.inc"
|
||||
#./gen.py "$gles" gleswrap.c.j2 gleswrap.c gles.h > "$base/gl/wrap/gles.c"
|
||||
#./gen.py "$glext" glextwrap.c.j2 glextwrap.c gles.h > "$base/gl/wrap/glesext.c"
|
||||
./gen.py "$gles1" gleswrap.c.j2 gleswrap.c gles.h > "$base/gl/wrap/gles.c"
|
||||
./gen.py "$gles1" glwrap.h.j2 gleswrap.h ../gl.h > "$base/gl/wrap/gles.h"
|
||||
./gen.py "$gles1" glxfuncs.j2 glxfuncs.inc ../gl/gl.h > "$base/glx/glesfuncs.inc"
|
||||
|
||||
#./gen.py "$gles2" --ifdef USE_ES2 gleswrap.c.j2 gles2wrap.c gles2.h > "$base/gl/wrap/gles2.c"
|
||||
#./gen.py "$gles2" --ifdef USE_ES2 glwrap.h.j2 gles2wrap.h ../gl.h > "$base/gl/wrap/gles2.h"
|
||||
#./gen.py "$gles2" --ifdef USE_ES2 glxfuncs.j2 gles2funcs.inc ../gl/gl.h > "$base/glx/gles2funcs.inc"
|
||||
|
||||
# ./gen.py "yml/egl.yml" eglwrap.c.j2 eglwrap.c "<GLES/egl.h>" > "$base/gl/wrap/egl.c" &
|
||||
|
||||
@@ -91,6 +91,11 @@ def gen(files, template, guard_name, headers,
|
||||
else:
|
||||
ret = 'void'
|
||||
|
||||
loadlib = 'LOAD_GLES'
|
||||
if name.endswith('_OES_'):
|
||||
loadlib = 'LOAD_GLES_OES'
|
||||
name = name[:-5]
|
||||
|
||||
args = [split_arg(arg) for arg in args if not arg == 'void']
|
||||
if any(arg.get('type') == 'unknown' for arg in args):
|
||||
continue
|
||||
@@ -112,6 +117,7 @@ def gen(files, template, guard_name, headers,
|
||||
'args': args,
|
||||
'types': types,
|
||||
'void': ret == 'void',
|
||||
'loadlib': loadlib,
|
||||
})
|
||||
if not types in unique_formats:
|
||||
unique_formats.add(types)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{% include "base/headers.j2" %}
|
||||
{% for func in functions %}
|
||||
{% block definition scoped %}
|
||||
{{ func.return }} glshim_{{ func.name }}({{ func.args|args }}) {
|
||||
{{ func.return }} gl4es_{{ func.name }}({{ func.args|args }}) {
|
||||
{% block load scoped %}{% endblock %}
|
||||
{% block call scoped %}
|
||||
{% if not func.void %}return {% endif %}{% block prefix %}wrap{% endblock %}_{{ func.name }}({{ func.args|args(0) }});
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#endif
|
||||
{% endblock %}
|
||||
{% block load %}
|
||||
LOAD_GLES({{ func.name }});
|
||||
{{ func.loadlib }}({{ func.name }});
|
||||
{% endblock %}
|
||||
{% block call %}
|
||||
#ifndef direct_{{ func.name }}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#endif
|
||||
{% endblock %}
|
||||
{% block load %}
|
||||
LOAD_GLES_OES({{ func.name }});
|
||||
{{ func.loadlib }}({{ func.name }});
|
||||
{% endblock %}
|
||||
{% block call %}
|
||||
#ifndef direct_{{ func.name }}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#define push_{{ func.name }}({{ func.args|args(0) }}) { \
|
||||
{{ func.name }}_PACKED *packed_data = malloc(sizeof({{ func.name }}_PACKED)); \
|
||||
packed_data->format = {{ func.name }}_FORMAT; \
|
||||
packed_data->func = glshim_{{ func.name }}; \
|
||||
packed_data->func = gl4es_{{ func.name }}; \
|
||||
{% if func.args %}
|
||||
{% for arg in func.args %}
|
||||
packed_data->args.a{{ loop.index }} = ({{ arg.type|unconst }}){{ arg.name }}; \
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
glBlendColor: [void, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha]
|
||||
glBlendEquation: [void, GLenum mode]
|
||||
glBlendEquationSeparate: [void, GLenum modeRGB, GLenum modeA]
|
||||
glBlendFuncSeparate: [void, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha]
|
||||
# glTexGenfOES: [void, GLenum coord, GLenum pname, GLfloat param]
|
||||
glTexGenfv: [void, GLenum coord, GLenum pname, "const GLfloat *params"]
|
||||
glTexGeni: [void, GLenum coord, GLenum pname, GLint param]
|
||||
# glTexGenivOES: [void, GLenum coord, GLenum pname, "const GLint *params"]
|
||||
glBlendColor_OES_: [void, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha]
|
||||
glBlendEquation_OES_: [void, GLenum mode]
|
||||
glBlendEquationSeparate_OES_: [void, GLenum modeRGB, GLenum modeA]
|
||||
glBlendFuncSeparate_OES_: [void, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha]
|
||||
# glTexGenfOES_OES_: [void, GLenum coord, GLenum pname, GLfloat param]
|
||||
glTexGenfv_OES_: [void, GLenum coord, GLenum pname, "const GLfloat *params"]
|
||||
glTexGeni_OES_: [void, GLenum coord, GLenum pname, GLint param]
|
||||
# glTexGenivOES_OES_: [void, GLenum coord, GLenum pname, "const GLint *params"]
|
||||
|
||||
glGenFramebuffers: [void, GLsizei n, "GLuint *ids"]
|
||||
glDeleteFramebuffers: [void, GLsizei n, "GLuint *framebuffers"]
|
||||
glIsFramebuffer: [GLboolean, GLuint framebuffer]
|
||||
glCheckFramebufferStatus: [GLenum, GLenum target]
|
||||
glBindFramebuffer: [void, GLenum target, GLuint framebuffer]
|
||||
glFramebufferTexture2D: [void, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level]
|
||||
glGenRenderbuffers: [void, GLsizei n, "GLuint *renderbuffers"]
|
||||
glFramebufferRenderbuffer: [void, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer]
|
||||
glDeleteRenderbuffers: [void, GLsizei n, "GLuint *renderbuffers"]
|
||||
glRenderbufferStorage: [void, GLenum target, GLenum internalformat, GLsizei width, GLsizei height]
|
||||
glBindRenderbuffer: [void, GLenum target, GLuint renderbuffer]
|
||||
glIsRenderbuffer: [GLboolean, GLuint renderbuffer]
|
||||
glGenerateMipmap: [void, GLenum target]
|
||||
glGetFramebufferAttachmentParameteriv: [void, GLenum target, GLenum attachment, GLenum pname, "GLint *params"]
|
||||
glGetRenderbufferParameteriv: [void, GLenum target, GLenum pname, "GLint * params"]
|
||||
glGenFramebuffers_OES_: [void, GLsizei n, "GLuint *ids"]
|
||||
glDeleteFramebuffers_OES_: [void, GLsizei n, "GLuint *framebuffers"]
|
||||
glIsFramebuffer_OES_: [GLboolean, GLuint framebuffer]
|
||||
glCheckFramebufferStatus_OES_: [GLenum, GLenum target]
|
||||
glBindFramebuffer_OES_: [void, GLenum target, GLuint framebuffer]
|
||||
glFramebufferTexture2D_OES_: [void, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level]
|
||||
glGenRenderbuffers_OES_: [void, GLsizei n, "GLuint *renderbuffers"]
|
||||
glFramebufferRenderbuffer_OES_: [void, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer]
|
||||
glDeleteRenderbuffers_OES_: [void, GLsizei n, "GLuint *renderbuffers"]
|
||||
glRenderbufferStorage_OES_: [void, GLenum target, GLenum internalformat, GLsizei width, GLsizei height]
|
||||
glBindRenderbuffer_OES_: [void, GLenum target, GLuint renderbuffer]
|
||||
glIsRenderbuffer_OES_: [GLboolean, GLuint renderbuffer]
|
||||
glGenerateMipmap_OES_: [void, GLenum target]
|
||||
glGetFramebufferAttachmentParameteriv_OES_: [void, GLenum target, GLenum attachment, GLenum pname, "GLint *params"]
|
||||
glGetRenderbufferParameteriv_OES_: [void, GLenum target, GLenum pname, "GLint * params"]
|
||||
|
||||
glDrawTexi: [void, GLint x, GLint y, GLint z, GLint width, GLint height]
|
||||
glDrawTexf: [void, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height]
|
||||
glDrawTexi_OES_: [void, GLint x, GLint y, GLint z, GLint width, GLint height]
|
||||
glDrawTexf_OES_: [void, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height]
|
||||
|
||||
glMultiDrawArrays: [void, GLenum mode, "const GLint *first", "const GLsizei *count", GLsizei primcount]
|
||||
glMultiDrawElements: [void, GLenum mode, "GLsizei *count", GLenum type, "const void * const *indices", GLsizei primcount]
|
||||
glMultiDrawArrays_OES_: [void, GLenum mode, "const GLint *first", "const GLsizei *count", GLsizei primcount]
|
||||
glMultiDrawElements_OES_: [void, GLenum mode, "GLsizei *count", GLenum type, "const void * const *indices", GLsizei primcount]
|
||||
|
||||
@@ -28,8 +28,6 @@ SET(GL_SRC
|
||||
gl/texture.c
|
||||
gl/wrap/gl.c
|
||||
gl/wrap/gles.c
|
||||
gl/wrap/gles2.c
|
||||
gl/wrap/glesext.c
|
||||
gl/wrap/glstub.c
|
||||
gl/math/eval.c
|
||||
)
|
||||
@@ -67,7 +65,6 @@ SET(GL_H
|
||||
gl/texture.h
|
||||
gl/math/eval.h
|
||||
gl/wrap/es.h
|
||||
gl/wrap/gles2.h
|
||||
gl/wrap/gles.h
|
||||
gl/wrap/gl.h
|
||||
gl/wrap/stub.h
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
#define skip_glDisable
|
||||
#define skip_glEnable
|
||||
#define skip_glIsEnabled
|
||||
#define skip_glMaterialfv
|
||||
#define skip_glMaterialf
|
||||
#define skip_glNormal3f
|
||||
|
||||
#define skip_glBindBuffer
|
||||
@@ -51,6 +49,8 @@
|
||||
#define skip_glGetIntegerv
|
||||
#define skip_glGetFloatv
|
||||
#define skip_glGetString
|
||||
#define skip_glGetLightfv
|
||||
#define skip_glGetMaterialfv
|
||||
|
||||
// hint.c
|
||||
#define skip_glHint
|
||||
@@ -60,6 +60,8 @@
|
||||
#define skip_glLightModelfv
|
||||
#define skip_glLightfv
|
||||
#define skip_glLightf
|
||||
#define skip_glMaterialfv
|
||||
#define skip_glMaterialf
|
||||
|
||||
// raster.c
|
||||
#define skip_glViewport
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#define GL_TEXTURE_3D 0x806F
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
#define GL_TEXTURE_WRAP_R 0x8072
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_ENV_COLOR 0x2201
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "texgen.h"
|
||||
#include "../glx/hardext.h"
|
||||
#include "gl4eshint.h"
|
||||
#include "light.h"
|
||||
|
||||
GLenum gl4es_glGetError() {
|
||||
LOAD_GLES(glGetError);
|
||||
@@ -100,8 +101,8 @@ const GLubyte *gl4es_glGetString(GLenum name) {
|
||||
"GL_EXT_polygon_offset "
|
||||
"GL_GL4ES_hint "
|
||||
"GL_ARB_vertex_array_bgra "
|
||||
"GL_ARB_texture_rectangle "
|
||||
// "GL_EXT_blend_logic_op "
|
||||
// "GL_ARB_texture_cube_map "
|
||||
);
|
||||
if(globals4es.npot>=1)
|
||||
strcat(extensions, "GL_APPLE_texture_2D_limited_npot ");
|
||||
@@ -295,6 +296,16 @@ void gl4es_glGetIntegerv(GLenum pname, GLint *params) {
|
||||
case GL_MATRIX_MODE:
|
||||
*params=glstate->matrix_mode;
|
||||
break;
|
||||
case GL_LIGHT_MODEL_TWO_SIDE:
|
||||
*params=glstate->light.two_side;
|
||||
break;
|
||||
case GL_LIGHT_MODEL_AMBIENT:
|
||||
for (dummy=0; dummy<4; dummy++)
|
||||
params[dummy]=glstate->light.ambient[dummy];
|
||||
break;
|
||||
case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB:
|
||||
*params=hardext.maxsize;
|
||||
break;
|
||||
case GL_SHRINK_HINT_GL4ES:
|
||||
*params=globals4es.texshrink;
|
||||
break;
|
||||
@@ -459,6 +470,15 @@ void gl4es_glGetFloatv(GLenum pname, GLfloat *params) {
|
||||
case GL_TEXTURE_MATRIX:
|
||||
memcpy(params, TOP(texture_matrix[glstate->texture.active]), 16*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_LIGHT_MODEL_TWO_SIDE:
|
||||
*params=glstate->light.two_side;
|
||||
break;
|
||||
case GL_LIGHT_MODEL_AMBIENT:
|
||||
memcpy(params, glstate->light.ambient, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB:
|
||||
*params=hardext.maxsize;
|
||||
break;
|
||||
case GL_SHRINK_HINT_GL4ES:
|
||||
*params=globals4es.texshrink;
|
||||
break;
|
||||
@@ -498,3 +518,102 @@ void gl4es_glGetFloatv(GLenum pname, GLfloat *params) {
|
||||
}
|
||||
}
|
||||
void glGetFloatv(GLenum pname, GLfloat *params) AliasExport("gl4es_glGetFloatv");
|
||||
|
||||
void gl4es_glGetLightfv(GLenum light, GLenum pname, GLfloat * params) {
|
||||
if(light<0 || light>=hardext.maxlights) {
|
||||
errorShim(GL_INVALID_ENUM);
|
||||
return;
|
||||
}
|
||||
switch(pname) {
|
||||
case GL_AMBIENT:
|
||||
memcpy(params, glstate->light.lights[light].ambient, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_DIFFUSE:
|
||||
memcpy(params, glstate->light.lights[light].diffuse, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_SPECULAR:
|
||||
memcpy(params, glstate->light.lights[light].specular, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_POSITION:
|
||||
memcpy(params, glstate->light.lights[light].position, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_SPOT_DIRECTION:
|
||||
memcpy(params, glstate->light.lights[light].spotDirection, 3*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_SPOT_EXPONENT:
|
||||
params[0] = glstate->light.lights[light].spotExponent;
|
||||
break;
|
||||
case GL_SPOT_CUTOFF:
|
||||
params[0] = glstate->light.lights[light].spotCutoff;
|
||||
break;
|
||||
case GL_CONSTANT_ATTENUATION:
|
||||
params[0] = glstate->light.lights[light].constantAttenuation;
|
||||
break;
|
||||
case GL_LINEAR_ATTENUATION:
|
||||
params[0] = glstate->light.lights[light].linearAttenuation;
|
||||
break;
|
||||
case GL_QUADRATIC_ATTENUATION:
|
||||
params[0] = glstate->light.lights[light].quadraticAttenuation;
|
||||
break;
|
||||
default:
|
||||
errorShim(GL_INVALID_ENUM);
|
||||
return;
|
||||
}
|
||||
noerrorShim();
|
||||
}
|
||||
void glGetLightfv(GLenum pname, GLfloat *params) AliasExport("gl4es_glGetLightfv");
|
||||
|
||||
void gl4es_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params) {
|
||||
if(face!=GL_FRONT && face!=GL_BACK) {
|
||||
errorShim(GL_INVALID_ENUM);
|
||||
return;
|
||||
}
|
||||
switch(pname) {
|
||||
case GL_AMBIENT:
|
||||
if(face==GL_FRONT)
|
||||
memcpy(params, glstate->material.front.ambient, 4*sizeof(GLfloat));
|
||||
if(face==GL_BACK)
|
||||
memcpy(params, glstate->material.back.ambient, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_DIFFUSE:
|
||||
if(face==GL_FRONT)
|
||||
memcpy(params, glstate->material.front.diffuse, 4*sizeof(GLfloat));
|
||||
if(face==GL_BACK)
|
||||
memcpy(params, glstate->material.back.diffuse, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_SPECULAR:
|
||||
if(face==GL_FRONT)
|
||||
memcpy(params, glstate->material.front.specular, 4*sizeof(GLfloat));
|
||||
if(face==GL_BACK)
|
||||
memcpy(params, glstate->material.back.specular, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_EMISSION:
|
||||
if(face==GL_FRONT)
|
||||
memcpy(params, glstate->material.front.emission, 4*sizeof(GLfloat));
|
||||
if(face==GL_BACK)
|
||||
memcpy(params, glstate->material.back.emission, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_SHININESS:
|
||||
if(face==GL_FRONT)
|
||||
*params = glstate->material.front.shininess;
|
||||
if(face==GL_BACK)
|
||||
*params = glstate->material.back.shininess;
|
||||
break;
|
||||
case GL_COLOR_INDEXES:
|
||||
if(face==GL_FRONT) {
|
||||
params[0] = glstate->material.front.indexes[0];
|
||||
params[1] = glstate->material.front.indexes[1];
|
||||
params[2] = glstate->material.front.indexes[2];
|
||||
}
|
||||
if(face==GL_BACK) {
|
||||
params[0] = glstate->material.back.indexes[0];
|
||||
params[1] = glstate->material.back.indexes[1];
|
||||
params[2] = glstate->material.back.indexes[2];
|
||||
}
|
||||
default:
|
||||
errorShim(GL_INVALID_ENUM);
|
||||
return;
|
||||
}
|
||||
noerrorShim();
|
||||
}
|
||||
void glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params) AliasExport("gl4es_glGetMaterialfv");
|
||||
@@ -66,6 +66,35 @@ void* NewGLState(void* shared_glstate) {
|
||||
// init the matrix tracking
|
||||
init_matrix(glstate);
|
||||
|
||||
// init the light tracking
|
||||
glstate->light.ambient[0]=glstate->light.ambient[1]=glstate->light.ambient[2]=0.2f;
|
||||
glstate->light.ambient[3]=1.0f;
|
||||
glstate->light.lights[0].diffuse[0]=
|
||||
glstate->light.lights[0].diffuse[1]=
|
||||
glstate->light.lights[0].diffuse[2]=
|
||||
glstate->light.lights[0].diffuse[3]=1.0f;
|
||||
memcpy(glstate->light.lights[0].specular, glstate->light.lights[0].diffuse, 4*sizeof(GLfloat));
|
||||
for (int i=0; i<hardext.maxlights; i++) {
|
||||
glstate->light.lights[i].ambient[3] = 1.0f;
|
||||
glstate->light.lights[i].position[2] = 1.0f;
|
||||
glstate->light.lights[i].spotDirection[2] = -1.0f;
|
||||
glstate->light.lights[i].spotCutoff = 180;
|
||||
glstate->light.lights[i].constantAttenuation = 1;
|
||||
}
|
||||
// Materials
|
||||
glstate->material.front.ambient[0] =
|
||||
glstate->material.front.ambient[1] =
|
||||
glstate->material.front.ambient[2] = 0.2f;
|
||||
glstate->material.front.ambient[3] = 1.0f;
|
||||
glstate->material.front.diffuse[0] =
|
||||
glstate->material.front.diffuse[1] =
|
||||
glstate->material.front.diffuse[2] = 0.8f;
|
||||
glstate->material.front.diffuse[3] = 1.0f;
|
||||
glstate->material.front.specular[3] = 1.0f;
|
||||
glstate->material.front.emission[3] = 1.0f;
|
||||
glstate->material.front.colormat = GL_AMBIENT_AND_DIFFUSE;
|
||||
memcpy(&glstate->material.back, &glstate->material.front, sizeof(material_t));
|
||||
|
||||
for(int i=0; i<4; i++)
|
||||
glstate->raster.raster_scale[i] = 1.0f;
|
||||
LOAD_GLES(glGetFloatv);
|
||||
@@ -235,6 +264,12 @@ static void proxy_glEnable(GLenum cap, bool enable, void (*next)(GLenum)) {
|
||||
else
|
||||
glstate->enable.texture[glstate->texture.active] &= ~(1<<ENABLED_TEX3D);
|
||||
break;
|
||||
case GL_TEXTURE_RECTANGLE_ARB:
|
||||
if(enable)
|
||||
glstate->enable.texture[glstate->texture.active] |= (1<<ENABLED_TEXTURE_RECTANGLE);
|
||||
else
|
||||
glstate->enable.texture[glstate->texture.active] &= ~(1<<ENABLED_TEXTURE_RECTANGLE);
|
||||
break;
|
||||
case GL_TEXTURE_CUBE_MAP:
|
||||
if(enable)
|
||||
glstate->enable.texture[glstate->texture.active] |= (1<<ENABLED_CUBE_MAP);
|
||||
@@ -648,7 +683,7 @@ void gl4es_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid
|
||||
// get 1st enabled target
|
||||
const GLint itarget = get_target(glstate->enable.texture[aa]);
|
||||
if (itarget>=0) {
|
||||
if (itarget==ENABLED_TEX1D || itarget==ENABLED_TEX3D) {
|
||||
if (!IS_TEX2D(glstate->enable.texture[aa]) && (IS_ANYTEX(glstate->enable.texture[aa]))) {
|
||||
TEXTURE(aa);
|
||||
gles_glEnable(GL_TEXTURE_2D);
|
||||
}
|
||||
@@ -795,7 +830,7 @@ void gl4es_glDrawArrays(GLenum mode, GLint first, GLsizei count) {
|
||||
// get 1st enabled target
|
||||
const GLint itarget = get_target(glstate->enable.texture[aa]);
|
||||
if(itarget>=0) {
|
||||
if (itarget==ENABLED_TEX1D || itarget==ENABLED_TEX3D) {
|
||||
if (itarget==ENABLED_TEX1D || itarget==ENABLED_TEX3D || itarget==ENABLED_TEXTURE_RECTANGLE) {
|
||||
TEXTURE(aa);
|
||||
gles_glEnable(GL_TEXTURE_2D);
|
||||
}
|
||||
@@ -817,7 +852,8 @@ void gl4es_glDrawArrays(GLenum mode, GLint first, GLsizei count) {
|
||||
gles_glDrawArrays(mode, first, count);
|
||||
|
||||
for (int aa=0; aa<hardext.maxtex; aa++) {
|
||||
if (!IS_TEX2D(glstate->enable.texture[aa]) && (IS_ANYTEX(glstate->enable.texture[aa]))) {
|
||||
const GLint itarget = get_target(glstate->enable.texture[aa]);
|
||||
if (itarget==ENABLED_TEX1D || itarget==ENABLED_TEX3D || itarget==ENABLED_TEXTURE_RECTANGLE) {
|
||||
TEXTURE(aa);
|
||||
gles_glDisable(GL_TEXTURE_2D);
|
||||
}
|
||||
@@ -1085,42 +1121,6 @@ void gl4es_glSecondaryColor3f(GLfloat r, GLfloat g, GLfloat b) {
|
||||
}
|
||||
void glSecondaryColor3f(GLfloat r, GLfloat g, GLfloat b) AliasExport("gl4es_glSecondaryColor3f");
|
||||
|
||||
#ifndef USE_ES2
|
||||
void gl4es_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) {
|
||||
LOAD_GLES(glMaterialfv);
|
||||
if ((glstate->list.compiling || glstate->gl_batch) && glstate->list.active) {
|
||||
//TODO: Materialfv can be done per vertex, how to handle that ?!
|
||||
//NewStage(glstate->list.active, STAGE_MATERIAL);
|
||||
rlMaterialfv(glstate->list.active, face, pname, params);
|
||||
noerrorShim();
|
||||
} else {
|
||||
if (face!=GL_FRONT_AND_BACK) {
|
||||
face=GL_FRONT_AND_BACK;
|
||||
}
|
||||
gles_glMaterialfv(face, pname, params);
|
||||
errorGL();
|
||||
}
|
||||
}
|
||||
void glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) AliasExport("gl4es_glMaterialfv");
|
||||
void gl4es_glMaterialf(GLenum face, GLenum pname, const GLfloat param) {
|
||||
LOAD_GLES(glMaterialf);
|
||||
if ((glstate->list.compiling || glstate->gl_batch) && glstate->list.active) {
|
||||
GLfloat params[4];
|
||||
memset(params, 0, 4*sizeof(GLfloat));
|
||||
params[0] = param;
|
||||
NewStage(glstate->list.active, STAGE_MATERIAL);
|
||||
rlMaterialfv(glstate->list.active, face, pname, params);
|
||||
noerrorShim();
|
||||
} else {
|
||||
if (face!=GL_FRONT_AND_BACK) {
|
||||
face=GL_FRONT_AND_BACK;
|
||||
}
|
||||
gles_glMaterialf(face, pname, param);
|
||||
errorGL();
|
||||
}
|
||||
}
|
||||
void glMaterialf(GLenum face, GLenum pname, const GLfloat param) AliasExport("gl4es_glMaterialf");
|
||||
#endif
|
||||
|
||||
void gl4es_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q) {
|
||||
if (glstate->list.active) {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#include "light.h"
|
||||
#include "../glx/hardext.h"
|
||||
#include "matrix.h"
|
||||
#include "matvec.h"
|
||||
|
||||
#ifndef USE_ES2
|
||||
void gl4es_glLightModelf(GLenum pname, GLfloat param) {
|
||||
@@ -9,18 +12,18 @@ void gl4es_glLightModelf(GLenum pname, GLfloat param) {
|
||||
gl4es_glLightModelfv(pname, dummy);
|
||||
return;
|
||||
}
|
||||
LOAD_GLES(glLightModelf);
|
||||
switch (pname) {
|
||||
case GL_LIGHT_MODEL_AMBIENT:
|
||||
case GL_LIGHT_MODEL_TWO_SIDE:
|
||||
errorGL();
|
||||
gles_glLightModelf(pname, param);
|
||||
glstate->light.two_side = param;
|
||||
break;
|
||||
case GL_LIGHT_MODEL_AMBIENT:
|
||||
default:
|
||||
errorShim(GL_INVALID_ENUM);
|
||||
//printf("stubbed glLightModelf(%i, %.2f)\n", pname, param);
|
||||
break;
|
||||
return;
|
||||
}
|
||||
LOAD_GLES(glLightModelf);
|
||||
gles_glLightModelf(pname, param);
|
||||
}
|
||||
|
||||
void gl4es_glLightModelfv(GLenum pname, const GLfloat* params) {
|
||||
@@ -35,28 +38,121 @@ void gl4es_glLightModelfv(GLenum pname, const GLfloat* params) {
|
||||
noerrorShim();
|
||||
return;
|
||||
}
|
||||
LOAD_GLES(glLightModelfv);
|
||||
switch (pname) {
|
||||
case GL_LIGHT_MODEL_AMBIENT:
|
||||
case GL_LIGHT_MODEL_TWO_SIDE:
|
||||
if(memcmp(glstate->light.ambient, params, 4*sizeof(GLfloat))==0) {
|
||||
noerrorShim();
|
||||
return;
|
||||
}
|
||||
errorGL();
|
||||
gles_glLightModelfv(pname, params);
|
||||
memcpy(glstate->light.ambient, params, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_LIGHT_MODEL_TWO_SIDE:
|
||||
if(glstate->light.two_side == params[0]) {
|
||||
noerrorShim();
|
||||
return;
|
||||
}
|
||||
errorGL();
|
||||
glstate->light.two_side = params[0];
|
||||
break;
|
||||
default:
|
||||
errorShim(GL_INVALID_ENUM);
|
||||
//printf("stubbed glLightModelfv(%i, %p [%.2f])\n", pname, params, params[0]);
|
||||
break;
|
||||
return;
|
||||
}
|
||||
LOAD_GLES(glLightModelfv);
|
||||
gles_glLightModelfv(pname, params);
|
||||
}
|
||||
|
||||
void gl4es_glLightfv(GLenum light, GLenum pname, const GLfloat* params) {
|
||||
//printf("%sglLightfv(%04X, %04X, %p=[%.2f, %.2f, %.2f, %.2f])\n", (glstate->list.compiling)?"list":"", light, pname, params, (params)?params[0]:0.0f, (params)?params[1]:0.0f, (params)?params[2]:0.0f, (params)?params[3]:0.0f);
|
||||
if(light<0 || light>=hardext.maxlights) {
|
||||
errorShim(GL_INVALID_ENUM);
|
||||
return;
|
||||
}
|
||||
if (glstate->list.compiling && glstate->list.active) {
|
||||
NewStage(glstate->list.active, STAGE_LIGHT);
|
||||
rlLightfv(glstate->list.active, light, pname, params);
|
||||
noerrorShim();
|
||||
return;
|
||||
}
|
||||
GLfloat tmp[4];
|
||||
noerrorShim();
|
||||
switch(pname) {
|
||||
case GL_AMBIENT:
|
||||
if(memcmp(glstate->light.lights[light].ambient, params, 4*sizeof(GLfloat))==0)
|
||||
return;
|
||||
memcpy(glstate->light.lights[light].ambient, params, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_DIFFUSE:
|
||||
if(memcmp(glstate->light.lights[light].diffuse, params, 4*sizeof(GLfloat)))
|
||||
return;
|
||||
memcpy(glstate->light.lights[light].diffuse, params, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_SPECULAR:
|
||||
if(memcmp(glstate->light.lights[light].specular, params, 4*sizeof(GLfloat)))
|
||||
return;
|
||||
memcpy(glstate->light.lights[light].specular, params, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_POSITION:
|
||||
vector_matrix(params, getMVMat(), tmp);
|
||||
if(memcmp(glstate->light.lights[light].position, tmp, 4*sizeof(GLfloat)))
|
||||
return;
|
||||
memcpy(glstate->light.lights[light].position, tmp, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_SPOT_DIRECTION:
|
||||
memcpy(tmp, params, 3*sizeof(GLfloat));
|
||||
tmp[3] = 0.0f;
|
||||
vector_matrix(tmp, getMVMat(), tmp);
|
||||
if(memcmp(glstate->light.lights[light].spotDirection, tmp, 4*sizeof(GLfloat)))
|
||||
return;
|
||||
memcpy(glstate->light.lights[light].spotDirection, tmp, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_SPOT_EXPONENT:
|
||||
if(params[0]<0 || params[0]>128) {
|
||||
errorShim(GL_INVALID_VALUE);
|
||||
return;
|
||||
}
|
||||
if(glstate->light.lights[light].spotExponent == params[0])
|
||||
return;
|
||||
glstate->light.lights[light].spotExponent = params[0];
|
||||
break;
|
||||
case GL_SPOT_CUTOFF:
|
||||
if(params[0]<0 || (params[0]>90 && params[0]!=180)) {
|
||||
errorShim(GL_INVALID_VALUE);
|
||||
return;
|
||||
}
|
||||
if(glstate->light.lights[light].spotCutoff == params[0])
|
||||
return;
|
||||
glstate->light.lights[light].spotCutoff = params[0];
|
||||
break;
|
||||
case GL_CONSTANT_ATTENUATION:
|
||||
if(params[0]<0) {
|
||||
errorShim(GL_INVALID_VALUE);
|
||||
return;
|
||||
}
|
||||
if(glstate->light.lights[light].constantAttenuation == params[0])
|
||||
return;
|
||||
glstate->light.lights[light].constantAttenuation = params[0];
|
||||
break;
|
||||
case GL_LINEAR_ATTENUATION:
|
||||
if(params[0]<0) {
|
||||
errorShim(GL_INVALID_VALUE);
|
||||
return;
|
||||
}
|
||||
if(glstate->light.lights[light].linearAttenuation == params[0])
|
||||
return;
|
||||
glstate->light.lights[light].linearAttenuation = params[0];
|
||||
break;
|
||||
case GL_QUADRATIC_ATTENUATION:
|
||||
if(params[0]<0) {
|
||||
errorShim(GL_INVALID_VALUE);
|
||||
return;
|
||||
}
|
||||
if(glstate->light.lights[light].quadraticAttenuation == params[0])
|
||||
return;
|
||||
glstate->light.lights[light].quadraticAttenuation = params[0];
|
||||
break;
|
||||
}
|
||||
LOAD_GLES(glLightfv);
|
||||
gles_glLightfv(light, pname, params);
|
||||
errorGL();
|
||||
@@ -69,8 +165,143 @@ void gl4es_glLightf(GLenum light, GLenum pname, const GLfloat params) {
|
||||
errorGL();
|
||||
}
|
||||
|
||||
void gl4es_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) {
|
||||
if ((glstate->list.compiling || glstate->gl_batch) && glstate->list.active) {
|
||||
//TODO: Materialfv can be done per vertex, how to handle that ?!
|
||||
//NewStage(glstate->list.active, STAGE_MATERIAL);
|
||||
rlMaterialfv(glstate->list.active, face, pname, params);
|
||||
noerrorShim();
|
||||
} else {
|
||||
if(face!=GL_FRONT_AND_BACK && face!=GL_FRONT && face!=GL_BACK) {
|
||||
errorShim(GL_INVALID_ENUM);
|
||||
return;
|
||||
}
|
||||
switch(pname) {
|
||||
case GL_AMBIENT:
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_FRONT)
|
||||
memcpy(glstate->material.front.ambient, params, 4*sizeof(GLfloat));
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_BACK)
|
||||
memcpy(glstate->material.back.ambient, params, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_DIFFUSE:
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_FRONT)
|
||||
memcpy(glstate->material.front.diffuse, params, 4*sizeof(GLfloat));
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_BACK)
|
||||
memcpy(glstate->material.back.diffuse, params, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_SPECULAR:
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_FRONT)
|
||||
memcpy(glstate->material.front.specular, params, 4*sizeof(GLfloat));
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_BACK)
|
||||
memcpy(glstate->material.back.specular, params, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_EMISSION:
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_FRONT)
|
||||
memcpy(glstate->material.front.emission, params, 4*sizeof(GLfloat));
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_BACK)
|
||||
memcpy(glstate->material.back.emission, params, 4*sizeof(GLfloat));
|
||||
break;
|
||||
case GL_AMBIENT_AND_DIFFUSE:
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_FRONT) {
|
||||
memcpy(glstate->material.front.ambient, params, 4*sizeof(GLfloat));
|
||||
memcpy(glstate->material.front.diffuse, params, 4*sizeof(GLfloat));
|
||||
}
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_BACK) {
|
||||
memcpy(glstate->material.back.ambient, params, 4*sizeof(GLfloat));
|
||||
memcpy(glstate->material.back.diffuse, params, 4*sizeof(GLfloat));
|
||||
}
|
||||
break;
|
||||
case GL_SHININESS:
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_FRONT)
|
||||
glstate->material.front.shininess = *params;
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_BACK)
|
||||
glstate->material.back.shininess = *params;
|
||||
break;
|
||||
case GL_COLOR_INDEXES:
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_FRONT) {
|
||||
glstate->material.front.indexes[0] = params[0];
|
||||
glstate->material.front.indexes[1] = params[1];
|
||||
glstate->material.front.indexes[2] = params[2];
|
||||
}
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_BACK) {
|
||||
glstate->material.back.indexes[0] = params[0];
|
||||
glstate->material.back.indexes[1] = params[1];
|
||||
glstate->material.back.indexes[2] = params[2];
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
LOAD_GLES(glMaterialfv);
|
||||
if(face==GL_BACK) { // lets ignore GL_BACK in GLES 1.1
|
||||
noerrorShim();
|
||||
return;
|
||||
}
|
||||
gles_glMaterialfv(GL_FRONT_AND_BACK, pname, params);
|
||||
errorGL();
|
||||
}
|
||||
}
|
||||
|
||||
void gl4es_glMaterialf(GLenum face, GLenum pname, const GLfloat param) {
|
||||
if ((glstate->list.compiling || glstate->gl_batch) && glstate->list.active) {
|
||||
GLfloat params[4];
|
||||
memset(params, 0, 4*sizeof(GLfloat));
|
||||
params[0] = param;
|
||||
NewStage(glstate->list.active, STAGE_MATERIAL);
|
||||
rlMaterialfv(glstate->list.active, face, pname, params);
|
||||
noerrorShim();
|
||||
} else {
|
||||
if(face!=GL_FRONT_AND_BACK && face!=GL_FRONT && face!=GL_BACK) {
|
||||
errorShim(GL_INVALID_ENUM);
|
||||
return;
|
||||
}
|
||||
if(pname!=GL_SHININESS) {
|
||||
errorShim(GL_INVALID_ENUM);
|
||||
return;
|
||||
}
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_FRONT)
|
||||
glstate->material.front.shininess = param;
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_BACK)
|
||||
glstate->material.back.shininess = param;
|
||||
|
||||
LOAD_GLES(glMaterialf);
|
||||
if(face==GL_BACK) { // lets ignore GL_BACK in GLES 1.1
|
||||
noerrorShim();
|
||||
return;
|
||||
}
|
||||
gles_glMaterialf(GL_FRONT_AND_BACK, pname, param);
|
||||
errorGL();
|
||||
}
|
||||
}
|
||||
|
||||
void gl4es_glColorMaterial(GLenum face, GLenum mode) {
|
||||
if ((glstate->list.compiling || glstate->gl_batch) && glstate->list.active) {
|
||||
NewStage(glstate->list.active, STAGE_COLOR_MATERIAL);
|
||||
glstate->list.active->colormat_face = face;
|
||||
glstate->list.active->colormat_mode = mode;
|
||||
noerrorShim();
|
||||
} else {
|
||||
if(face!=GL_FRONT_AND_BACK && face!=GL_FRONT && face!=GL_BACK) {
|
||||
errorShim(GL_INVALID_ENUM);
|
||||
return;
|
||||
}
|
||||
if(mode!=GL_EMISSION && mode!=GL_AMBIENT && mode!=GL_DIFFUSE && mode!=GL_SPECULAR && mode!=GL_AMBIENT_AND_DIFFUSE) {
|
||||
errorShim(GL_INVALID_ENUM);
|
||||
return;
|
||||
}
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_FRONT)
|
||||
glstate->material.front.colormat = mode;
|
||||
if(face==GL_FRONT_AND_BACK || face==GL_BACK)
|
||||
glstate->material.back.colormat = mode;
|
||||
noerrorShim();
|
||||
}
|
||||
}
|
||||
|
||||
void glLightModelf(GLenum pname, GLfloat param) AliasExport("gl4es_glLightModelf");
|
||||
void glLightModelfv(GLenum pname, const GLfloat* params) AliasExport("gl4es_glLightModelfv");
|
||||
void glLightfv(GLenum light, GLenum pname, const GLfloat* params) AliasExport("gl4es_glLightfv");
|
||||
void glLightf(GLenum light, GLenum pname, const GLfloat params) AliasExport("gl4es_glLightf");
|
||||
void glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) AliasExport("gl4es_glMaterialfv");
|
||||
void glMaterialf(GLenum face, GLenum pname, const GLfloat param) AliasExport("gl4es_glMaterialf");
|
||||
void glColorMaterial(GLenum face, GLenum mode) AliasExport("gl4es_glColorMaterial");
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,50 @@
|
||||
#include "gl.h"
|
||||
|
||||
#ifndef __LIGHT_H_
|
||||
#define __LIGHT_H_
|
||||
|
||||
typedef struct {
|
||||
GLfloat ambient[4];
|
||||
GLfloat diffuse[4];
|
||||
GLfloat specular[4];
|
||||
GLfloat constantAttenuation, linearAttenuation, quadraticAttenuation;
|
||||
GLfloat position[4];
|
||||
GLfloat spotDirection[4]; // It's only 3 in fact, because it's a direction
|
||||
GLfloat spotExponent;
|
||||
GLfloat spotCutoff;
|
||||
} light_t;
|
||||
|
||||
typedef struct {
|
||||
light_t lights[MAX_LIGHT];
|
||||
GLfloat ambient[4];
|
||||
GLboolean two_side;
|
||||
} light_state_t;
|
||||
|
||||
typedef struct {
|
||||
GLfloat ambient[4];
|
||||
GLfloat diffuse[4];
|
||||
GLfloat specular[4];
|
||||
GLfloat emission[4];
|
||||
GLfloat shininess;
|
||||
int indexes[3];
|
||||
GLenum colormat;
|
||||
} material_t;
|
||||
|
||||
typedef struct {
|
||||
material_t front;
|
||||
material_t back;
|
||||
} material_state_t;
|
||||
|
||||
void gl4es_glLightModelf(GLenum pname, GLfloat param);
|
||||
void gl4es_glLightModelfv(GLenum pname, const GLfloat* params);
|
||||
void gl4es_glLightfv(GLenum light, GLenum pname, const GLfloat* params);
|
||||
void gl4es_glLightf(GLenum light, GLenum pname, const GLfloat params);
|
||||
|
||||
void gl4es_glGetLightfv(GLenum light, GLenum pname, GLfloat * params);
|
||||
void gl4es_glGetLightiv(GLenum light, GLenum pname, GLint * params);
|
||||
|
||||
void gl4es_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) ;
|
||||
void gl4es_glMaterialf(GLenum face, GLenum pname, const GLfloat param);
|
||||
void gl4es_glColorMaterial(GLenum face, GLenum mode);
|
||||
|
||||
#endif //__LIGHT_H_
|
||||
@@ -46,7 +46,7 @@ bool ispurerender_renderlist(renderlist_t *list) {
|
||||
return false;
|
||||
if (list->popattribute)
|
||||
return false;
|
||||
if (list->material || list->light || list->lightmodel || list->texgen || list->texenv)
|
||||
if (list->material || list->colormat_face || list->light || list->lightmodel || list->texgen || list->texenv)
|
||||
return false;
|
||||
if (list->fog_op)
|
||||
return false;
|
||||
@@ -454,6 +454,8 @@ renderlist_t *extend_renderlist(renderlist_t *list) {
|
||||
// just in case
|
||||
memcpy(new->lastNormal, list->lastNormal, 3*sizeof(GLfloat));
|
||||
memcpy(new->lastSecondaryColors, list->lastSecondaryColors, 3*sizeof(GLfloat));
|
||||
memcpy(new->lastColors, list->lastColors, 4*sizeof(GLfloat));
|
||||
new->lastColorsSet = list->lastColorsSet;
|
||||
// detach
|
||||
list->prev = NULL;
|
||||
// free list now
|
||||
@@ -821,13 +823,15 @@ void draw_renderlist(renderlist_t *list) {
|
||||
kh_foreach_value(map, m,
|
||||
switch (m->pname) {
|
||||
case GL_SHININESS:
|
||||
gl4es_glMaterialf(GL_FRONT_AND_BACK, m->pname, m->color[0]);
|
||||
gl4es_glMaterialf(m->face, m->pname, m->color[0]);
|
||||
break;
|
||||
default:
|
||||
gl4es_glMaterialfv(GL_FRONT_AND_BACK, m->pname, m->color);
|
||||
gl4es_glMaterialfv(m->face, m->pname, m->color);
|
||||
}
|
||||
)
|
||||
}
|
||||
if (list->colormat_face)
|
||||
gl4es_glColorMaterial(list->colormat_face, list->colormat_mode);
|
||||
if (list->light) {
|
||||
khash_t(light) *lig = list->light;
|
||||
renderlight_t *m;
|
||||
|
||||
@@ -16,6 +16,7 @@ typedef enum {
|
||||
STAGE_BINDTEX,
|
||||
STAGE_RASTER,
|
||||
STAGE_MATERIAL,
|
||||
STAGE_COLOR_MATERIAL,
|
||||
STAGE_LIGHT,
|
||||
STAGE_LIGHTMODEL,
|
||||
STAGE_TEXENV,
|
||||
@@ -38,6 +39,7 @@ static int StageExclusive[STAGE_LAST] = {
|
||||
1, // STAGE_BINDTEX
|
||||
1, // STAGE_RASTER
|
||||
0, // STAGE_MATERIAL
|
||||
1, // STAGE_COLOR_MATERIAL
|
||||
0, // STAGE_LIGHT
|
||||
1, // STAGE_LIGTMODEL
|
||||
0, // STAGE_TEXENV
|
||||
@@ -144,6 +146,8 @@ typedef struct _renderlist_t {
|
||||
GLfloat pointparam_val[4];
|
||||
|
||||
khash_t(material) *material;
|
||||
GLenum colormat_face;
|
||||
GLenum colormat_mode;
|
||||
khash_t(light) *light;
|
||||
khash_t(texgen) *texgen;
|
||||
khash_t(texenv) *texenv;
|
||||
|
||||
@@ -15,3 +15,7 @@ void gl4es_glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top,
|
||||
static inline GLfloat* getTexMat(int tmu) {
|
||||
return glstate->texture_matrix[tmu]->stack+glstate->texture_matrix[tmu]->top*16;
|
||||
}
|
||||
|
||||
static inline GLfloat* getMVMat() {
|
||||
return glstate->modelview_matrix->stack+glstate->modelview_matrix->top*16;
|
||||
}
|
||||
@@ -1129,6 +1129,41 @@ bool pixel_quarterscale(const GLvoid *old, GLvoid **new,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool pixel_doublescale(const GLvoid *old, GLvoid **new,
|
||||
GLuint width, GLuint height,
|
||||
GLenum format, GLenum type) {
|
||||
GLuint pixel_size, new_width, new_height;
|
||||
new_width = width * 2;
|
||||
new_height = height * 2;
|
||||
//printf("LIBGL: doublescaling %ux%u -> %ux%u (%s / %s)\n", width, height, new_width, new_height, PrintEnum(format), PrintEnum(type));
|
||||
const colorlayout_t *src_color;
|
||||
src_color = get_color_map(format);
|
||||
GLvoid *dst;
|
||||
uintptr_t src, pos, pix0, pix1, pix2, pix3;
|
||||
|
||||
pixel_size = pixel_sizeof(format, type);
|
||||
dst = malloc(pixel_size * new_width * new_height);
|
||||
src = (uintptr_t)old;
|
||||
pos = (uintptr_t)dst;
|
||||
const int dx = (width>1)?1:0;
|
||||
const int dy = (height>1)?1:0;
|
||||
for (int y = 0; y+1 < new_height; y+=2) {
|
||||
for (int x = 0; x+1 < new_width; x+=2) {
|
||||
pix0 = src + ((x / 2) +
|
||||
(y / 2) * width) * pixel_size;
|
||||
memcpy((void*)pos, (void*)pix0, pixel_size);
|
||||
memcpy((void*)(pos+new_width*pixel_size), (void*)pix0, pixel_size);
|
||||
pos += pixel_size;
|
||||
memcpy((void*)pos, (void*)pix0, pixel_size);
|
||||
memcpy((void*)(pos+new_width*pixel_size), (void*)pix0, pixel_size);
|
||||
pos += pixel_size;
|
||||
}
|
||||
pos += new_width*pixel_size;
|
||||
}
|
||||
*new = dst;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool pixel_to_ppm(const GLvoid *pixels, GLuint width, GLuint height,
|
||||
GLenum format, GLenum type, GLuint name) {
|
||||
if (! pixels)
|
||||
|
||||
@@ -39,6 +39,10 @@ bool pixel_quarterscale(const GLvoid *src, GLvoid **dst,
|
||||
GLuint width, GLuint height,
|
||||
GLenum format, GLenum type);
|
||||
|
||||
bool pixel_doublescale(const GLvoid *src, GLvoid **dst,
|
||||
GLuint width, GLuint height,
|
||||
GLenum format, GLenum type);
|
||||
|
||||
bool pixel_to_ppm(const GLvoid *pixels,
|
||||
GLuint width, GLuint height,
|
||||
GLenum format, GLenum type, GLuint name);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "stack.h"
|
||||
#include "../glx/hardext.h"
|
||||
#include "matrix.h"
|
||||
|
||||
void gl4es_glPushAttrib(GLbitfield mask) {
|
||||
//printf("glPushAttrib(0x%04X)\n", mask);
|
||||
@@ -161,8 +162,9 @@ void gl4es_glPushAttrib(GLbitfield mask) {
|
||||
#undef L
|
||||
}
|
||||
j=0;
|
||||
cur->materials = (GLfloat *)malloc(1 * sizeof(GLfloat)*(5*4));
|
||||
#define M(A) gl4es_glGetMaterialfv(GL_FRONT, A, cur->materials+j); j+=4
|
||||
cur->materials = (GLfloat *)malloc(2 * sizeof(GLfloat)*(5*4));
|
||||
memset(cur->materials, 0, 2 * sizeof(GLfloat)*(5*4));
|
||||
#define M(A) gl4es_glGetMaterialfv(GL_BACK, A, cur->materials+j); j+=4; gl4es_glGetMaterialfv(GL_FRONT, A, cur->materials+j); j+=4
|
||||
M(GL_AMBIENT); M(GL_DIFFUSE); M(GL_SPECULAR); M(GL_EMISSION); M(GL_SHININESS); // handle both face at some point?
|
||||
#undef M
|
||||
gl4es_glGetIntegerv(GL_SHADE_MODEL, &cur->shade_model);
|
||||
@@ -468,6 +470,14 @@ void gl4es_glPopAttrib() {
|
||||
|
||||
int i;
|
||||
int j=0;
|
||||
int old_matrixmode = glstate->matrix_mode;
|
||||
// Light position / direction is transformed. So load identity in modelview to restore correct stuff
|
||||
int identity = is_identity(getMVMat());
|
||||
if(!identity) {
|
||||
if(old_matrixmode != GL_MODELVIEW) gl4es_glMatrixMode(GL_MODELVIEW);
|
||||
gl4es_glPushMatrix();
|
||||
gl4es_glLoadIdentity();
|
||||
}
|
||||
for (i = 0; i < hardext.maxlights; i++) {
|
||||
enable_disable(GL_LIGHT0 + i, *(cur->lights_enabled + i));
|
||||
#define L(A) gl4es_glLightfv(GL_LIGHT0 + i, A, cur->lights+j); j+=4
|
||||
@@ -483,8 +493,15 @@ void gl4es_glPopAttrib() {
|
||||
L(GL_QUADRATIC_ATTENUATION);
|
||||
#undef L
|
||||
}
|
||||
if(!identity) {
|
||||
gl4es_glPopMatrix();
|
||||
if(old_matrixmode != GL_MODELVIEW) gl4es_glMatrixMode(old_matrixmode);
|
||||
}
|
||||
j=0;
|
||||
#define M(A) gl4es_glMaterialfv(GL_FRONT_AND_BACK, A, cur->materials+j); j+=4
|
||||
#define M(A) if(memcmp(cur->materials+j, cur->materials+j+4, 4*sizeof(GLfloat))==0) \
|
||||
{gl4es_glMaterialfv(GL_FRONT_AND_BACK, A, cur->materials+j); j+=8;} \
|
||||
else \
|
||||
{gl4es_glMaterialfv(GL_BACK, A, cur->materials+j); j+=4; gl4es_glMaterialfv(GL_FRONT, A, cur->materials+j); j+=4;}
|
||||
M(GL_AMBIENT); M(GL_DIFFUSE); M(GL_SPECULAR); M(GL_EMISSION); M(GL_SHININESS); // handle both face at some point?
|
||||
#undef M
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "texture.h"
|
||||
#include "buffers.h"
|
||||
#include "queries.h"
|
||||
#include "light.h"
|
||||
|
||||
typedef struct _glstack_t glstack_t;
|
||||
typedef struct _glclientstack_t glclientstack_t;
|
||||
@@ -189,6 +190,8 @@ typedef struct {
|
||||
int emulatedPixmap;
|
||||
int emulatedWin;
|
||||
int shared_cnt;
|
||||
light_state_t light;
|
||||
material_state_t material;
|
||||
} glstate_t;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -533,9 +533,15 @@ void gl4es_glTexImage2D(GLenum target, GLint level, GLint internalformat,
|
||||
|
||||
//printf("glTexImage2D on target=%s with unpack_row_length(%i), size(%i,%i) and skip(%i,%i), format(internal)=%s(%s), type=%s, data=%08x, level=%i (mipmap_need=%i, mipmap_auto=%i) => texture=%u (streamed=%i), glstate->list.compiling=%d\n", PrintEnum(target), glstate->texture.unpack_row_length, width, height, glstate->texture.unpack_skip_pixels, glstate->texture.unpack_skip_rows, PrintEnum(format), PrintEnum(internalformat), PrintEnum(type), data, level, (glstate->texture.bound[glstate->texture.active][what_target(target)])?glstate->texture.bound[glstate->texture.active][what_target(target)]->mipmap_need:0, (glstate->texture.bound[glstate->texture.active][what_target(target)])?glstate->texture.bound[glstate->texture.active][what_target(target)]->mipmap_auto:0, (glstate->texture.bound[glstate->texture.active][what_target(target)])?glstate->texture.bound[glstate->texture.active][what_target(target)]->texture:0, (glstate->texture.bound[glstate->texture.active][what_target(target)])?glstate->texture.bound[glstate->texture.active][what_target(target)]->streamed:0, glstate->list.compiling);
|
||||
// proxy case
|
||||
if (target == GL_PROXY_TEXTURE_2D || target == GL_PROXY_TEXTURE_1D || target == GL_PROXY_TEXTURE_3D) {
|
||||
proxy_width = ((width<<level)>(globals4es.texshrink>=8)?8192:2048)?0:width;
|
||||
proxy_height = ((height<<level)>(globals4es.texshrink>=8)?8192:2048)?0:height;
|
||||
|
||||
const GLuint itarget = what_target(target);
|
||||
const GLuint rtarget = map_tex_target(target);
|
||||
|
||||
if (rtarget == GL_PROXY_TEXTURE_2D) {
|
||||
int max1=hardext.maxsize;
|
||||
if (globals4es.texshrink>=8 && max1>8192) max1=8192;
|
||||
proxy_width = ((width<<level)>max1)?0:width;
|
||||
proxy_height = ((height<<level)>max1)?0:height;
|
||||
proxy_intformat = swizzle_internalformat(&internalformat);
|
||||
return;
|
||||
}
|
||||
@@ -546,8 +552,6 @@ void gl4es_glTexImage2D(GLenum target, GLint level, GLint internalformat,
|
||||
glstate->gl_batch = 0;
|
||||
}
|
||||
|
||||
GLuint itarget = what_target(target);
|
||||
|
||||
GLvoid *datab = (GLvoid*)data;
|
||||
|
||||
if (glstate->vao->unpack)
|
||||
@@ -698,6 +702,10 @@ void gl4es_glTexImage2D(GLenum target, GLint level, GLint internalformat,
|
||||
|
||||
{
|
||||
GLsizei nheight = (hardext.npot==2)?height:npot(height), nwidth = (hardext.npot==2)?width:npot(width);
|
||||
if(target==GL_TEXTURE_RECTANGLE_ARB && hardext.npot==1) {
|
||||
nheight = height;
|
||||
nwidth = width;
|
||||
}
|
||||
#ifdef PANDORA
|
||||
#define NO_1x1
|
||||
#endif
|
||||
@@ -724,48 +732,105 @@ void gl4es_glTexImage2D(GLenum target, GLint level, GLint internalformat,
|
||||
}
|
||||
if ((bound) && (globals4es.automipmap==4) && (nwidth!=nheight))
|
||||
bound->mipmap_auto = 0;
|
||||
|
||||
|
||||
if((bound) && (target==GL_TEXTURE_RECTANGLE_ARB && hardext.npot==1)) {
|
||||
gl4es_glTexParameteri(rtarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
gl4es_glTexParameteri(rtarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
}
|
||||
|
||||
if (!(globals4es.texstream && bound && bound->streamed)) {
|
||||
if (bound && ((bound->mipmap_need && (globals4es.automipmap!=3)) || (bound->mipmap_auto)))
|
||||
gles_glTexParameteri( target, GL_GENERATE_MIPMAP, GL_TRUE );
|
||||
if (bound && (target!=GL_TEXTURE_RECTANGLE_ARB) && ((bound->mipmap_need && (globals4es.automipmap!=3)) || (bound->mipmap_auto)))
|
||||
gles_glTexParameteri( rtarget, GL_GENERATE_MIPMAP, GL_TRUE );
|
||||
else {
|
||||
if(itarget!=ENABLED_CUBE_MAP) gles_glTexParameteri( target, GL_GENERATE_MIPMAP, GL_FALSE );
|
||||
if ((bound) && (bound->mipmap_need)) {
|
||||
//if(target!=GL_TEXTURE_RECTANGLE_ARB) gles_glTexParameteri( rtarget, GL_GENERATE_MIPMAP, GL_FALSE );
|
||||
if ((bound) && (itarget!=ENABLED_CUBE_MAP && target!=GL_TEXTURE_RECTANGLE_ARB) && (bound->mipmap_need)) {
|
||||
// remove the need for mipmap...
|
||||
bound->mipmap_need = 0;
|
||||
gl4es_glTexParameteri(target, GL_TEXTURE_MIN_FILTER, bound->min_filter);
|
||||
gl4es_glTexParameteri(target, GL_TEXTURE_MAG_FILTER, bound->mag_filter);
|
||||
gl4es_glTexParameteri(rtarget, GL_TEXTURE_MIN_FILTER, bound->min_filter);
|
||||
gl4es_glTexParameteri(rtarget, GL_TEXTURE_MAG_FILTER, bound->mag_filter);
|
||||
}
|
||||
}
|
||||
|
||||
if (height != nheight || width != nwidth) {
|
||||
gles_glTexImage2D(target, level, format, nwidth, nheight, border,
|
||||
gles_glTexImage2D(rtarget, level, format, nwidth, nheight, border,
|
||||
format, type, NULL);
|
||||
if (pixels) gles_glTexSubImage2D(target, level, 0, 0, width, height,
|
||||
if (pixels) gles_glTexSubImage2D(rtarget, level, 0, 0, width, height,
|
||||
format, type, pixels);
|
||||
errorGL();
|
||||
#ifdef NO_1x1
|
||||
if(level==0 && (width==1 || height==1 && pixels)) {
|
||||
// complete the texture, juste in ase it use GL_REPEAT
|
||||
// complete the texture, juste in case it use GL_REPEAT
|
||||
// also, don't keep the fact we have resized, the non-adjusted coordinates will work (as the texture is enlarged)
|
||||
if(width==1) {gles_glTexSubImage2D(target, level, 1, 0, width, height, format, type, pixels); nwidth=1;}
|
||||
if(height==1) {gles_glTexSubImage2D(target, level, 0, 1, width, height, format, type, pixels); nheight=1;}
|
||||
if(width==1) {gles_glTexSubImage2D(rtarget, level, 1, 0, width, height, format, type, pixels); nwidth=1;}
|
||||
if(height==1) {gles_glTexSubImage2D(rtarget, level, 0, 1, width, height, format, type, pixels); nheight=1;}
|
||||
if(width==1 && height==1) { // create a manual mipmap just in case_state
|
||||
gles_glTexSubImage2D(target, level, 1, 1, width, height, format, type, pixels);
|
||||
gles_glTexImage2D(target, 1, format, 1, 1, 0, format, type, pixels);
|
||||
gles_glTexSubImage2D(rtarget, level, 1, 1, width, height, format, type, pixels);
|
||||
gles_glTexImage2D(rtarget, 1, format, 1, 1, 0, format, type, pixels);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
gles_glTexImage2D(target, level, format, width, height, border,
|
||||
gles_glTexImage2D(rtarget, level, format, width, height, border,
|
||||
format, type, pixels);
|
||||
errorGL();
|
||||
}
|
||||
// check if base_level is set... and calculate lower level mipmap
|
||||
if(bound->base_level == level) {
|
||||
int leveln = level, nw = width, nh = height, nww=nwidth, nhh=nheight;
|
||||
int pot = (nh==nhh && nw==nww);
|
||||
void *ndata = pixels;
|
||||
while(leveln) {
|
||||
if(pixels) {
|
||||
GLvoid *out = ndata;
|
||||
pixel_doublescale(ndata, &out, nw, nh, format, type);
|
||||
if (out != ndata && ndata!=pixels)
|
||||
free(ndata);
|
||||
ndata = out;
|
||||
}
|
||||
nw <<= 1;
|
||||
nh <<= 1;
|
||||
nww <<= 1;
|
||||
nhh <<= 1;
|
||||
--leveln;
|
||||
gles_glTexImage2D(rtarget, leveln, format, nww, nhh, border,
|
||||
format, type, (pot)?ndata:NULL);
|
||||
if(!pot && pixels) gles_glTexSubImage2D(rtarget, leveln, 0, 0, nw, nh,
|
||||
format, type, ndata);
|
||||
}
|
||||
if (ndata!=pixels)
|
||||
free(ndata);
|
||||
}
|
||||
// check if max_level is set... and calculate highr level mipmap
|
||||
if(bound->max_level == level) {
|
||||
int leveln = level, nw = nwidth, nh = nheight, nww=width, nhh=height;
|
||||
int pot = (nh==nhh && nw==nww);
|
||||
void *ndata = pixels;
|
||||
while(nw!=1 && nh!=1) {
|
||||
if(pixels) {
|
||||
GLvoid *out = ndata;
|
||||
pixel_halfscale(ndata, &out, nww, nhh, format, type);
|
||||
if (out != ndata && ndata!=pixels)
|
||||
free(ndata);
|
||||
ndata = out;
|
||||
}
|
||||
nw = nlevel(nw, 1);
|
||||
nh = nlevel(nh, 1);
|
||||
nww = nlevel(nww, 1);
|
||||
nhh = nlevel(nhh, 1);
|
||||
++leveln;
|
||||
gles_glTexImage2D(rtarget, leveln, format, nw, nh, border,
|
||||
format, type, (pot)?ndata:NULL);
|
||||
if(!pot && pixels) gles_glTexSubImage2D(rtarget, leveln, 0, 0, nww, nhh,
|
||||
format, type, ndata);
|
||||
}
|
||||
if (ndata!=pixels)
|
||||
free(ndata);
|
||||
}
|
||||
/*if (bound && bound->mipmap_need && !bound->mipmap_auto && (globals4es.automipmap!=3))
|
||||
gles_glTexParameteri( target, GL_GENERATE_MIPMAP, GL_FALSE );*/
|
||||
gles_glTexParameteri( rtarget, GL_GENERATE_MIPMAP, GL_FALSE );*/
|
||||
} else {
|
||||
if (pixels)
|
||||
gl4es_glTexSubImage2D(target, level, 0, 0, width, height, format, type, pixels); // (should never happens) updload the 1st data...
|
||||
gl4es_glTexSubImage2D(rtarget, level, 0, 0, width, height, format, type, pixels); // (should never happens) updload the 1st data...
|
||||
}
|
||||
}
|
||||
if ((target==GL_TEXTURE_2D) && globals4es.texcopydata && bound && ((globals4es.texstream && !bound->streamed) || !globals4es.texstream)) {
|
||||
@@ -803,6 +868,7 @@ void gl4es_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoff
|
||||
GLvoid *pixels = (GLvoid*)datab;
|
||||
|
||||
const GLuint itarget = what_target(target);
|
||||
const GLuint rtarget = map_tex_target(target);
|
||||
|
||||
LOAD_GLES(glTexSubImage2D);
|
||||
LOAD_GLES(glTexParameteri);
|
||||
@@ -812,7 +878,6 @@ void gl4es_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoff
|
||||
glstate->gl_batch = old_glbatch;
|
||||
return;
|
||||
}
|
||||
target = map_tex_target(target);
|
||||
|
||||
gltexture_t *bound = glstate->texture.bound[glstate->texture.active][itarget];
|
||||
if (globals4es.automipmap) {
|
||||
@@ -843,10 +908,11 @@ void gl4es_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoff
|
||||
// compressed format are not handled here, so mask them....
|
||||
GLenum orig_internal = bound->orig_internal;
|
||||
GLenum internalformat = bound->internalformat;
|
||||
if (orig_internal==GL_COMPRESSED_RGB) orig_internal=GL_RGB;
|
||||
if (orig_internal==GL_COMPRESSED_RGBA) orig_internal=GL_RGBA;
|
||||
if (internalformat==GL_COMPRESSED_RGB) internalformat=GL_RGB;
|
||||
if (internalformat==GL_COMPRESSED_RGBA) internalformat=GL_RGBA;
|
||||
// compressed format are not handled here, so mask them....
|
||||
if (is_fake_compressed_rgb(orig_internal)) orig_internal=GL_RGB;
|
||||
if (is_fake_compressed_rgba(orig_internal)) orig_internal=GL_RGBA;
|
||||
if (is_fake_compressed_rgb(internalformat)) internalformat=GL_RGB;
|
||||
if (is_fake_compressed_rgba(internalformat)) internalformat=GL_RGBA;
|
||||
|
||||
|
||||
GLvoid *old = pixels;
|
||||
@@ -926,7 +992,7 @@ void gl4es_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoff
|
||||
}
|
||||
|
||||
if (bound && bound->mipmap_need && !bound->mipmap_auto && (globals4es.automipmap!=3) && (!globals4es.texstream || (globals4es.texstream && !bound->streamed)))
|
||||
gles_glTexParameteri( target, GL_GENERATE_MIPMAP, GL_TRUE );
|
||||
gles_glTexParameteri( rtarget, GL_GENERATE_MIPMAP, GL_TRUE );
|
||||
|
||||
if (bound && globals4es.texstream && bound->streamed) {
|
||||
/* // copy the texture to the buffer
|
||||
@@ -935,13 +1001,60 @@ void gl4es_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoff
|
||||
memcpy(tmp+((yy+yoffset)*bound->width+xoffset)*2, pixels+(yy*width)*2, width*2);
|
||||
}*/
|
||||
} else {
|
||||
gles_glTexSubImage2D(target, level, xoffset, yoffset,
|
||||
gles_glTexSubImage2D(rtarget, level, xoffset, yoffset,
|
||||
width, height, format, type, pixels);
|
||||
errorGL();
|
||||
// check if base_level is set... and calculate lower level mipmap
|
||||
if(bound->base_level == level) {
|
||||
int leveln = level, nw = width, nh = height, xx=xoffset, yy=yoffset;
|
||||
void *ndata = pixels;
|
||||
while(leveln) {
|
||||
if(pixels) {
|
||||
GLvoid *out = ndata;
|
||||
pixel_doublescale(ndata, &out, nw, nh, format, type);
|
||||
if (out != ndata && ndata!=pixels)
|
||||
free(ndata);
|
||||
ndata = out;
|
||||
}
|
||||
nw <<= 1;
|
||||
nh <<= 1;
|
||||
xx <<= 1;
|
||||
yy <<= 1;
|
||||
--leveln;
|
||||
gles_glTexSubImage2D(rtarget, leveln, xx, yy, nw, nh,
|
||||
format, type, ndata);
|
||||
}
|
||||
if (ndata!=pixels)
|
||||
free(ndata);
|
||||
}
|
||||
// check if max_level is set... and calculate highr level mipmap
|
||||
if(bound->max_level == level) {
|
||||
int leveln = level, nw = width, nh = height, xx=xoffset, yy=yoffset;
|
||||
void *ndata = pixels;
|
||||
while(nw!=1 && nh!=1) {
|
||||
if(pixels) {
|
||||
GLvoid *out = ndata;
|
||||
pixel_halfscale(ndata, &out, nw, nh, format, type);
|
||||
if (out != ndata && ndata!=pixels)
|
||||
free(ndata);
|
||||
ndata = out;
|
||||
}
|
||||
nw = nlevel(nw, 1);
|
||||
nh = nlevel(nh, 1);
|
||||
xx = nlevel(xx, 1);
|
||||
yy = nlevel(yy, 1);
|
||||
++leveln;
|
||||
gles_glTexSubImage2D(rtarget, leveln, xx, yy, nw, nh,
|
||||
format, type, ndata);
|
||||
}
|
||||
if (ndata!=pixels)
|
||||
free(ndata);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*if (bound && bound->mipmap_need && !bound->mipmap_auto && (globals4es.automipmap!=3) && (!globals4es.texstream || (globals4es.texstream && !bound->streamed)))
|
||||
gles_glTexParameteri( target, GL_GENERATE_MIPMAP, GL_FALSE );*/
|
||||
gles_glTexParameteri( rtarget, GL_GENERATE_MIPMAP, GL_FALSE );*/
|
||||
|
||||
if ((target==GL_TEXTURE_2D) && globals4es.texcopydata && bound && ((globals4es.texstream && !bound->streamed) || !globals4es.texstream)) {
|
||||
//printf("*texcopy* glTexSubImage2D, xy=%i,%i, size=%i,%i=>%i,%i, format=%s, type=%s, tex=%u\n", xoffset, yoffset, width, height, bound->width, bound->height, PrintEnum(format), PrintEnum(type), bound->glname);
|
||||
@@ -1173,7 +1286,7 @@ tex_changed=1; // seems buggy, temporary disabling that...
|
||||
}
|
||||
#endif
|
||||
|
||||
target = map_tex_target(target);
|
||||
const GLuint rtarget = map_tex_target(target);
|
||||
|
||||
glstate->texture.bound[glstate->texture.active][itarget] = tex;
|
||||
|
||||
@@ -1188,7 +1301,7 @@ tex_changed=1; // seems buggy, temporary disabling that...
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
gles_glBindTexture(target, texture);
|
||||
gles_glBindTexture(rtarget, texture);
|
||||
errorGL();
|
||||
}
|
||||
}
|
||||
@@ -1201,7 +1314,7 @@ void gl4es_glTexParameteri(GLenum target, GLenum pname, GLint param) {
|
||||
PUSH_IF_COMPILING(glTexParameteri);
|
||||
LOAD_GLES(glTexParameteri);
|
||||
const GLint itarget = what_target(target);
|
||||
target = map_tex_target(target);
|
||||
const GLuint rtarget = map_tex_target(target);
|
||||
gltexture_t *texture = glstate->texture.bound[glstate->texture.active][itarget];
|
||||
switch (pname) {
|
||||
case GL_TEXTURE_MIN_FILTER:
|
||||
@@ -1238,11 +1351,17 @@ void gl4es_glTexParameteri(GLenum target, GLenum pname, GLint param) {
|
||||
if (pname==GL_TEXTURE_WRAP_S) if (texture) texture->wrap_s = param;
|
||||
if (pname==GL_TEXTURE_WRAP_T) if (texture) texture->wrap_t = param;
|
||||
break;
|
||||
case GL_TEXTURE_WRAP_R:
|
||||
// ignore it on GLES...
|
||||
break;
|
||||
case GL_TEXTURE_MAX_LEVEL:
|
||||
if (texture)
|
||||
texture->mipmap_auto = (param)?1:0;
|
||||
texture->max_level = param;
|
||||
return; // not on GLES
|
||||
case GL_TEXTURE_BASE_LEVEL:
|
||||
if (texture)
|
||||
texture->base_level = param;
|
||||
return; // not on GLES
|
||||
case GL_TEXTURE_MIN_LOD:
|
||||
case GL_TEXTURE_MAX_LOD:
|
||||
case GL_TEXTURE_LOD_BIAS:
|
||||
@@ -1254,9 +1373,10 @@ void gl4es_glTexParameteri(GLenum target, GLenum pname, GLint param) {
|
||||
default_tex_mipmap = texture->mipmap_auto;
|
||||
} else
|
||||
default_tex_mipmap = (param)?1:0; // default?
|
||||
return; // We control the behavour later
|
||||
//return; // We control the behavour later
|
||||
break;
|
||||
}
|
||||
gles_glTexParameteri(target, pname, param);
|
||||
gles_glTexParameteri(rtarget, pname, param);
|
||||
errorGL();
|
||||
}
|
||||
|
||||
@@ -1337,6 +1457,8 @@ void gl4es_glGenTextures(GLsizei n, GLuint * textures) {
|
||||
tex->mipmap_auto = 0;
|
||||
tex->mipmap_need = 0;
|
||||
tex->streamingID = -1;
|
||||
tex->base_level = -1;
|
||||
tex->max_level = -1;
|
||||
tex->streamed = false;
|
||||
tex->alpha = true;
|
||||
tex->compressed = false;
|
||||
@@ -1366,11 +1488,11 @@ void gl4es_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GL
|
||||
*params = 0;
|
||||
noerrorShim();
|
||||
const GLuint itarget = what_target(target);
|
||||
target = map_tex_target(target);
|
||||
const GLuint rtarget = map_tex_target(target);
|
||||
gltexture_t* bound = glstate->texture.bound[glstate->texture.active][itarget];
|
||||
switch (pname) {
|
||||
case GL_TEXTURE_WIDTH:
|
||||
if (target==GL_PROXY_TEXTURE_2D)
|
||||
if (rtarget==GL_PROXY_TEXTURE_2D)
|
||||
(*params) = nlevel(proxy_width,level);
|
||||
else {
|
||||
(*params) = nlevel((bound)?bound->width:2048,level);
|
||||
@@ -1379,7 +1501,7 @@ void gl4es_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GL
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_HEIGHT:
|
||||
if (target==GL_PROXY_TEXTURE_2D)
|
||||
if (rtarget==GL_PROXY_TEXTURE_2D)
|
||||
(*params) = nlevel(proxy_height,level);
|
||||
else {
|
||||
(*params) = nlevel((bound)?bound->height:2048,level);
|
||||
@@ -1388,7 +1510,7 @@ void gl4es_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GL
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_INTERNAL_FORMAT:
|
||||
if (target==GL_PROXY_TEXTURE_2D)
|
||||
if (rtarget==GL_PROXY_TEXTURE_2D)
|
||||
(*params) = proxy_intformat;
|
||||
else {
|
||||
if (bound && bound->compressed)
|
||||
@@ -1493,7 +1615,7 @@ void gl4es_glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type,
|
||||
//printf("STUBBED glGetTexImage with level=%i\n", level);
|
||||
void* tmp = malloc(width*height*pixel_sizeof(format, type)); // tmp space...
|
||||
void* tmp2;
|
||||
gl4es_glGetTexImage(target, 0, format, type, tmp);
|
||||
gl4es_glGetTexImage(map_tex_target(target), 0, format, type, tmp);
|
||||
for (int i=0; i<level; i++) {
|
||||
pixel_halfscale(tmp, &tmp2, width, height, format, type);
|
||||
free(tmp);
|
||||
@@ -1932,7 +2054,7 @@ void gl4es_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalfor
|
||||
GLsizei imageSize, const GLvoid *data)
|
||||
{
|
||||
const GLuint itarget = what_target(target);
|
||||
target = map_tex_target(target);
|
||||
const GLuint rtarget = map_tex_target(target);
|
||||
if (target == GL_PROXY_TEXTURE_2D) {
|
||||
proxy_width = (width>2048)?0:width;
|
||||
proxy_height = (height>2048)?0:height;
|
||||
@@ -2029,7 +2151,7 @@ void gl4es_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalfor
|
||||
gl4es_glGetIntegerv(GL_UNPACK_ALIGNMENT, &oldalign);
|
||||
if (oldalign!=1)
|
||||
gl4es_glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
gl4es_glTexImage2D(target, level, format==GL_RGBA?GL_COMPRESSED_RGBA:GL_COMPRESSED_RGB, nlevel(width,fact), nlevel(height,fact), border, format, type, half);
|
||||
gl4es_glTexImage2D(rtarget, level, format==GL_RGBA?GL_COMPRESSED_RGBA:GL_COMPRESSED_RGB, nlevel(width,fact), nlevel(height,fact), border, format, type, half);
|
||||
// re-update bounded texture info
|
||||
bound->compressed = true;
|
||||
bound->internalformat = internalformat;
|
||||
@@ -2045,7 +2167,7 @@ void gl4es_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalfor
|
||||
bound->type = GL_UNSIGNED_BYTE;
|
||||
bound->internalformat = internalformat;
|
||||
bound->compressed = true;
|
||||
gles_glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, datab);
|
||||
gles_glCompressedTexImage2D(rtarget, level, internalformat, width, height, border, imageSize, datab);
|
||||
}
|
||||
glstate->vao->unpack = unpack;
|
||||
glstate->gl_batch = old_glbatch;
|
||||
|
||||
@@ -126,6 +126,8 @@ typedef struct {
|
||||
GLboolean compressed;
|
||||
GLboolean streamed;
|
||||
int streamingID;
|
||||
int base_level;
|
||||
int max_level;
|
||||
GLvoid *data; // in case we want to keep a copy of it (it that case, always RGBA/GL_UNSIGNED_BYTE
|
||||
} gltexture_t;
|
||||
|
||||
@@ -140,6 +142,7 @@ static inline GLenum map_tex_target(GLenum target) {
|
||||
break;
|
||||
case GL_PROXY_TEXTURE_1D:
|
||||
case GL_PROXY_TEXTURE_3D:
|
||||
case GL_PROXY_TEXTURE_RECTANGLE_ARB:
|
||||
target = GL_PROXY_TEXTURE_2D;
|
||||
break;
|
||||
}
|
||||
@@ -184,7 +187,7 @@ static inline GLenum to_target(GLuint itarget) {
|
||||
}
|
||||
}
|
||||
#define IS_TEX2D(T) (T&(1<<ENABLED_TEX2D))
|
||||
#define IS_ANYTEX(T) (T&((1<<ENABLED_TEX2D)|(1<<ENABLED_TEX1D)|(1<<ENABLED_TEX3D)))
|
||||
#define IS_ANYTEX(T) (T&((1<<ENABLED_TEX2D)|(1<<ENABLED_TEX1D)|(1<<ENABLED_TEX3D)|(1<<ENABLED_TEXTURE_RECTANGLE)))
|
||||
|
||||
static inline GLint get_target(GLuint enabled) {
|
||||
if(!enabled)
|
||||
|
||||
@@ -85,7 +85,12 @@ void gl4es_glGetMaterialiv(GLenum face, GLenum pname, GLint * params) {
|
||||
GLfloat fparams[4];
|
||||
gl4es_glGetMaterialfv(face, pname, fparams);
|
||||
if (pname==GL_SHININESS) *params=fparams[0];
|
||||
else for (int i=0; i<4; i++) params[i]=fparams[i];
|
||||
else {
|
||||
if (pname==GL_COLOR_INDEXES)
|
||||
for (int i=0; i<3; i++) params[i]=fparams[i];
|
||||
else
|
||||
for (int i=0; i<4; i++) params[i]=((int)fparams[i]*32767)<<16;
|
||||
}
|
||||
}
|
||||
void gl4es_glGetLightiv(GLenum light, GLenum pname, GLint * params) {
|
||||
GLfloat fparams[4];
|
||||
@@ -95,7 +100,10 @@ void gl4es_glGetLightiv(GLenum light, GLenum pname, GLint * params) {
|
||||
if (pname==GL_SPOT_CUTOFF) n=1;
|
||||
if (pname==GL_SPOT_EXPONENT) n=1;
|
||||
if (pname==GL_SPOT_DIRECTION) n=3;
|
||||
else for (int i=0; i<n; i++) params[i]=fparams[i];
|
||||
if(pname==GL_AMBIENT || pname==GL_DIFFUSE || pname==GL_SPECULAR)
|
||||
for (int i=0; i<n; i++) params[i]=((int)fparams[i]*32767)<<16;
|
||||
else
|
||||
for (int i=0; i<n; i++) params[i]=fparams[i];
|
||||
}
|
||||
void gl4es_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params) {
|
||||
GLint iparams;
|
||||
@@ -124,26 +132,28 @@ void gl4es_glPixelTransferi(GLenum pname, GLint param) {
|
||||
}
|
||||
|
||||
void gl4es_glLightiv(GLenum light, GLenum pname, GLint *iparams) {
|
||||
GLfloat params[4];
|
||||
switch (pname) {
|
||||
case GL_AMBIENT:
|
||||
case GL_DIFFUSE:
|
||||
case GL_SPECULAR:
|
||||
case GL_POSITION: {
|
||||
GLfloat params[4];
|
||||
for (int i = 0; i < 4; i++) {
|
||||
params[i] = (iparams[i]>>16)/32767.f;
|
||||
}
|
||||
gl4es_glLightfv(light, pname, params);
|
||||
break;
|
||||
case GL_POSITION:
|
||||
for (int i = 0; i < 4; i++) {
|
||||
params[i] = iparams[i];
|
||||
}
|
||||
gl4es_glLightfv(light, pname, params);
|
||||
break;
|
||||
}
|
||||
case GL_SPOT_DIRECTION: {
|
||||
GLfloat params[4];
|
||||
case GL_SPOT_DIRECTION:
|
||||
for (int i = 0; i < 4; i++) {
|
||||
params[i] = iparams[i];
|
||||
}
|
||||
gl4es_glLightfv(light, pname, params);
|
||||
break;
|
||||
}
|
||||
case GL_SPOT_EXPONENT:
|
||||
case GL_SPOT_CUTOFF:
|
||||
case GL_CONSTANT_ATTENUATION:
|
||||
@@ -186,10 +196,11 @@ printf("glMaterialiv(%04X, %04X, [%i,...]\n", face, pname, iparams[0]);
|
||||
case GL_DIFFUSE:
|
||||
case GL_SPECULAR:
|
||||
case GL_EMISSION:
|
||||
case GL_AMBIENT_AND_DIFFUSE:
|
||||
{
|
||||
GLfloat params[4];
|
||||
for (int i = 0; i < 4; i++) {
|
||||
params[i] = iparams[i]; // should divide by MAX_INT
|
||||
params[i] = (iparams[i]>>16)/32767.f;
|
||||
}
|
||||
gl4es_glMaterialfv(face, pname, params);
|
||||
break;
|
||||
@@ -202,10 +213,6 @@ printf("glMaterialiv(%04X, %04X, [%i,...]\n", face, pname, iparams[0]);
|
||||
}
|
||||
gl4es_glMaterialfv(face, pname, params);
|
||||
break;
|
||||
}
|
||||
case GL_AMBIENT_AND_DIFFUSE: {
|
||||
gl4es_glMaterialf(face, pname, *iparams);
|
||||
break;
|
||||
}
|
||||
case GL_COLOR_INDEXES:
|
||||
{
|
||||
|
||||
433
project/jni/gl4es/src/gl/wrap/gles.c
Executable file → Normal file
433
project/jni/gl4es/src/gl/wrap/gles.c
Executable file → Normal file
@@ -1,4 +1,3 @@
|
||||
#ifndef USE_ES2
|
||||
#include "gles.h"
|
||||
#ifndef skip_glActiveTexture
|
||||
void gl4es_glActiveTexture(GLenum texture) {
|
||||
@@ -40,6 +39,26 @@ void gl4es_glBindBuffer(GLenum target, GLuint buffer) {
|
||||
}
|
||||
void glBindBuffer(GLenum target, GLuint buffer) __attribute__((alias("gl4es_glBindBuffer"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBindFramebuffer
|
||||
void gl4es_glBindFramebuffer(GLenum target, GLuint framebuffer) {
|
||||
LOAD_GLES_OES(glBindFramebuffer);
|
||||
#ifndef direct_glBindFramebuffer
|
||||
PUSH_IF_COMPILING(glBindFramebuffer)
|
||||
#endif
|
||||
gles_glBindFramebuffer(target, framebuffer);
|
||||
}
|
||||
void glBindFramebuffer(GLenum target, GLuint framebuffer) __attribute__((alias("gl4es_glBindFramebuffer"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBindRenderbuffer
|
||||
void gl4es_glBindRenderbuffer(GLenum target, GLuint renderbuffer) {
|
||||
LOAD_GLES_OES(glBindRenderbuffer);
|
||||
#ifndef direct_glBindRenderbuffer
|
||||
PUSH_IF_COMPILING(glBindRenderbuffer)
|
||||
#endif
|
||||
gles_glBindRenderbuffer(target, renderbuffer);
|
||||
}
|
||||
void glBindRenderbuffer(GLenum target, GLuint renderbuffer) __attribute__((alias("gl4es_glBindRenderbuffer"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBindTexture
|
||||
void gl4es_glBindTexture(GLenum target, GLuint texture) {
|
||||
LOAD_GLES(glBindTexture);
|
||||
@@ -50,6 +69,36 @@ void gl4es_glBindTexture(GLenum target, GLuint texture) {
|
||||
}
|
||||
void glBindTexture(GLenum target, GLuint texture) __attribute__((alias("gl4es_glBindTexture"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBlendColor
|
||||
void gl4es_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
|
||||
LOAD_GLES_OES(glBlendColor);
|
||||
#ifndef direct_glBlendColor
|
||||
PUSH_IF_COMPILING(glBlendColor)
|
||||
#endif
|
||||
gles_glBlendColor(red, green, blue, alpha);
|
||||
}
|
||||
void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) __attribute__((alias("gl4es_glBlendColor"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBlendEquation
|
||||
void gl4es_glBlendEquation(GLenum mode) {
|
||||
LOAD_GLES_OES(glBlendEquation);
|
||||
#ifndef direct_glBlendEquation
|
||||
PUSH_IF_COMPILING(glBlendEquation)
|
||||
#endif
|
||||
gles_glBlendEquation(mode);
|
||||
}
|
||||
void glBlendEquation(GLenum mode) __attribute__((alias("gl4es_glBlendEquation"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBlendEquationSeparate
|
||||
void gl4es_glBlendEquationSeparate(GLenum modeRGB, GLenum modeA) {
|
||||
LOAD_GLES_OES(glBlendEquationSeparate);
|
||||
#ifndef direct_glBlendEquationSeparate
|
||||
PUSH_IF_COMPILING(glBlendEquationSeparate)
|
||||
#endif
|
||||
gles_glBlendEquationSeparate(modeRGB, modeA);
|
||||
}
|
||||
void glBlendEquationSeparate(GLenum modeRGB, GLenum modeA) __attribute__((alias("gl4es_glBlendEquationSeparate"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBlendFunc
|
||||
void gl4es_glBlendFunc(GLenum sfactor, GLenum dfactor) {
|
||||
LOAD_GLES(glBlendFunc);
|
||||
@@ -60,6 +109,16 @@ void gl4es_glBlendFunc(GLenum sfactor, GLenum dfactor) {
|
||||
}
|
||||
void glBlendFunc(GLenum sfactor, GLenum dfactor) __attribute__((alias("gl4es_glBlendFunc"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBlendFuncSeparate
|
||||
void gl4es_glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) {
|
||||
LOAD_GLES_OES(glBlendFuncSeparate);
|
||||
#ifndef direct_glBlendFuncSeparate
|
||||
PUSH_IF_COMPILING(glBlendFuncSeparate)
|
||||
#endif
|
||||
gles_glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
|
||||
}
|
||||
void glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) __attribute__((alias("gl4es_glBlendFuncSeparate"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBufferData
|
||||
void gl4es_glBufferData(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage) {
|
||||
LOAD_GLES(glBufferData);
|
||||
@@ -80,6 +139,16 @@ void gl4es_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, cons
|
||||
}
|
||||
void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data) __attribute__((alias("gl4es_glBufferSubData"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glCheckFramebufferStatus
|
||||
GLenum gl4es_glCheckFramebufferStatus(GLenum target) {
|
||||
LOAD_GLES_OES(glCheckFramebufferStatus);
|
||||
#ifndef direct_glCheckFramebufferStatus
|
||||
PUSH_IF_COMPILING(glCheckFramebufferStatus)
|
||||
#endif
|
||||
return gles_glCheckFramebufferStatus(target);
|
||||
}
|
||||
GLenum glCheckFramebufferStatus(GLenum target) __attribute__((alias("gl4es_glCheckFramebufferStatus"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glClear
|
||||
void gl4es_glClear(GLbitfield mask) {
|
||||
LOAD_GLES(glClear);
|
||||
@@ -280,6 +349,26 @@ void gl4es_glDeleteBuffers(GLsizei n, const GLuint * buffers) {
|
||||
}
|
||||
void glDeleteBuffers(GLsizei n, const GLuint * buffers) __attribute__((alias("gl4es_glDeleteBuffers"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glDeleteFramebuffers
|
||||
void gl4es_glDeleteFramebuffers(GLsizei n, GLuint * framebuffers) {
|
||||
LOAD_GLES_OES(glDeleteFramebuffers);
|
||||
#ifndef direct_glDeleteFramebuffers
|
||||
PUSH_IF_COMPILING(glDeleteFramebuffers)
|
||||
#endif
|
||||
gles_glDeleteFramebuffers(n, framebuffers);
|
||||
}
|
||||
void glDeleteFramebuffers(GLsizei n, GLuint * framebuffers) __attribute__((alias("gl4es_glDeleteFramebuffers"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glDeleteRenderbuffers
|
||||
void gl4es_glDeleteRenderbuffers(GLsizei n, GLuint * renderbuffers) {
|
||||
LOAD_GLES_OES(glDeleteRenderbuffers);
|
||||
#ifndef direct_glDeleteRenderbuffers
|
||||
PUSH_IF_COMPILING(glDeleteRenderbuffers)
|
||||
#endif
|
||||
gles_glDeleteRenderbuffers(n, renderbuffers);
|
||||
}
|
||||
void glDeleteRenderbuffers(GLsizei n, GLuint * renderbuffers) __attribute__((alias("gl4es_glDeleteRenderbuffers"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glDeleteTextures
|
||||
void gl4es_glDeleteTextures(GLsizei n, const GLuint * textures) {
|
||||
LOAD_GLES(glDeleteTextures);
|
||||
@@ -370,6 +459,26 @@ void gl4es_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid
|
||||
}
|
||||
void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices) __attribute__((alias("gl4es_glDrawElements"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glDrawTexf
|
||||
void gl4es_glDrawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) {
|
||||
LOAD_GLES_OES(glDrawTexf);
|
||||
#ifndef direct_glDrawTexf
|
||||
PUSH_IF_COMPILING(glDrawTexf)
|
||||
#endif
|
||||
gles_glDrawTexf(x, y, z, width, height);
|
||||
}
|
||||
void glDrawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) __attribute__((alias("gl4es_glDrawTexf"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glDrawTexi
|
||||
void gl4es_glDrawTexi(GLint x, GLint y, GLint z, GLint width, GLint height) {
|
||||
LOAD_GLES_OES(glDrawTexi);
|
||||
#ifndef direct_glDrawTexi
|
||||
PUSH_IF_COMPILING(glDrawTexi)
|
||||
#endif
|
||||
gles_glDrawTexi(x, y, z, width, height);
|
||||
}
|
||||
void glDrawTexi(GLint x, GLint y, GLint z, GLint width, GLint height) __attribute__((alias("gl4es_glDrawTexi"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glEnable
|
||||
void gl4es_glEnable(GLenum cap) {
|
||||
LOAD_GLES(glEnable);
|
||||
@@ -450,6 +559,26 @@ void gl4es_glFogxv(GLenum pname, const GLfixed * params) {
|
||||
}
|
||||
void glFogxv(GLenum pname, const GLfixed * params) __attribute__((alias("gl4es_glFogxv"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glFramebufferRenderbuffer
|
||||
void gl4es_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
|
||||
LOAD_GLES_OES(glFramebufferRenderbuffer);
|
||||
#ifndef direct_glFramebufferRenderbuffer
|
||||
PUSH_IF_COMPILING(glFramebufferRenderbuffer)
|
||||
#endif
|
||||
gles_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
|
||||
}
|
||||
void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) __attribute__((alias("gl4es_glFramebufferRenderbuffer"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glFramebufferTexture2D
|
||||
void gl4es_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
|
||||
LOAD_GLES_OES(glFramebufferTexture2D);
|
||||
#ifndef direct_glFramebufferTexture2D
|
||||
PUSH_IF_COMPILING(glFramebufferTexture2D)
|
||||
#endif
|
||||
gles_glFramebufferTexture2D(target, attachment, textarget, texture, level);
|
||||
}
|
||||
void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) __attribute__((alias("gl4es_glFramebufferTexture2D"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glFrontFace
|
||||
void gl4es_glFrontFace(GLenum mode) {
|
||||
LOAD_GLES(glFrontFace);
|
||||
@@ -490,6 +619,26 @@ void gl4es_glGenBuffers(GLsizei n, GLuint * buffers) {
|
||||
}
|
||||
void glGenBuffers(GLsizei n, GLuint * buffers) __attribute__((alias("gl4es_glGenBuffers"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGenFramebuffers
|
||||
void gl4es_glGenFramebuffers(GLsizei n, GLuint * ids) {
|
||||
LOAD_GLES_OES(glGenFramebuffers);
|
||||
#ifndef direct_glGenFramebuffers
|
||||
PUSH_IF_COMPILING(glGenFramebuffers)
|
||||
#endif
|
||||
gles_glGenFramebuffers(n, ids);
|
||||
}
|
||||
void glGenFramebuffers(GLsizei n, GLuint * ids) __attribute__((alias("gl4es_glGenFramebuffers"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGenRenderbuffers
|
||||
void gl4es_glGenRenderbuffers(GLsizei n, GLuint * renderbuffers) {
|
||||
LOAD_GLES_OES(glGenRenderbuffers);
|
||||
#ifndef direct_glGenRenderbuffers
|
||||
PUSH_IF_COMPILING(glGenRenderbuffers)
|
||||
#endif
|
||||
gles_glGenRenderbuffers(n, renderbuffers);
|
||||
}
|
||||
void glGenRenderbuffers(GLsizei n, GLuint * renderbuffers) __attribute__((alias("gl4es_glGenRenderbuffers"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGenTextures
|
||||
void gl4es_glGenTextures(GLsizei n, GLuint * textures) {
|
||||
LOAD_GLES(glGenTextures);
|
||||
@@ -500,6 +649,16 @@ void gl4es_glGenTextures(GLsizei n, GLuint * textures) {
|
||||
}
|
||||
void glGenTextures(GLsizei n, GLuint * textures) __attribute__((alias("gl4es_glGenTextures"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGenerateMipmap
|
||||
void gl4es_glGenerateMipmap(GLenum target) {
|
||||
LOAD_GLES_OES(glGenerateMipmap);
|
||||
#ifndef direct_glGenerateMipmap
|
||||
PUSH_IF_COMPILING(glGenerateMipmap)
|
||||
#endif
|
||||
gles_glGenerateMipmap(target);
|
||||
}
|
||||
void glGenerateMipmap(GLenum target) __attribute__((alias("gl4es_glGenerateMipmap"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGetBooleanv
|
||||
void gl4es_glGetBooleanv(GLenum pname, GLboolean * params) {
|
||||
LOAD_GLES(glGetBooleanv);
|
||||
@@ -570,6 +729,16 @@ void gl4es_glGetFloatv(GLenum pname, GLfloat * params) {
|
||||
}
|
||||
void glGetFloatv(GLenum pname, GLfloat * params) __attribute__((alias("gl4es_glGetFloatv"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGetFramebufferAttachmentParameteriv
|
||||
void gl4es_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint * params) {
|
||||
LOAD_GLES_OES(glGetFramebufferAttachmentParameteriv);
|
||||
#ifndef direct_glGetFramebufferAttachmentParameteriv
|
||||
PUSH_IF_COMPILING(glGetFramebufferAttachmentParameteriv)
|
||||
#endif
|
||||
gles_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
|
||||
}
|
||||
void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint * params) __attribute__((alias("gl4es_glGetFramebufferAttachmentParameteriv"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGetIntegerv
|
||||
void gl4es_glGetIntegerv(GLenum pname, GLint * params) {
|
||||
LOAD_GLES(glGetIntegerv);
|
||||
@@ -630,6 +799,16 @@ void gl4es_glGetPointerv(GLenum pname, GLvoid ** params) {
|
||||
}
|
||||
void glGetPointerv(GLenum pname, GLvoid ** params) __attribute__((alias("gl4es_glGetPointerv"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGetRenderbufferParameteriv
|
||||
void gl4es_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params) {
|
||||
LOAD_GLES_OES(glGetRenderbufferParameteriv);
|
||||
#ifndef direct_glGetRenderbufferParameteriv
|
||||
PUSH_IF_COMPILING(glGetRenderbufferParameteriv)
|
||||
#endif
|
||||
gles_glGetRenderbufferParameteriv(target, pname, params);
|
||||
}
|
||||
void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params) __attribute__((alias("gl4es_glGetRenderbufferParameteriv"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGetString
|
||||
const GLubyte * gl4es_glGetString(GLenum name) {
|
||||
LOAD_GLES(glGetString);
|
||||
@@ -730,6 +909,26 @@ GLboolean gl4es_glIsEnabled(GLenum cap) {
|
||||
}
|
||||
GLboolean glIsEnabled(GLenum cap) __attribute__((alias("gl4es_glIsEnabled"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glIsFramebuffer
|
||||
GLboolean gl4es_glIsFramebuffer(GLuint framebuffer) {
|
||||
LOAD_GLES_OES(glIsFramebuffer);
|
||||
#ifndef direct_glIsFramebuffer
|
||||
PUSH_IF_COMPILING(glIsFramebuffer)
|
||||
#endif
|
||||
return gles_glIsFramebuffer(framebuffer);
|
||||
}
|
||||
GLboolean glIsFramebuffer(GLuint framebuffer) __attribute__((alias("gl4es_glIsFramebuffer"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glIsRenderbuffer
|
||||
GLboolean gl4es_glIsRenderbuffer(GLuint renderbuffer) {
|
||||
LOAD_GLES_OES(glIsRenderbuffer);
|
||||
#ifndef direct_glIsRenderbuffer
|
||||
PUSH_IF_COMPILING(glIsRenderbuffer)
|
||||
#endif
|
||||
return gles_glIsRenderbuffer(renderbuffer);
|
||||
}
|
||||
GLboolean glIsRenderbuffer(GLuint renderbuffer) __attribute__((alias("gl4es_glIsRenderbuffer"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glIsTexture
|
||||
GLboolean gl4es_glIsTexture(GLuint texture) {
|
||||
LOAD_GLES(glIsTexture);
|
||||
@@ -950,6 +1149,26 @@ void gl4es_glMultMatrixx(const GLfixed * m) {
|
||||
}
|
||||
void glMultMatrixx(const GLfixed * m) __attribute__((alias("gl4es_glMultMatrixx"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glMultiDrawArrays
|
||||
void gl4es_glMultiDrawArrays(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount) {
|
||||
LOAD_GLES_OES(glMultiDrawArrays);
|
||||
#ifndef direct_glMultiDrawArrays
|
||||
PUSH_IF_COMPILING(glMultiDrawArrays)
|
||||
#endif
|
||||
gles_glMultiDrawArrays(mode, first, count, primcount);
|
||||
}
|
||||
void glMultiDrawArrays(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount) __attribute__((alias("gl4es_glMultiDrawArrays"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glMultiDrawElements
|
||||
void gl4es_glMultiDrawElements(GLenum mode, GLsizei * count, GLenum type, const void * const * indices, GLsizei primcount) {
|
||||
LOAD_GLES_OES(glMultiDrawElements);
|
||||
#ifndef direct_glMultiDrawElements
|
||||
PUSH_IF_COMPILING(glMultiDrawElements)
|
||||
#endif
|
||||
gles_glMultiDrawElements(mode, count, type, indices, primcount);
|
||||
}
|
||||
void glMultiDrawElements(GLenum mode, GLsizei * count, GLenum type, const void * const * indices, GLsizei primcount) __attribute__((alias("gl4es_glMultiDrawElements"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glMultiTexCoord4f
|
||||
void gl4es_glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) {
|
||||
LOAD_GLES(glMultiTexCoord4f);
|
||||
@@ -1150,6 +1369,16 @@ void gl4es_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum
|
||||
}
|
||||
void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels) __attribute__((alias("gl4es_glReadPixels"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glRenderbufferStorage
|
||||
void gl4es_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
|
||||
LOAD_GLES_OES(glRenderbufferStorage);
|
||||
#ifndef direct_glRenderbufferStorage
|
||||
PUSH_IF_COMPILING(glRenderbufferStorage)
|
||||
#endif
|
||||
gles_glRenderbufferStorage(target, internalformat, width, height);
|
||||
}
|
||||
void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) __attribute__((alias("gl4es_glRenderbufferStorage"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glRotatef
|
||||
void gl4es_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) {
|
||||
LOAD_GLES(glRotatef);
|
||||
@@ -1330,6 +1559,26 @@ void gl4es_glTexEnvxv(GLenum target, GLenum pname, const GLfixed * params) {
|
||||
}
|
||||
void glTexEnvxv(GLenum target, GLenum pname, const GLfixed * params) __attribute__((alias("gl4es_glTexEnvxv"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glTexGenfv
|
||||
void gl4es_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params) {
|
||||
LOAD_GLES_OES(glTexGenfv);
|
||||
#ifndef direct_glTexGenfv
|
||||
PUSH_IF_COMPILING(glTexGenfv)
|
||||
#endif
|
||||
gles_glTexGenfv(coord, pname, params);
|
||||
}
|
||||
void glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params) __attribute__((alias("gl4es_glTexGenfv"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glTexGeni
|
||||
void gl4es_glTexGeni(GLenum coord, GLenum pname, GLint param) {
|
||||
LOAD_GLES_OES(glTexGeni);
|
||||
#ifndef direct_glTexGeni
|
||||
PUSH_IF_COMPILING(glTexGeni)
|
||||
#endif
|
||||
gles_glTexGeni(coord, pname, param);
|
||||
}
|
||||
void glTexGeni(GLenum coord, GLenum pname, GLint param) __attribute__((alias("gl4es_glTexGeni"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glTexImage2D
|
||||
void gl4es_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels) {
|
||||
LOAD_GLES(glTexImage2D);
|
||||
@@ -1476,12 +1725,24 @@ void glPackedCall(const packed_call_t *packed) {
|
||||
unpacked->func(args.a1, args.a2);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLclampf_GLclampf_GLclampf_GLclampf: {
|
||||
PACKED_void_GLclampf_GLclampf_GLclampf_GLclampf *unpacked = (PACKED_void_GLclampf_GLclampf_GLclampf_GLclampf *)packed;
|
||||
ARGS_void_GLclampf_GLclampf_GLclampf_GLclampf args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLenum: {
|
||||
PACKED_void_GLenum_GLenum *unpacked = (PACKED_void_GLenum_GLenum *)packed;
|
||||
ARGS_void_GLenum_GLenum args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLenum_GLenum_GLenum: {
|
||||
PACKED_void_GLenum_GLenum_GLenum_GLenum *unpacked = (PACKED_void_GLenum_GLenum_GLenum_GLenum *)packed;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLenum args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLsizeiptr_const_GLvoid___GENPT___GLenum: {
|
||||
PACKED_void_GLenum_GLsizeiptr_const_GLvoid___GENPT___GLenum *unpacked = (PACKED_void_GLenum_GLsizeiptr_const_GLvoid___GENPT___GLenum *)packed;
|
||||
ARGS_void_GLenum_GLsizeiptr_const_GLvoid___GENPT___GLenum args = unpacked->args;
|
||||
@@ -1494,18 +1755,18 @@ void glPackedCall(const packed_call_t *packed) {
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4);
|
||||
break;
|
||||
}
|
||||
case FORMAT_GLenum_GLenum: {
|
||||
PACKED_GLenum_GLenum *unpacked = (PACKED_GLenum_GLenum *)packed;
|
||||
ARGS_GLenum_GLenum args = unpacked->args;
|
||||
unpacked->func(args.a1);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLbitfield: {
|
||||
PACKED_void_GLbitfield *unpacked = (PACKED_void_GLbitfield *)packed;
|
||||
ARGS_void_GLbitfield args = unpacked->args;
|
||||
unpacked->func(args.a1);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLclampf_GLclampf_GLclampf_GLclampf: {
|
||||
PACKED_void_GLclampf_GLclampf_GLclampf_GLclampf *unpacked = (PACKED_void_GLclampf_GLclampf_GLclampf_GLclampf *)packed;
|
||||
ARGS_void_GLclampf_GLclampf_GLclampf_GLclampf args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLclampx_GLclampx_GLclampx_GLclampx: {
|
||||
PACKED_void_GLclampx_GLclampx_GLclampx_GLclampx *unpacked = (PACKED_void_GLclampx_GLclampx_GLclampx_GLclampx *)packed;
|
||||
ARGS_void_GLclampx_GLclampx_GLclampx_GLclampx args = unpacked->args;
|
||||
@@ -1602,6 +1863,12 @@ void glPackedCall(const packed_call_t *packed) {
|
||||
unpacked->func(args.a1, args.a2);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLsizei_GLuint___GENPT__: {
|
||||
PACKED_void_GLsizei_GLuint___GENPT__ *unpacked = (PACKED_void_GLsizei_GLuint___GENPT__ *)packed;
|
||||
ARGS_void_GLsizei_GLuint___GENPT__ args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLboolean: {
|
||||
PACKED_void_GLboolean *unpacked = (PACKED_void_GLboolean *)packed;
|
||||
ARGS_void_GLboolean args = unpacked->args;
|
||||
@@ -1632,6 +1899,18 @@ void glPackedCall(const packed_call_t *packed) {
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat: {
|
||||
PACKED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat *unpacked = (PACKED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat *)packed;
|
||||
ARGS_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4, args.a5);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLint_GLint_GLint_GLint_GLint: {
|
||||
PACKED_void_GLint_GLint_GLint_GLint_GLint *unpacked = (PACKED_void_GLint_GLint_GLint_GLint_GLint *)packed;
|
||||
ARGS_void_GLint_GLint_GLint_GLint_GLint args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4, args.a5);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void: {
|
||||
PACKED_void *unpacked = (PACKED_void *)packed;
|
||||
unpacked->func();
|
||||
@@ -1649,6 +1928,18 @@ void glPackedCall(const packed_call_t *packed) {
|
||||
unpacked->func(args.a1, args.a2);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLenum_GLenum_GLuint: {
|
||||
PACKED_void_GLenum_GLenum_GLenum_GLuint *unpacked = (PACKED_void_GLenum_GLenum_GLenum_GLuint *)packed;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLuint args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLenum_GLenum_GLuint_GLint: {
|
||||
PACKED_void_GLenum_GLenum_GLenum_GLuint_GLint *unpacked = (PACKED_void_GLenum_GLenum_GLenum_GLuint_GLint *)packed;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLuint_GLint args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4, args.a5);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat: {
|
||||
PACKED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat *unpacked = (PACKED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat *)packed;
|
||||
ARGS_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat args = unpacked->args;
|
||||
@@ -1661,12 +1952,6 @@ void glPackedCall(const packed_call_t *packed) {
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4, args.a5, args.a6);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLsizei_GLuint___GENPT__: {
|
||||
PACKED_void_GLsizei_GLuint___GENPT__ *unpacked = (PACKED_void_GLsizei_GLuint___GENPT__ *)packed;
|
||||
ARGS_void_GLsizei_GLuint___GENPT__ args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLboolean___GENPT__: {
|
||||
PACKED_void_GLenum_GLboolean___GENPT__ *unpacked = (PACKED_void_GLenum_GLboolean___GENPT__ *)packed;
|
||||
ARGS_void_GLenum_GLboolean___GENPT__ args = unpacked->args;
|
||||
@@ -1696,6 +1981,12 @@ void glPackedCall(const packed_call_t *packed) {
|
||||
unpacked->func();
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLenum_GLenum_GLint___GENPT__: {
|
||||
PACKED_void_GLenum_GLenum_GLenum_GLint___GENPT__ *unpacked = (PACKED_void_GLenum_GLenum_GLenum_GLint___GENPT__ *)packed;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLint___GENPT__ args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLint___GENPT__: {
|
||||
PACKED_void_GLenum_GLint___GENPT__ *unpacked = (PACKED_void_GLenum_GLint___GENPT__ *)packed;
|
||||
ARGS_void_GLenum_GLint___GENPT__ args = unpacked->args;
|
||||
@@ -1786,6 +2077,18 @@ void glPackedCall(const packed_call_t *packed) {
|
||||
unpacked->func(args.a1);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei: {
|
||||
PACKED_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei *unpacked = (PACKED_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei *)packed;
|
||||
ARGS_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei: {
|
||||
PACKED_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei *unpacked = (PACKED_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei *)packed;
|
||||
ARGS_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4, args.a5);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLfloat_GLfloat_GLfloat_GLfloat: {
|
||||
PACKED_void_GLenum_GLfloat_GLfloat_GLfloat_GLfloat *unpacked = (PACKED_void_GLenum_GLfloat_GLfloat_GLfloat_GLfloat *)packed;
|
||||
ARGS_void_GLenum_GLfloat_GLfloat_GLfloat_GLfloat args = unpacked->args;
|
||||
@@ -1840,6 +2143,12 @@ void glPackedCall(const packed_call_t *packed) {
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4, args.a5, args.a6, args.a7);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLenum_GLsizei_GLsizei: {
|
||||
PACKED_void_GLenum_GLenum_GLsizei_GLsizei *unpacked = (PACKED_void_GLenum_GLenum_GLsizei_GLsizei *)packed;
|
||||
ARGS_void_GLenum_GLenum_GLsizei_GLsizei args = unpacked->args;
|
||||
unpacked->func(args.a1, args.a2, args.a3, args.a4);
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLclampf_GLboolean: {
|
||||
PACKED_void_GLclampf_GLboolean *unpacked = (PACKED_void_GLclampf_GLboolean *)packed;
|
||||
ARGS_void_GLclampf_GLboolean args = unpacked->args;
|
||||
@@ -1933,6 +2242,13 @@ packed_call_t* glCopyPackedCall(const packed_call_t *packed) {
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLclampf_GLclampf_GLclampf_GLclampf: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLclampf_GLclampf_GLclampf_GLclampf);
|
||||
PACKED_void_GLclampf_GLclampf_GLclampf_GLclampf *newpacked = (PACKED_void_GLclampf_GLclampf_GLclampf_GLclampf*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLenum: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLenum_GLenum);
|
||||
PACKED_void_GLenum_GLenum *newpacked = (PACKED_void_GLenum_GLenum*)malloc(sizeofpacked);
|
||||
@@ -1940,6 +2256,13 @@ packed_call_t* glCopyPackedCall(const packed_call_t *packed) {
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLenum_GLenum_GLenum: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLenum_GLenum_GLenum_GLenum);
|
||||
PACKED_void_GLenum_GLenum_GLenum_GLenum *newpacked = (PACKED_void_GLenum_GLenum_GLenum_GLenum*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLsizeiptr_const_GLvoid___GENPT___GLenum: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLenum_GLsizeiptr_const_GLvoid___GENPT___GLenum);
|
||||
PACKED_void_GLenum_GLsizeiptr_const_GLvoid___GENPT___GLenum *newpacked = (PACKED_void_GLenum_GLsizeiptr_const_GLvoid___GENPT___GLenum*)malloc(sizeofpacked);
|
||||
@@ -1954,16 +2277,16 @@ packed_call_t* glCopyPackedCall(const packed_call_t *packed) {
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLbitfield: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLbitfield);
|
||||
PACKED_void_GLbitfield *newpacked = (PACKED_void_GLbitfield*)malloc(sizeofpacked);
|
||||
case FORMAT_GLenum_GLenum: {
|
||||
int sizeofpacked = sizeof(PACKED_GLenum_GLenum);
|
||||
PACKED_GLenum_GLenum *newpacked = (PACKED_GLenum_GLenum*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLclampf_GLclampf_GLclampf_GLclampf: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLclampf_GLclampf_GLclampf_GLclampf);
|
||||
PACKED_void_GLclampf_GLclampf_GLclampf_GLclampf *newpacked = (PACKED_void_GLclampf_GLclampf_GLclampf_GLclampf*)malloc(sizeofpacked);
|
||||
case FORMAT_void_GLbitfield: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLbitfield);
|
||||
PACKED_void_GLbitfield *newpacked = (PACKED_void_GLbitfield*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
@@ -2080,6 +2403,13 @@ packed_call_t* glCopyPackedCall(const packed_call_t *packed) {
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLsizei_GLuint___GENPT__: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLsizei_GLuint___GENPT__);
|
||||
PACKED_void_GLsizei_GLuint___GENPT__ *newpacked = (PACKED_void_GLsizei_GLuint___GENPT__*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLboolean: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLboolean);
|
||||
PACKED_void_GLboolean *newpacked = (PACKED_void_GLboolean*)malloc(sizeofpacked);
|
||||
@@ -2115,6 +2445,20 @@ packed_call_t* glCopyPackedCall(const packed_call_t *packed) {
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat);
|
||||
PACKED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat *newpacked = (PACKED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLint_GLint_GLint_GLint_GLint: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLint_GLint_GLint_GLint_GLint);
|
||||
PACKED_void_GLint_GLint_GLint_GLint_GLint *newpacked = (PACKED_void_GLint_GLint_GLint_GLint_GLint*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void: {
|
||||
int sizeofpacked = sizeof(PACKED_void);
|
||||
PACKED_void *newpacked = (PACKED_void*)malloc(sizeofpacked);
|
||||
@@ -2136,6 +2480,20 @@ packed_call_t* glCopyPackedCall(const packed_call_t *packed) {
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLenum_GLenum_GLuint: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLenum_GLenum_GLenum_GLuint);
|
||||
PACKED_void_GLenum_GLenum_GLenum_GLuint *newpacked = (PACKED_void_GLenum_GLenum_GLenum_GLuint*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLenum_GLenum_GLuint_GLint: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLenum_GLenum_GLenum_GLuint_GLint);
|
||||
PACKED_void_GLenum_GLenum_GLenum_GLuint_GLint *newpacked = (PACKED_void_GLenum_GLenum_GLenum_GLuint_GLint*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat);
|
||||
PACKED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat *newpacked = (PACKED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat*)malloc(sizeofpacked);
|
||||
@@ -2150,13 +2508,6 @@ packed_call_t* glCopyPackedCall(const packed_call_t *packed) {
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLsizei_GLuint___GENPT__: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLsizei_GLuint___GENPT__);
|
||||
PACKED_void_GLsizei_GLuint___GENPT__ *newpacked = (PACKED_void_GLsizei_GLuint___GENPT__*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLboolean___GENPT__: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLenum_GLboolean___GENPT__);
|
||||
PACKED_void_GLenum_GLboolean___GENPT__ *newpacked = (PACKED_void_GLenum_GLboolean___GENPT__*)malloc(sizeofpacked);
|
||||
@@ -2192,6 +2543,13 @@ packed_call_t* glCopyPackedCall(const packed_call_t *packed) {
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLenum_GLenum_GLint___GENPT__: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLenum_GLenum_GLenum_GLint___GENPT__);
|
||||
PACKED_void_GLenum_GLenum_GLenum_GLint___GENPT__ *newpacked = (PACKED_void_GLenum_GLenum_GLenum_GLint___GENPT__*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLint___GENPT__: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLenum_GLint___GENPT__);
|
||||
PACKED_void_GLenum_GLint___GENPT__ *newpacked = (PACKED_void_GLenum_GLint___GENPT__*)malloc(sizeofpacked);
|
||||
@@ -2297,6 +2655,20 @@ packed_call_t* glCopyPackedCall(const packed_call_t *packed) {
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei);
|
||||
PACKED_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei *newpacked = (PACKED_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei);
|
||||
PACKED_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei *newpacked = (PACKED_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLfloat_GLfloat_GLfloat_GLfloat: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLenum_GLfloat_GLfloat_GLfloat_GLfloat);
|
||||
PACKED_void_GLenum_GLfloat_GLfloat_GLfloat_GLfloat *newpacked = (PACKED_void_GLenum_GLfloat_GLfloat_GLfloat_GLfloat*)malloc(sizeofpacked);
|
||||
@@ -2360,6 +2732,13 @@ packed_call_t* glCopyPackedCall(const packed_call_t *packed) {
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLenum_GLenum_GLsizei_GLsizei: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLenum_GLenum_GLsizei_GLsizei);
|
||||
PACKED_void_GLenum_GLenum_GLsizei_GLsizei *newpacked = (PACKED_void_GLenum_GLenum_GLsizei_GLsizei*)malloc(sizeofpacked);
|
||||
memcpy(newpacked, packed, sizeofpacked);
|
||||
return (packed_call_t*)newpacked;
|
||||
break;
|
||||
}
|
||||
case FORMAT_void_GLclampf_GLboolean: {
|
||||
int sizeofpacked = sizeof(PACKED_void_GLclampf_GLboolean);
|
||||
PACKED_void_GLclampf_GLboolean *newpacked = (PACKED_void_GLclampf_GLboolean*)malloc(sizeofpacked);
|
||||
@@ -2432,5 +2811,3 @@ packed_call_t* glCopyPackedCall(const packed_call_t *packed) {
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
#endif
|
||||
|
||||
411
project/jni/gl4es/src/gl/wrap/gles.h
Executable file → Normal file
411
project/jni/gl4es/src/gl/wrap/gles.h
Executable file → Normal file
@@ -1,4 +1,3 @@
|
||||
#ifndef USE_ES2
|
||||
#include "../gl.h"
|
||||
|
||||
#ifndef GLESWRAP_H
|
||||
@@ -20,11 +19,13 @@ enum FORMAT {
|
||||
FORMAT_void_GLenum_GLclampf,
|
||||
FORMAT_void_GLenum_GLclampx,
|
||||
FORMAT_void_GLenum_GLuint,
|
||||
FORMAT_void_GLclampf_GLclampf_GLclampf_GLclampf,
|
||||
FORMAT_void_GLenum_GLenum,
|
||||
FORMAT_void_GLenum_GLenum_GLenum_GLenum,
|
||||
FORMAT_void_GLenum_GLsizeiptr_const_GLvoid___GENPT___GLenum,
|
||||
FORMAT_void_GLenum_GLintptr_GLsizeiptr_const_GLvoid___GENPT__,
|
||||
FORMAT_GLenum_GLenum,
|
||||
FORMAT_void_GLbitfield,
|
||||
FORMAT_void_GLclampf_GLclampf_GLclampf_GLclampf,
|
||||
FORMAT_void_GLclampx_GLclampx_GLclampx_GLclampx,
|
||||
FORMAT_void_GLclampf,
|
||||
FORMAT_void_GLclampx,
|
||||
@@ -41,22 +42,27 @@ enum FORMAT {
|
||||
FORMAT_void_GLenum_GLint_GLenum_GLint_GLint_GLsizei_GLsizei_GLint,
|
||||
FORMAT_void_GLenum_GLint_GLint_GLint_GLint_GLint_GLsizei_GLsizei,
|
||||
FORMAT_void_GLsizei_const_GLuint___GENPT__,
|
||||
FORMAT_void_GLsizei_GLuint___GENPT__,
|
||||
FORMAT_void_GLboolean,
|
||||
FORMAT_void_GLclampf_GLclampf,
|
||||
FORMAT_void_GLclampx_GLclampx,
|
||||
FORMAT_void_GLenum_GLint_GLsizei,
|
||||
FORMAT_void_GLenum_GLsizei_GLenum_const_GLvoid___GENPT__,
|
||||
FORMAT_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat,
|
||||
FORMAT_void_GLint_GLint_GLint_GLint_GLint,
|
||||
FORMAT_void,
|
||||
FORMAT_void_GLenum_GLfloat,
|
||||
FORMAT_void_GLenum_GLfixed,
|
||||
FORMAT_void_GLenum_GLenum_GLenum_GLuint,
|
||||
FORMAT_void_GLenum_GLenum_GLenum_GLuint_GLint,
|
||||
FORMAT_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat,
|
||||
FORMAT_void_GLfixed_GLfixed_GLfixed_GLfixed_GLfixed_GLfixed,
|
||||
FORMAT_void_GLsizei_GLuint___GENPT__,
|
||||
FORMAT_void_GLenum_GLboolean___GENPT__,
|
||||
FORMAT_void_GLenum_GLenum_GLint___GENPT__,
|
||||
FORMAT_void_GLenum_GLfloat___GENPT__,
|
||||
FORMAT_void_GLenum_GLfixed___GENPT__,
|
||||
FORMAT_GLenum,
|
||||
FORMAT_void_GLenum_GLenum_GLenum_GLint___GENPT__,
|
||||
FORMAT_void_GLenum_GLint___GENPT__,
|
||||
FORMAT_void_GLenum_GLenum_GLfloat___GENPT__,
|
||||
FORMAT_void_GLenum_GLenum_GLfixed___GENPT__,
|
||||
@@ -72,6 +78,8 @@ enum FORMAT {
|
||||
FORMAT_void_GLfixed,
|
||||
FORMAT_void_const_GLfloat___GENPT__,
|
||||
FORMAT_void_const_GLfixed___GENPT__,
|
||||
FORMAT_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei,
|
||||
FORMAT_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei,
|
||||
FORMAT_void_GLenum_GLfloat_GLfloat_GLfloat_GLfloat,
|
||||
FORMAT_void_GLenum_GLfixed_GLfixed_GLfixed_GLfixed,
|
||||
FORMAT_void_GLfloat_GLfloat_GLfloat,
|
||||
@@ -81,6 +89,7 @@ enum FORMAT {
|
||||
FORMAT_void_GLfloat_GLfloat,
|
||||
FORMAT_void_GLfixed_GLfixed,
|
||||
FORMAT_void_GLint_GLint_GLsizei_GLsizei_GLenum_GLenum_GLvoid___GENPT__,
|
||||
FORMAT_void_GLenum_GLenum_GLsizei_GLsizei,
|
||||
FORMAT_void_GLclampf_GLboolean,
|
||||
FORMAT_void_GLclampx_GLboolean,
|
||||
FORMAT_void_GLint_GLint_GLsizei_GLsizei,
|
||||
@@ -91,16 +100,6 @@ enum FORMAT {
|
||||
FORMAT_void_GLenum_GLenum_const_GLint___GENPT__,
|
||||
FORMAT_void_GLenum_GLint_GLint_GLsizei_GLsizei_GLint_GLenum_GLenum_const_GLvoid___GENPT__,
|
||||
FORMAT_void_GLenum_GLint_GLint_GLint_GLsizei_GLsizei_GLenum_GLenum_const_GLvoid___GENPT__,
|
||||
FORMAT_void_GLenum_GLenum_GLenum_GLenum,
|
||||
FORMAT_GLenum_GLenum,
|
||||
FORMAT_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat,
|
||||
FORMAT_void_GLint_GLint_GLint_GLint_GLint,
|
||||
FORMAT_void_GLenum_GLenum_GLenum_GLuint,
|
||||
FORMAT_void_GLenum_GLenum_GLenum_GLuint_GLint,
|
||||
FORMAT_void_GLenum_GLenum_GLenum_GLint___GENPT__,
|
||||
FORMAT_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei,
|
||||
FORMAT_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei,
|
||||
FORMAT_void_GLenum_GLenum_GLsizei_GLsizei,
|
||||
};
|
||||
|
||||
typedef void (*FUNC_void_GLenum)(GLenum texture);
|
||||
@@ -158,7 +157,23 @@ typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLuint args;
|
||||
} INDEXED_void_GLenum_GLuint;
|
||||
typedef void (*FUNC_void_GLenum_GLenum)(GLenum sfactor, GLenum dfactor);
|
||||
typedef void (*FUNC_void_GLclampf_GLclampf_GLclampf_GLclampf)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
typedef struct {
|
||||
GLclampf a1;
|
||||
GLclampf a2;
|
||||
GLclampf a3;
|
||||
GLclampf a4;
|
||||
} ARGS_void_GLclampf_GLclampf_GLclampf_GLclampf;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLclampf_GLclampf_GLclampf_GLclampf func;
|
||||
ARGS_void_GLclampf_GLclampf_GLclampf_GLclampf args;
|
||||
} PACKED_void_GLclampf_GLclampf_GLclampf_GLclampf;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLclampf_GLclampf_GLclampf_GLclampf args;
|
||||
} INDEXED_void_GLclampf_GLclampf_GLclampf_GLclampf;
|
||||
typedef void (*FUNC_void_GLenum_GLenum)(GLenum modeRGB, GLenum modeA);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLenum a2;
|
||||
@@ -172,6 +187,22 @@ typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLenum args;
|
||||
} INDEXED_void_GLenum_GLenum;
|
||||
typedef void (*FUNC_void_GLenum_GLenum_GLenum_GLenum)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLenum a2;
|
||||
GLenum a3;
|
||||
GLenum a4;
|
||||
} ARGS_void_GLenum_GLenum_GLenum_GLenum;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_GLenum_GLenum_GLenum func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLenum args;
|
||||
} PACKED_void_GLenum_GLenum_GLenum_GLenum;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLenum args;
|
||||
} INDEXED_void_GLenum_GLenum_GLenum_GLenum;
|
||||
typedef void (*FUNC_void_GLenum_GLsizeiptr_const_GLvoid___GENPT___GLenum)(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
@@ -204,6 +235,19 @@ typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLintptr_GLsizeiptr_const_GLvoid___GENPT__ args;
|
||||
} INDEXED_void_GLenum_GLintptr_GLsizeiptr_const_GLvoid___GENPT__;
|
||||
typedef GLenum (*FUNC_GLenum_GLenum)(GLenum target);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
} ARGS_GLenum_GLenum;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_GLenum_GLenum func;
|
||||
ARGS_GLenum_GLenum args;
|
||||
} PACKED_GLenum_GLenum;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_GLenum_GLenum args;
|
||||
} INDEXED_GLenum_GLenum;
|
||||
typedef void (*FUNC_void_GLbitfield)(GLbitfield mask);
|
||||
typedef struct {
|
||||
GLbitfield a1;
|
||||
@@ -217,22 +261,6 @@ typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLbitfield args;
|
||||
} INDEXED_void_GLbitfield;
|
||||
typedef void (*FUNC_void_GLclampf_GLclampf_GLclampf_GLclampf)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
typedef struct {
|
||||
GLclampf a1;
|
||||
GLclampf a2;
|
||||
GLclampf a3;
|
||||
GLclampf a4;
|
||||
} ARGS_void_GLclampf_GLclampf_GLclampf_GLclampf;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLclampf_GLclampf_GLclampf_GLclampf func;
|
||||
ARGS_void_GLclampf_GLclampf_GLclampf_GLclampf args;
|
||||
} PACKED_void_GLclampf_GLclampf_GLclampf_GLclampf;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLclampf_GLclampf_GLclampf_GLclampf args;
|
||||
} INDEXED_void_GLclampf_GLclampf_GLclampf_GLclampf;
|
||||
typedef void (*FUNC_void_GLclampx_GLclampx_GLclampx_GLclampx)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
|
||||
typedef struct {
|
||||
GLclampx a1;
|
||||
@@ -491,6 +519,20 @@ typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLsizei_const_GLuint___GENPT__ args;
|
||||
} INDEXED_void_GLsizei_const_GLuint___GENPT__;
|
||||
typedef void (*FUNC_void_GLsizei_GLuint___GENPT__)(GLsizei n, GLuint * framebuffers);
|
||||
typedef struct {
|
||||
GLsizei a1;
|
||||
GLuint * a2;
|
||||
} ARGS_void_GLsizei_GLuint___GENPT__;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLsizei_GLuint___GENPT__ func;
|
||||
ARGS_void_GLsizei_GLuint___GENPT__ args;
|
||||
} PACKED_void_GLsizei_GLuint___GENPT__;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLsizei_GLuint___GENPT__ args;
|
||||
} INDEXED_void_GLsizei_GLuint___GENPT__;
|
||||
typedef void (*FUNC_void_GLboolean)(GLboolean flag);
|
||||
typedef struct {
|
||||
GLboolean a1;
|
||||
@@ -563,6 +605,40 @@ typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLsizei_GLenum_const_GLvoid___GENPT__ args;
|
||||
} INDEXED_void_GLenum_GLsizei_GLenum_const_GLvoid___GENPT__;
|
||||
typedef void (*FUNC_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
|
||||
typedef struct {
|
||||
GLfloat a1;
|
||||
GLfloat a2;
|
||||
GLfloat a3;
|
||||
GLfloat a4;
|
||||
GLfloat a5;
|
||||
} ARGS_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat func;
|
||||
ARGS_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat args;
|
||||
} PACKED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat args;
|
||||
} INDEXED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat;
|
||||
typedef void (*FUNC_void_GLint_GLint_GLint_GLint_GLint)(GLint x, GLint y, GLint z, GLint width, GLint height);
|
||||
typedef struct {
|
||||
GLint a1;
|
||||
GLint a2;
|
||||
GLint a3;
|
||||
GLint a4;
|
||||
GLint a5;
|
||||
} ARGS_void_GLint_GLint_GLint_GLint_GLint;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLint_GLint_GLint_GLint_GLint func;
|
||||
ARGS_void_GLint_GLint_GLint_GLint_GLint args;
|
||||
} PACKED_void_GLint_GLint_GLint_GLint_GLint;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLint_GLint_GLint_GLint_GLint args;
|
||||
} INDEXED_void_GLint_GLint_GLint_GLint_GLint;
|
||||
typedef void (*FUNC_void)();
|
||||
typedef struct {
|
||||
int format;
|
||||
@@ -599,6 +675,39 @@ typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLfixed args;
|
||||
} INDEXED_void_GLenum_GLfixed;
|
||||
typedef void (*FUNC_void_GLenum_GLenum_GLenum_GLuint)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLenum a2;
|
||||
GLenum a3;
|
||||
GLuint a4;
|
||||
} ARGS_void_GLenum_GLenum_GLenum_GLuint;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_GLenum_GLenum_GLuint func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLuint args;
|
||||
} PACKED_void_GLenum_GLenum_GLenum_GLuint;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLuint args;
|
||||
} INDEXED_void_GLenum_GLenum_GLenum_GLuint;
|
||||
typedef void (*FUNC_void_GLenum_GLenum_GLenum_GLuint_GLint)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLenum a2;
|
||||
GLenum a3;
|
||||
GLuint a4;
|
||||
GLint a5;
|
||||
} ARGS_void_GLenum_GLenum_GLenum_GLuint_GLint;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_GLenum_GLenum_GLuint_GLint func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLuint_GLint args;
|
||||
} PACKED_void_GLenum_GLenum_GLenum_GLuint_GLint;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLuint_GLint args;
|
||||
} INDEXED_void_GLenum_GLenum_GLenum_GLuint_GLint;
|
||||
typedef void (*FUNC_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat near, GLfloat far);
|
||||
typedef struct {
|
||||
GLfloat a1;
|
||||
@@ -635,20 +744,6 @@ typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLfixed_GLfixed_GLfixed_GLfixed_GLfixed_GLfixed args;
|
||||
} INDEXED_void_GLfixed_GLfixed_GLfixed_GLfixed_GLfixed_GLfixed;
|
||||
typedef void (*FUNC_void_GLsizei_GLuint___GENPT__)(GLsizei n, GLuint * buffers);
|
||||
typedef struct {
|
||||
GLsizei a1;
|
||||
GLuint * a2;
|
||||
} ARGS_void_GLsizei_GLuint___GENPT__;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLsizei_GLuint___GENPT__ func;
|
||||
ARGS_void_GLsizei_GLuint___GENPT__ args;
|
||||
} PACKED_void_GLsizei_GLuint___GENPT__;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLsizei_GLuint___GENPT__ args;
|
||||
} INDEXED_void_GLsizei_GLuint___GENPT__;
|
||||
typedef void (*FUNC_void_GLenum_GLboolean___GENPT__)(GLenum pname, GLboolean * params);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
@@ -714,6 +809,22 @@ typedef struct {
|
||||
typedef struct {
|
||||
int func;
|
||||
} INDEXED_GLenum;
|
||||
typedef void (*FUNC_void_GLenum_GLenum_GLenum_GLint___GENPT__)(GLenum target, GLenum attachment, GLenum pname, GLint * params);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLenum a2;
|
||||
GLenum a3;
|
||||
GLint * a4;
|
||||
} ARGS_void_GLenum_GLenum_GLenum_GLint___GENPT__;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_GLenum_GLenum_GLint___GENPT__ func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLint___GENPT__ args;
|
||||
} PACKED_void_GLenum_GLenum_GLenum_GLint___GENPT__;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLint___GENPT__ args;
|
||||
} INDEXED_void_GLenum_GLenum_GLenum_GLint___GENPT__;
|
||||
typedef void (*FUNC_void_GLenum_GLint___GENPT__)(GLenum pname, GLint * params);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
@@ -923,6 +1034,39 @@ typedef struct {
|
||||
int func;
|
||||
ARGS_void_const_GLfixed___GENPT__ args;
|
||||
} INDEXED_void_const_GLfixed___GENPT__;
|
||||
typedef void (*FUNC_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLint * a2;
|
||||
GLsizei * a3;
|
||||
GLsizei a4;
|
||||
} ARGS_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei func;
|
||||
ARGS_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei args;
|
||||
} PACKED_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei args;
|
||||
} INDEXED_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei;
|
||||
typedef void (*FUNC_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei)(GLenum mode, GLsizei * count, GLenum type, const void * const * indices, GLsizei primcount);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLsizei * a2;
|
||||
GLenum a3;
|
||||
void * * a4;
|
||||
GLsizei a5;
|
||||
} ARGS_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei func;
|
||||
ARGS_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei args;
|
||||
} PACKED_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei args;
|
||||
} INDEXED_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei;
|
||||
typedef void (*FUNC_void_GLenum_GLfloat_GLfloat_GLfloat_GLfloat)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
@@ -1063,6 +1207,22 @@ typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLint_GLint_GLsizei_GLsizei_GLenum_GLenum_GLvoid___GENPT__ args;
|
||||
} INDEXED_void_GLint_GLint_GLsizei_GLsizei_GLenum_GLenum_GLvoid___GENPT__;
|
||||
typedef void (*FUNC_void_GLenum_GLenum_GLsizei_GLsizei)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLenum a2;
|
||||
GLsizei a3;
|
||||
GLsizei a4;
|
||||
} ARGS_void_GLenum_GLenum_GLsizei_GLsizei;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_GLenum_GLsizei_GLsizei func;
|
||||
ARGS_void_GLenum_GLenum_GLsizei_GLsizei args;
|
||||
} PACKED_void_GLenum_GLenum_GLsizei_GLsizei;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLenum_GLsizei_GLsizei args;
|
||||
} INDEXED_void_GLenum_GLenum_GLsizei_GLsizei;
|
||||
typedef void (*FUNC_void_GLclampf_GLboolean)(GLclampf value, GLboolean invert);
|
||||
typedef struct {
|
||||
GLclampf a1;
|
||||
@@ -1222,167 +1382,6 @@ typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLint_GLint_GLint_GLsizei_GLsizei_GLenum_GLenum_const_GLvoid___GENPT__ args;
|
||||
} INDEXED_void_GLenum_GLint_GLint_GLint_GLsizei_GLsizei_GLenum_GLenum_const_GLvoid___GENPT__;
|
||||
typedef void (*FUNC_void_GLenum_GLenum_GLenum_GLenum)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLenum a2;
|
||||
GLenum a3;
|
||||
GLenum a4;
|
||||
} ARGS_void_GLenum_GLenum_GLenum_GLenum;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_GLenum_GLenum_GLenum func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLenum args;
|
||||
} PACKED_void_GLenum_GLenum_GLenum_GLenum;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLenum args;
|
||||
} INDEXED_void_GLenum_GLenum_GLenum_GLenum;
|
||||
typedef GLenum (*FUNC_GLenum_GLenum)(GLenum target);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
} ARGS_GLenum_GLenum;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_GLenum_GLenum func;
|
||||
ARGS_GLenum_GLenum args;
|
||||
} PACKED_GLenum_GLenum;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_GLenum_GLenum args;
|
||||
} INDEXED_GLenum_GLenum;
|
||||
typedef void (*FUNC_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
|
||||
typedef struct {
|
||||
GLfloat a1;
|
||||
GLfloat a2;
|
||||
GLfloat a3;
|
||||
GLfloat a4;
|
||||
GLfloat a5;
|
||||
} ARGS_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat func;
|
||||
ARGS_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat args;
|
||||
} PACKED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat args;
|
||||
} INDEXED_void_GLfloat_GLfloat_GLfloat_GLfloat_GLfloat;
|
||||
typedef void (*FUNC_void_GLint_GLint_GLint_GLint_GLint)(GLint x, GLint y, GLint z, GLint width, GLint height);
|
||||
typedef struct {
|
||||
GLint a1;
|
||||
GLint a2;
|
||||
GLint a3;
|
||||
GLint a4;
|
||||
GLint a5;
|
||||
} ARGS_void_GLint_GLint_GLint_GLint_GLint;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLint_GLint_GLint_GLint_GLint func;
|
||||
ARGS_void_GLint_GLint_GLint_GLint_GLint args;
|
||||
} PACKED_void_GLint_GLint_GLint_GLint_GLint;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLint_GLint_GLint_GLint_GLint args;
|
||||
} INDEXED_void_GLint_GLint_GLint_GLint_GLint;
|
||||
typedef void (*FUNC_void_GLenum_GLenum_GLenum_GLuint)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLenum a2;
|
||||
GLenum a3;
|
||||
GLuint a4;
|
||||
} ARGS_void_GLenum_GLenum_GLenum_GLuint;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_GLenum_GLenum_GLuint func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLuint args;
|
||||
} PACKED_void_GLenum_GLenum_GLenum_GLuint;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLuint args;
|
||||
} INDEXED_void_GLenum_GLenum_GLenum_GLuint;
|
||||
typedef void (*FUNC_void_GLenum_GLenum_GLenum_GLuint_GLint)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLenum a2;
|
||||
GLenum a3;
|
||||
GLuint a4;
|
||||
GLint a5;
|
||||
} ARGS_void_GLenum_GLenum_GLenum_GLuint_GLint;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_GLenum_GLenum_GLuint_GLint func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLuint_GLint args;
|
||||
} PACKED_void_GLenum_GLenum_GLenum_GLuint_GLint;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLuint_GLint args;
|
||||
} INDEXED_void_GLenum_GLenum_GLenum_GLuint_GLint;
|
||||
typedef void (*FUNC_void_GLenum_GLenum_GLenum_GLint___GENPT__)(GLenum target, GLenum attachment, GLenum pname, GLint * params);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLenum a2;
|
||||
GLenum a3;
|
||||
GLint * a4;
|
||||
} ARGS_void_GLenum_GLenum_GLenum_GLint___GENPT__;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_GLenum_GLenum_GLint___GENPT__ func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLint___GENPT__ args;
|
||||
} PACKED_void_GLenum_GLenum_GLenum_GLint___GENPT__;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLenum_GLenum_GLint___GENPT__ args;
|
||||
} INDEXED_void_GLenum_GLenum_GLenum_GLint___GENPT__;
|
||||
typedef void (*FUNC_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLint * a2;
|
||||
GLsizei * a3;
|
||||
GLsizei a4;
|
||||
} ARGS_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei func;
|
||||
ARGS_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei args;
|
||||
} PACKED_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei args;
|
||||
} INDEXED_void_GLenum_const_GLint___GENPT___const_GLsizei___GENPT___GLsizei;
|
||||
typedef void (*FUNC_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei)(GLenum mode, GLsizei * count, GLenum type, const void * const * indices, GLsizei primcount);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLsizei * a2;
|
||||
GLenum a3;
|
||||
void * * a4;
|
||||
GLsizei a5;
|
||||
} ARGS_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei func;
|
||||
ARGS_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei args;
|
||||
} PACKED_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei args;
|
||||
} INDEXED_void_GLenum_GLsizei___GENPT___GLenum_const_void___GENPT___const___GENPT___GLsizei;
|
||||
typedef void (*FUNC_void_GLenum_GLenum_GLsizei_GLsizei)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef struct {
|
||||
GLenum a1;
|
||||
GLenum a2;
|
||||
GLsizei a3;
|
||||
GLsizei a4;
|
||||
} ARGS_void_GLenum_GLenum_GLsizei_GLsizei;
|
||||
typedef struct {
|
||||
int format;
|
||||
FUNC_void_GLenum_GLenum_GLsizei_GLsizei func;
|
||||
ARGS_void_GLenum_GLenum_GLsizei_GLsizei args;
|
||||
} PACKED_void_GLenum_GLenum_GLsizei_GLsizei;
|
||||
typedef struct {
|
||||
int func;
|
||||
ARGS_void_GLenum_GLenum_GLsizei_GLsizei args;
|
||||
} INDEXED_void_GLenum_GLenum_GLsizei_GLsizei;
|
||||
|
||||
extern void glPushCall(void *data);
|
||||
void glPackedCall(const packed_call_t *packed);
|
||||
@@ -4744,5 +4743,3 @@ typedef void (*glViewport_PTR)(glViewport_ARG_EXPAND);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,253 +0,0 @@
|
||||
#ifndef USE_ES2
|
||||
#include "gles.h"
|
||||
#ifndef skip_glBindFramebuffer
|
||||
void gl4es_glBindFramebuffer(GLenum target, GLuint framebuffer) {
|
||||
LOAD_GLES_OES(glBindFramebuffer);
|
||||
#ifndef direct_glBindFramebuffer
|
||||
PUSH_IF_COMPILING(glBindFramebuffer)
|
||||
#endif
|
||||
gles_glBindFramebuffer(target, framebuffer);
|
||||
}
|
||||
void glBindFramebuffer(GLenum target, GLuint framebuffer) __attribute__((alias("gl4es_glBindFramebuffer"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBindRenderbuffer
|
||||
void gl4es_glBindRenderbuffer(GLenum target, GLuint renderbuffer) {
|
||||
LOAD_GLES_OES(glBindRenderbuffer);
|
||||
#ifndef direct_glBindRenderbuffer
|
||||
PUSH_IF_COMPILING(glBindRenderbuffer)
|
||||
#endif
|
||||
gles_glBindRenderbuffer(target, renderbuffer);
|
||||
}
|
||||
void glBindRenderbuffer(GLenum target, GLuint renderbuffer) __attribute__((alias("gl4es_glBindRenderbuffer"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBlendColor
|
||||
void gl4es_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
|
||||
LOAD_GLES_OES(glBlendColor);
|
||||
#ifndef direct_glBlendColor
|
||||
PUSH_IF_COMPILING(glBlendColor)
|
||||
#endif
|
||||
gles_glBlendColor(red, green, blue, alpha);
|
||||
}
|
||||
void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) __attribute__((alias("gl4es_glBlendColor"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBlendEquation
|
||||
void gl4es_glBlendEquation(GLenum mode) {
|
||||
LOAD_GLES_OES(glBlendEquation);
|
||||
#ifndef direct_glBlendEquation
|
||||
PUSH_IF_COMPILING(glBlendEquation)
|
||||
#endif
|
||||
gles_glBlendEquation(mode);
|
||||
}
|
||||
void glBlendEquation(GLenum mode) __attribute__((alias("gl4es_glBlendEquation"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBlendEquationSeparate
|
||||
void gl4es_glBlendEquationSeparate(GLenum modeRGB, GLenum modeA) {
|
||||
LOAD_GLES_OES(glBlendEquationSeparate);
|
||||
#ifndef direct_glBlendEquationSeparate
|
||||
PUSH_IF_COMPILING(glBlendEquationSeparate)
|
||||
#endif
|
||||
gles_glBlendEquationSeparate(modeRGB, modeA);
|
||||
}
|
||||
void glBlendEquationSeparate(GLenum modeRGB, GLenum modeA) __attribute__((alias("gl4es_glBlendEquationSeparate"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glBlendFuncSeparate
|
||||
void gl4es_glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) {
|
||||
LOAD_GLES_OES(glBlendFuncSeparate);
|
||||
#ifndef direct_glBlendFuncSeparate
|
||||
PUSH_IF_COMPILING(glBlendFuncSeparate)
|
||||
#endif
|
||||
gles_glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
|
||||
}
|
||||
void glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) __attribute__((alias("gl4es_glBlendFuncSeparate"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glCheckFramebufferStatus
|
||||
GLenum gl4es_glCheckFramebufferStatus(GLenum target) {
|
||||
LOAD_GLES_OES(glCheckFramebufferStatus);
|
||||
#ifndef direct_glCheckFramebufferStatus
|
||||
PUSH_IF_COMPILING(glCheckFramebufferStatus)
|
||||
#endif
|
||||
return gles_glCheckFramebufferStatus(target);
|
||||
}
|
||||
GLenum glCheckFramebufferStatus(GLenum target) __attribute__((alias("gl4es_glCheckFramebufferStatus"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glDeleteFramebuffers
|
||||
void gl4es_glDeleteFramebuffers(GLsizei n, GLuint * framebuffers) {
|
||||
LOAD_GLES_OES(glDeleteFramebuffers);
|
||||
#ifndef direct_glDeleteFramebuffers
|
||||
PUSH_IF_COMPILING(glDeleteFramebuffers)
|
||||
#endif
|
||||
gles_glDeleteFramebuffers(n, framebuffers);
|
||||
}
|
||||
void glDeleteFramebuffers(GLsizei n, GLuint * framebuffers) __attribute__((alias("gl4es_glDeleteFramebuffers"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glDeleteRenderbuffers
|
||||
void gl4es_glDeleteRenderbuffers(GLsizei n, GLuint * renderbuffers) {
|
||||
LOAD_GLES_OES(glDeleteRenderbuffers);
|
||||
#ifndef direct_glDeleteRenderbuffers
|
||||
PUSH_IF_COMPILING(glDeleteRenderbuffers)
|
||||
#endif
|
||||
gles_glDeleteRenderbuffers(n, renderbuffers);
|
||||
}
|
||||
void glDeleteRenderbuffers(GLsizei n, GLuint * renderbuffers) __attribute__((alias("gl4es_glDeleteRenderbuffers"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glDrawTexf
|
||||
void gl4es_glDrawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) {
|
||||
LOAD_GLES_OES(glDrawTexf);
|
||||
#ifndef direct_glDrawTexf
|
||||
PUSH_IF_COMPILING(glDrawTexf)
|
||||
#endif
|
||||
gles_glDrawTexf(x, y, z, width, height);
|
||||
}
|
||||
void glDrawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) __attribute__((alias("gl4es_glDrawTexf"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glDrawTexi
|
||||
void gl4es_glDrawTexi(GLint x, GLint y, GLint z, GLint width, GLint height) {
|
||||
LOAD_GLES_OES(glDrawTexi);
|
||||
#ifndef direct_glDrawTexi
|
||||
PUSH_IF_COMPILING(glDrawTexi)
|
||||
#endif
|
||||
gles_glDrawTexi(x, y, z, width, height);
|
||||
}
|
||||
void glDrawTexi(GLint x, GLint y, GLint z, GLint width, GLint height) __attribute__((alias("gl4es_glDrawTexi"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glFramebufferRenderbuffer
|
||||
void gl4es_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
|
||||
LOAD_GLES_OES(glFramebufferRenderbuffer);
|
||||
#ifndef direct_glFramebufferRenderbuffer
|
||||
PUSH_IF_COMPILING(glFramebufferRenderbuffer)
|
||||
#endif
|
||||
gles_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
|
||||
}
|
||||
void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) __attribute__((alias("gl4es_glFramebufferRenderbuffer"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glFramebufferTexture2D
|
||||
void gl4es_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
|
||||
LOAD_GLES_OES(glFramebufferTexture2D);
|
||||
#ifndef direct_glFramebufferTexture2D
|
||||
PUSH_IF_COMPILING(glFramebufferTexture2D)
|
||||
#endif
|
||||
gles_glFramebufferTexture2D(target, attachment, textarget, texture, level);
|
||||
}
|
||||
void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) __attribute__((alias("gl4es_glFramebufferTexture2D"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGenFramebuffers
|
||||
void gl4es_glGenFramebuffers(GLsizei n, GLuint * ids) {
|
||||
LOAD_GLES_OES(glGenFramebuffers);
|
||||
#ifndef direct_glGenFramebuffers
|
||||
PUSH_IF_COMPILING(glGenFramebuffers)
|
||||
#endif
|
||||
gles_glGenFramebuffers(n, ids);
|
||||
}
|
||||
void glGenFramebuffers(GLsizei n, GLuint * ids) __attribute__((alias("gl4es_glGenFramebuffers"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGenRenderbuffers
|
||||
void gl4es_glGenRenderbuffers(GLsizei n, GLuint * renderbuffers) {
|
||||
LOAD_GLES_OES(glGenRenderbuffers);
|
||||
#ifndef direct_glGenRenderbuffers
|
||||
PUSH_IF_COMPILING(glGenRenderbuffers)
|
||||
#endif
|
||||
gles_glGenRenderbuffers(n, renderbuffers);
|
||||
}
|
||||
void glGenRenderbuffers(GLsizei n, GLuint * renderbuffers) __attribute__((alias("gl4es_glGenRenderbuffers"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGenerateMipmap
|
||||
void gl4es_glGenerateMipmap(GLenum target) {
|
||||
LOAD_GLES_OES(glGenerateMipmap);
|
||||
#ifndef direct_glGenerateMipmap
|
||||
PUSH_IF_COMPILING(glGenerateMipmap)
|
||||
#endif
|
||||
gles_glGenerateMipmap(target);
|
||||
}
|
||||
void glGenerateMipmap(GLenum target) __attribute__((alias("gl4es_glGenerateMipmap"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGetFramebufferAttachmentParameteriv
|
||||
void gl4es_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint * params) {
|
||||
LOAD_GLES_OES(glGetFramebufferAttachmentParameteriv);
|
||||
#ifndef direct_glGetFramebufferAttachmentParameteriv
|
||||
PUSH_IF_COMPILING(glGetFramebufferAttachmentParameteriv)
|
||||
#endif
|
||||
gles_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
|
||||
}
|
||||
void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint * params) __attribute__((alias("gl4es_glGetFramebufferAttachmentParameteriv"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glGetRenderbufferParameteriv
|
||||
void gl4es_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params) {
|
||||
LOAD_GLES_OES(glGetRenderbufferParameteriv);
|
||||
#ifndef direct_glGetRenderbufferParameteriv
|
||||
PUSH_IF_COMPILING(glGetRenderbufferParameteriv)
|
||||
#endif
|
||||
gles_glGetRenderbufferParameteriv(target, pname, params);
|
||||
}
|
||||
void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params) __attribute__((alias("gl4es_glGetRenderbufferParameteriv"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glIsFramebuffer
|
||||
GLboolean gl4es_glIsFramebuffer(GLuint framebuffer) {
|
||||
LOAD_GLES_OES(glIsFramebuffer);
|
||||
#ifndef direct_glIsFramebuffer
|
||||
PUSH_IF_COMPILING(glIsFramebuffer)
|
||||
#endif
|
||||
return gles_glIsFramebuffer(framebuffer);
|
||||
}
|
||||
GLboolean glIsFramebuffer(GLuint framebuffer) __attribute__((alias("gl4es_glIsFramebuffer"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glIsRenderbuffer
|
||||
GLboolean gl4es_glIsRenderbuffer(GLuint renderbuffer) {
|
||||
LOAD_GLES_OES(glIsRenderbuffer);
|
||||
#ifndef direct_glIsRenderbuffer
|
||||
PUSH_IF_COMPILING(glIsRenderbuffer)
|
||||
#endif
|
||||
return gles_glIsRenderbuffer(renderbuffer);
|
||||
}
|
||||
GLboolean glIsRenderbuffer(GLuint renderbuffer) __attribute__((alias("gl4es_glIsRenderbuffer"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glMultiDrawArrays
|
||||
void gl4es_glMultiDrawArrays(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount) {
|
||||
LOAD_GLES_OES(glMultiDrawArrays);
|
||||
#ifndef direct_glMultiDrawArrays
|
||||
PUSH_IF_COMPILING(glMultiDrawArrays)
|
||||
#endif
|
||||
gles_glMultiDrawArrays(mode, first, count, primcount);
|
||||
}
|
||||
void glMultiDrawArrays(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount) __attribute__((alias("gl4es_glMultiDrawArrays"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glMultiDrawElements
|
||||
void gl4es_glMultiDrawElements(GLenum mode, GLsizei * count, GLenum type, const void * const * indices, GLsizei primcount) {
|
||||
LOAD_GLES_OES(glMultiDrawElements);
|
||||
#ifndef direct_glMultiDrawElements
|
||||
PUSH_IF_COMPILING(glMultiDrawElements)
|
||||
#endif
|
||||
gles_glMultiDrawElements(mode, count, type, indices, primcount);
|
||||
}
|
||||
void glMultiDrawElements(GLenum mode, GLsizei * count, GLenum type, const void * const * indices, GLsizei primcount) __attribute__((alias("gl4es_glMultiDrawElements"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glRenderbufferStorage
|
||||
void gl4es_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
|
||||
LOAD_GLES_OES(glRenderbufferStorage);
|
||||
#ifndef direct_glRenderbufferStorage
|
||||
PUSH_IF_COMPILING(glRenderbufferStorage)
|
||||
#endif
|
||||
gles_glRenderbufferStorage(target, internalformat, width, height);
|
||||
}
|
||||
void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) __attribute__((alias("gl4es_glRenderbufferStorage"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glTexGenfv
|
||||
void gl4es_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params) {
|
||||
LOAD_GLES_OES(glTexGenfv);
|
||||
#ifndef direct_glTexGenfv
|
||||
PUSH_IF_COMPILING(glTexGenfv)
|
||||
#endif
|
||||
gles_glTexGenfv(coord, pname, params);
|
||||
}
|
||||
void glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params) __attribute__((alias("gl4es_glTexGenfv"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#ifndef skip_glTexGeni
|
||||
void gl4es_glTexGeni(GLenum coord, GLenum pname, GLint param) {
|
||||
LOAD_GLES_OES(glTexGeni);
|
||||
#ifndef direct_glTexGeni
|
||||
PUSH_IF_COMPILING(glTexGeni)
|
||||
#endif
|
||||
gles_glTexGeni(coord, pname, param);
|
||||
}
|
||||
void glTexGeni(GLenum coord, GLenum pname, GLint param) __attribute__((alias("gl4es_glTexGeni"))) __attribute__((visibility("default")));
|
||||
#endif
|
||||
#endif
|
||||
@@ -47,7 +47,7 @@ STUB(void glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha)
|
||||
STUB(void glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha))
|
||||
*/
|
||||
STUB(void,glClearAccum,(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha));
|
||||
STUB(void,glColorMaterial,(GLenum face, GLenum mode));
|
||||
//STUB(void,glColorMaterial,(GLenum face, GLenum mode));
|
||||
STUB(void,glCopyPixels,(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type));
|
||||
STUB(void,glDrawBuffer,(GLenum mode));
|
||||
STUB(void,glEdgeFlag,(GLboolean flag));
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
void gl4es_glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha);
|
||||
//void gl4es_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
void gl4es_glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
void gl4es_glColorMaterial(GLenum face, GLenum mode);
|
||||
//void gl4es_glColorMaterial(GLenum face, GLenum mode);
|
||||
void gl4es_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
|
||||
void gl4es_glDrawBuffer(GLenum mode);
|
||||
void gl4es_glEdgeFlag(GLboolean flag);
|
||||
|
||||
@@ -485,7 +485,7 @@ EXPORT void *glXGetProcAddressARB(const char *name) {
|
||||
STUB(glAccum);
|
||||
STUB(glAreTexturesResident);
|
||||
STUB(glClearAccum);
|
||||
STUB(glColorMaterial);
|
||||
_EX(glColorMaterial);
|
||||
_EX(glCopyTexSubImage3D); // It's a stub, calling the 2D one
|
||||
STUB(glFeedbackBuffer);
|
||||
STUB(glGetClipPlane);
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
#define MAJOR 0
|
||||
#define MINOR 9
|
||||
#define REVISION 3
|
||||
#define REVISION 4
|
||||
|
||||
#endif //_GL4ES_VERSION_H
|
||||
#endif //_GL4ES_VERSION_H
|
||||
|
||||
Reference in New Issue
Block a user