Commit 80ab4c90 authored by Sebastien Chevalier's avatar Sebastien Chevalier
Browse files

Massive renaming

parent 2ce5cf80
......@@ -17,10 +17,3 @@ glext=$(ls -1 yml/*ext-1.1.yml | tr '\n' ',' | sed -e 's/,$//')
#./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" &
cats="VERSION_1_0,VERSION_1_1,VERSION_1_2,VERSION_1_3,VERSION_1_4,VERSION_1_5,glx"
proxy='yml/opengl.yml,yml/my_glx.yml,yml/glxext.yml,yml/alsa.yml'
./gen.py --deep --cats "$cats" "$proxy" proxy.h.j2 proxy.h "<GL/gl.h>" "<GL/glx.h>" "<stdlib.h>" "<alsa/asoundlib.h>" "../gl/defines.h" "../config.h" "config.h" > "$base/proxy/proxy.h"
./gen.py --deep --cats "$cats" "$proxy" client.c.j2 client.c "../proxy.h" > "$base/proxy/client/src/client.c"
./gen.py --deep --cats "$cats" "$proxy" host.c.j2 host.c "../proxy.h" > "$base/proxy/host/host.c"
#wait
......@@ -9,7 +9,7 @@
{% if not func.void %}return {% endif %}{% block prefix %}wrap{% endblock %}_{{ func.name }}({{ func.args|args(0) }});
{%- endblock %}
}
{{ func.return }} {{ func.name }}({{ func.args|args }}) __attribute__((alias("glshim_{{ func.name }}"))) __attribute__((visibility("default")));
{{ func.return }} {{ func.name }}({{ func.args|args }}) __attribute__((alias("gl4es_{{ func.name }}"))) __attribute__((visibility("default")));
{% endblock %}
{% endfor %}
{% endblock %}
......@@ -58,7 +58,7 @@ packed_call_t* glCopyPackedCall(const packed_call_t *packed);
{% endfor %}
{% for func in functions %}
{{ func.return }} glshim_{{ func.name }}({{ func.name }}_ARG_EXPAND);
{{ func.return }} gl4es_{{ func.name }}({{ func.name }}_ARG_EXPAND);
typedef {{ func.return }} (*{{ func.name }}_PTR)({{ func.name }}_ARG_EXPAND);
{% endfor %}
......
......@@ -2,7 +2,7 @@
{% block headers %}
{{ super() }}
void *egl_lib;
#define WARN_NULL(name) if (name == NULL) printf("libGL: warning, " #name " is NULL\n");
#define WARN_NULL(name) if (name == NULL) printf("LIBGL: warning, " #name " is NULL\n");
#define LOAD_EGL(type, name, args...) \
typedef type (*eglptr_##name)(args); \
static eglptr_##name egl_##name; \
......
......@@ -30,6 +30,7 @@ SET(GL_SRC
)
SET(GL_H
../version.h
gl/array.h
gl/buffers.h
gl/const.h
......
......@@ -54,7 +54,7 @@ int buffer_target(GLenum target) {
return 0;
}
void glshim_glGenBuffers(GLsizei n, GLuint * buffers) {
void gl4es_glGenBuffers(GLsizei n, GLuint * buffers) {
//printf("glGenBuffers(%i, %p)\n", n, buffers);
noerrorShim();
if (n<1) {
......@@ -66,7 +66,7 @@ void glshim_glGenBuffers(GLsizei n, GLuint * buffers) {
}
}
void glshim_glBindBuffer(GLenum target, GLuint buffer) {
void gl4es_glBindBuffer(GLenum target, GLuint buffer) {
//printf("glBindBuffer(%s, %u)\n", PrintEnum(target), buffer);
if (glstate->gl_batch) {
flush();
......@@ -111,7 +111,7 @@ void glshim_glBindBuffer(GLenum target, GLuint buffer) {
noerrorShim();
}
void glshim_glBufferData(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage) {
void gl4es_glBufferData(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage) {
//printf("glBufferData(%s, %i, %p, %s)\n", PrintEnum(target), size, data, PrintEnum(usage));
if (!buffer_target(target)) {
errorShim(GL_INVALID_ENUM);
......@@ -135,7 +135,7 @@ void glshim_glBufferData(GLenum target, GLsizeiptr size, const GLvoid * data, GL
noerrorShim();
}
void glshim_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data) {
void gl4es_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data) {
//printf("glBufferSubData(%s, %p, %i, %p)\n", PrintEnum(target), offset, size, data);
if (!buffer_target(target)) {
errorShim(GL_INVALID_ENUM);
......@@ -151,7 +151,7 @@ void glshim_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, con
noerrorShim();
}
void glshim_glDeleteBuffers(GLsizei n, const GLuint * buffers) {
void gl4es_glDeleteBuffers(GLsizei n, const GLuint * buffers) {
//printf("glDeleteBuffers(%i, %p)\n", n, buffers);
if (glstate->gl_batch) {
flush();
......@@ -185,7 +185,7 @@ void glshim_glDeleteBuffers(GLsizei n, const GLuint * buffers) {
noerrorShim();
}
GLboolean glshim_glIsBuffer(GLuint buffer) {
GLboolean gl4es_glIsBuffer(GLuint buffer) {
//printf("glIsBuffer(%u)\n", buffer);
khash_t(buff) *list = glstate->buffers;
khint_t k;
......@@ -201,7 +201,7 @@ GLboolean glshim_glIsBuffer(GLuint buffer) {
void glshim_glGetBufferParameteriv(GLenum target, GLenum value, GLint * data) {
void gl4es_glGetBufferParameteriv(GLenum target, GLenum value, GLint * data) {
//printf("glGetBufferParameteriv(%s, %s, %p)\n", PrintEnum(target), PrintEnum(value), data);
if (!buffer_target(target)) {
errorShim(GL_INVALID_ENUM);
......@@ -241,7 +241,7 @@ void glshim_glGetBufferParameteriv(GLenum target, GLenum value, GLint * data) {
}
}
void *glshim_glMapBuffer(GLenum target, GLenum access) {
void *gl4es_glMapBuffer(GLenum target, GLenum access) {
//printf("glMapBuffer(%s, %s)\n", PrintEnum(target), PrintEnum(access));
if (!buffer_target(target)) {
errorShim(GL_INVALID_ENUM);
......@@ -256,7 +256,7 @@ void *glshim_glMapBuffer(GLenum target, GLenum access) {
return buff->data; // Not nice, should do some copy or something probably
}
GLboolean glshim_glUnmapBuffer(GLenum target) {
GLboolean gl4es_glUnmapBuffer(GLenum target) {
//printf("glUnmapBuffer(%s)\n", PrintEnum(target));
if (!buffer_target(target)) {
errorShim(GL_INVALID_ENUM);
......@@ -273,7 +273,7 @@ GLboolean glshim_glUnmapBuffer(GLenum target) {
return GL_FALSE;
}
void glshim_glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data) {
void gl4es_glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data) {
//printf("glGetBufferSubData(%s, %p, %i, %p)\n", PrintEnum(target), offset, size, data);
if (!buffer_target(target)) {
errorShim(GL_INVALID_ENUM);
......@@ -287,7 +287,7 @@ void glshim_glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size,
noerrorShim();
}
void glshim_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid ** params) {
void gl4es_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid ** params) {
//printf("glGetBufferPointerv(%s, %s, %p)\n", PrintEnum(target), PrintEnum(pname), params);
if (!buffer_target(target)) {
errorShim(GL_INVALID_ENUM);
......@@ -308,35 +308,35 @@ void glshim_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid ** params) {
}
//Direct wrapper
void glGenBuffers(GLsizei n, GLuint * buffers) AliasExport("glshim_glGenBuffers");
void glBindBuffer(GLenum target, GLuint buffer) AliasExport("glshim_glBindBuffer");
void glBufferData(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage) AliasExport("glshim_glBufferData");
void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data) AliasExport("glshim_glBufferSubData");
void glDeleteBuffers(GLsizei n, const GLuint * buffers) AliasExport("glshim_glDeleteBuffers");
GLboolean glIsBuffer(GLuint buffer) AliasExport("glshim_glIsBuffer");
void glGetBufferParameteriv(GLenum target, GLenum value, GLint * data) AliasExport("glshim_glGetBufferParameteriv");
void *glMapBuffer(GLenum target, GLenum access) AliasExport("glshim_glMapBuffer");
GLboolean glUnmapBuffer(GLenum target) AliasExport("glshim_glUnmapBuffer");
void glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data) AliasExport("glshim_glGetBufferSubData");
void glGetBufferPointerv(GLenum target, GLenum pname, GLvoid ** params) AliasExport("glshim_glGetBufferPointerv");
void glGenBuffers(GLsizei n, GLuint * buffers) AliasExport("gl4es_glGenBuffers");
void glBindBuffer(GLenum target, GLuint buffer) AliasExport("gl4es_glBindBuffer");
void glBufferData(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage) AliasExport("gl4es_glBufferData");
void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data) AliasExport("gl4es_glBufferSubData");
void glDeleteBuffers(GLsizei n, const GLuint * buffers) AliasExport("gl4es_glDeleteBuffers");
GLboolean glIsBuffer(GLuint buffer) AliasExport("gl4es_glIsBuffer");
void glGetBufferParameteriv(GLenum target, GLenum value, GLint * data) AliasExport("gl4es_glGetBufferParameteriv");
void *glMapBuffer(GLenum target, GLenum access) AliasExport("gl4es_glMapBuffer");
GLboolean glUnmapBuffer(GLenum target) AliasExport("gl4es_glUnmapBuffer");
void glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data) AliasExport("gl4es_glGetBufferSubData");
void glGetBufferPointerv(GLenum target, GLenum pname, GLvoid ** params) AliasExport("gl4es_glGetBufferPointerv");
//ARB wrapper
void glGenBuffersARB(GLsizei n, GLuint * buffers) AliasExport("glshim_glGenBuffers");
void glBindBufferARB(GLenum target, GLuint buffer) AliasExport("glshim_glBindBuffer");
void glBufferDataARB(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage) AliasExport("glshim_glBufferData");
void glBufferSubDataARB(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data) AliasExport("glshim_glBufferSubData");
void glDeleteBuffersARB(GLsizei n, const GLuint * buffers) AliasExport("glshim_glDeleteBuffers");
GLboolean glIsBufferARB(GLuint buffer) AliasExport("glshim_glIsBuffer");
void glGetBufferParameterivARB(GLenum target, GLenum value, GLint * data) AliasExport("glshim_glGetBufferParameteriv");
void *glMapBufferARB(GLenum target, GLenum access) AliasExport("glshim_glMapBuffer");
GLboolean glUnmapBufferARB(GLenum target) AliasExport("glshim_glUnmapBuffer");
void glGetBufferSubDataARB(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data) AliasExport("glshim_glGetBufferSubData");
void glGetBufferPointervARB(GLenum target, GLenum pname, GLvoid ** params) AliasExport("glshim_glGetBufferPointerv");
void glGenBuffersARB(GLsizei n, GLuint * buffers) AliasExport("gl4es_glGenBuffers");
void glBindBufferARB(GLenum target, GLuint buffer) AliasExport("gl4es_glBindBuffer");
void glBufferDataARB(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage) AliasExport("gl4es_glBufferData");
void glBufferSubDataARB(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data) AliasExport("gl4es_glBufferSubData");
void glDeleteBuffersARB(GLsizei n, const GLuint * buffers) AliasExport("gl4es_glDeleteBuffers");
GLboolean glIsBufferARB(GLuint buffer) AliasExport("gl4es_glIsBuffer");
void glGetBufferParameterivARB(GLenum target, GLenum value, GLint * data) AliasExport("gl4es_glGetBufferParameteriv");
void *glMapBufferARB(GLenum target, GLenum access) AliasExport("gl4es_glMapBuffer");
GLboolean glUnmapBufferARB(GLenum target) AliasExport("gl4es_glUnmapBuffer");
void glGetBufferSubDataARB(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data) AliasExport("gl4es_glGetBufferSubData");
void glGetBufferPointervARB(GLenum target, GLenum pname, GLvoid ** params) AliasExport("gl4es_glGetBufferPointerv");
// VAO ****************
static GLuint lastvao = 1;
void glshim_glGenVertexArrays(GLsizei n, GLuint *arrays) {
void gl4es_glGenVertexArrays(GLsizei n, GLuint *arrays) {
//printf("glGenVertexArrays(%i, %p)\n", n, arrays);
noerrorShim();
if (n<1) {
......@@ -347,7 +347,7 @@ void glshim_glGenVertexArrays(GLsizei n, GLuint *arrays) {
arrays[i] = lastvao++;
}
}
void glshim_glBindVertexArray(GLuint array) {
void gl4es_glBindVertexArray(GLuint array) {
//printf("glBindVertexArray(%u)\n", array);
if (glstate->gl_batch) {
flush();
......@@ -391,7 +391,7 @@ void glshim_glBindVertexArray(GLuint array) {
}
noerrorShim();
}
void glshim_glDeleteVertexArrays(GLsizei n, const GLuint *arrays) {
void gl4es_glDeleteVertexArrays(GLsizei n, const GLuint *arrays) {
//printf("glDeleteVertexArrays(%i, %p)\n", n, arrays);
if (glstate->gl_batch) {
flush();
......@@ -414,7 +414,7 @@ void glshim_glDeleteVertexArrays(GLsizei n, const GLuint *arrays) {
}
noerrorShim();
}
GLboolean glshim_glIsVertexArray(GLuint array) {
GLboolean gl4es_glIsVertexArray(GLuint array) {
//printf("glIsVertexArray(%u)\n", array);
khash_t(glvao) *list = glstate->vaos;
khint_t k;
......@@ -429,8 +429,8 @@ GLboolean glshim_glIsVertexArray(GLuint array) {
}
//Dirzct wrapper
void glGenVertexArrays(GLsizei n, GLuint *arrays) AliasExport("glshim_glGenVertexArrays");
void glBindVertexArray(GLuint array) AliasExport("glshim_glBindVertexArray");
void glDeleteVertexArrays(GLsizei n, const GLuint *arrays) AliasExport("glshim_glDeleteVertexArrays");
GLboolean glIsVertexArray(GLuint array) AliasExport("glshim_glIsVertexArray");
void glGenVertexArrays(GLsizei n, GLuint *arrays) AliasExport("gl4es_glGenVertexArrays");
void glBindVertexArray(GLuint array) AliasExport("gl4es_glBindVertexArray");
void glDeleteVertexArrays(GLsizei n, const GLuint *arrays) AliasExport("gl4es_glDeleteVertexArrays");
GLboolean glIsVertexArray(GLuint array) AliasExport("gl4es_glIsVertexArray");
......@@ -16,18 +16,18 @@ typedef struct {
KHASH_MAP_INIT_INT(buff, glbuffer_t *)
void glshim_glGenBuffers(GLsizei n, GLuint * buffers);
void glshim_glBindBuffer(GLenum target, GLuint buffer);
void glshim_glBufferData(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage);
void glshim_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data);
void glshim_glDeleteBuffers(GLsizei n, const GLuint * buffers);
GLboolean glshim_glIsBuffer(GLuint buffer);
void glshim_glGetBufferParameteriv(GLenum target, GLenum value, GLint * data);
void gl4es_glGenBuffers(GLsizei n, GLuint * buffers);
void gl4es_glBindBuffer(GLenum target, GLuint buffer);
void gl4es_glBufferData(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage);
void gl4es_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data);
void gl4es_glDeleteBuffers(GLsizei n, const GLuint * buffers);
GLboolean gl4es_glIsBuffer(GLuint buffer);
void gl4es_glGetBufferParameteriv(GLenum target, GLenum value, GLint * data);
void *glshim_glMapBuffer(GLenum target, GLenum access);
GLboolean glshim_glUnmapBuffer(GLenum target);
void glshim_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid ** params);
void glshim_glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data);
void *gl4es_glMapBuffer(GLenum target, GLenum access);
GLboolean gl4es_glUnmapBuffer(GLenum target);
void gl4es_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid ** params);
void gl4es_glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data);
void glGenBuffers(GLsizei n, GLuint * buffers);
void glBindBuffer(GLenum target, GLuint buffer);
......@@ -85,10 +85,10 @@ typedef struct {
KHASH_MAP_INIT_INT(glvao, glvao_t*)
void glshim_glGenVertexArrays(GLsizei n, GLuint *arrays);
void glshim_glBindVertexArray(GLuint array);
void glshim_glDeleteVertexArrays(GLsizei n, const GLuint *arrays);
GLboolean glshim_glIsVertexArray(GLuint array);
void gl4es_glGenVertexArrays(GLsizei n, GLuint *arrays);
void gl4es_glBindVertexArray(GLuint array);
void gl4es_glDeleteVertexArrays(GLsizei n, const GLuint *arrays);
GLboolean gl4es_glIsVertexArray(GLuint array);
void glGenVertexArrays(GLsizei n, GLuint *arrays);
void glBindVertexArray(GLuint array);
......
This diff is collapsed.
This diff is collapsed.
......@@ -61,7 +61,7 @@ static inline map_state_t **get_map_pointer(GLenum target) {
case_state(dims, GL_MAP##dims##_VERTEX_4, vertex4); \
}
void glshim_glMap1d(GLenum target, GLdouble u1, GLdouble u2,
void gl4es_glMap1d(GLenum target, GLdouble u1, GLdouble u2,
GLint ustride, GLint uorder, const GLdouble *points) {
noerrorShim();
map_statef_t *map = malloc(sizeof(map_statef_t));
......@@ -71,7 +71,7 @@ void glshim_glMap1d(GLenum target, GLdouble u1, GLdouble u2,
map->points = copy_eval_double(target, ustride, uorder, 0, 1, points);
}
void glshim_glMap1f(GLenum target, GLfloat u1, GLfloat u2,
void gl4es_glMap1f(GLenum target, GLfloat u1, GLfloat u2,
GLint ustride, GLint uorder, const GLfloat *points) {
noerrorShim();
map_statef_t *map = malloc(sizeof(map_statef_t));
......@@ -81,7 +81,7 @@ void glshim_glMap1f(GLenum target, GLfloat u1, GLfloat u2,
map->points = points;
}
void glshim_glMap2d(GLenum target, GLdouble u1, GLdouble u2,
void gl4es_glMap2d(GLenum target, GLdouble u1, GLdouble u2,
GLint ustride, GLint uorder, GLdouble v1, GLdouble v2,
GLint vstride, GLint vorder, const GLdouble *points) {
noerrorShim();
......@@ -93,7 +93,7 @@ void glshim_glMap2d(GLenum target, GLdouble u1, GLdouble u2,
map->points = copy_eval_double(target, ustride, uorder, vstride, vorder, points);
}
void glshim_glMap2f(GLenum target, GLfloat u1, GLfloat u2,
void gl4es_glMap2f(GLenum target, GLfloat u1, GLfloat u2,
GLint ustride, GLint uorder, GLfloat v1, GLfloat v2,
GLint vstride, GLint vorder, const GLfloat *points) {
noerrorShim();
......@@ -119,7 +119,7 @@ void glshim_glMap2f(GLenum target, GLfloat u1, GLfloat u2,
map_statef_t *map = (map_statef_t *)_map; \
GLfloat out[4]; \
code \
glshim_##func##v(out); \
gl4es_##func##v(out); \
} \
}}
......@@ -134,7 +134,7 @@ void glshim_glMap2f(GLenum target, GLfloat u1, GLfloat u2,
p_map(d, vertex3, glVertex3f, code); \
p_map(d, vertex4, glVertex4f, code);
void glshim_glEvalCoord1f(GLfloat u) {
void gl4es_glEvalCoord1f(GLfloat u) {
noerrorShim();
iter_maps(1,
GLfloat uu = (u - map->u._1) * map->u.d;
......@@ -142,7 +142,7 @@ void glshim_glEvalCoord1f(GLfloat u) {
)
}
void glshim_glEvalCoord2f(GLfloat u, GLfloat v) {
void gl4es_glEvalCoord2f(GLfloat u, GLfloat v) {
noerrorShim();
iter_maps(2,
GLfloat uu = (u - map->u._1) * map->u.d;
......@@ -157,7 +157,7 @@ void glshim_glEvalCoord2f(GLfloat u, GLfloat v) {
#undef p_map
#undef iter_maps
void glshim_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2) {
void gl4es_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2) {
noerrorShim();
// TODO: double support?
map_statef_t *map;
......@@ -171,7 +171,7 @@ void glshim_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2) {
map->u._2 = u2;
}
void glshim_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2,
void gl4es_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2,
GLint vn, GLfloat v1, GLfloat v2) {
noerrorShim();
// TODO: double support?
......@@ -214,7 +214,7 @@ static inline GLenum eval_mesh_prep(map_statef_t **map, GLenum mode) {
}
}
void glshim_glEvalMesh1(GLenum mode, GLint i1, GLint i2) {
void gl4es_glEvalMesh1(GLenum mode, GLint i1, GLint i2) {
noerrorShim();
map_statef_t *map;
GLenum renderMode = eval_mesh_prep(&map, mode);
......@@ -224,14 +224,14 @@ void glshim_glEvalMesh1(GLenum mode, GLint i1, GLint i2) {
GLfloat u, du, u1;
du = map->u.d;
GLint i;
glshim_glBegin(renderMode);
gl4es_glBegin(renderMode);
for (u = u1, i = i1; i <= i2; i++, u += du) {
glshim_glEvalCoord1f(u);
gl4es_glEvalCoord1f(u);
}
glshim_glEnd();
gl4es_glEnd();
}
void glshim_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) {
void gl4es_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) {
noerrorShim();
map_statef_t *map;
GLenum renderMode = eval_mesh_prep(&map, mode);
......@@ -242,40 +242,40 @@ void glshim_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) {
du = map->u.d;
dv = map->v.d;
GLint i, j;
glshim_glBegin(renderMode);
gl4es_glBegin(renderMode);
for (v = v1, j = j1; j <= j2; j++, v += dv) {
for (u = u1, i = i1; i <= i2; i++, u += du) {
glshim_glEvalCoord2f(u, v);
gl4es_glEvalCoord2f(u, v);
if (mode == GL_FILL)
glshim_glEvalCoord2f(u, v + dv);
gl4es_glEvalCoord2f(u, v + dv);
}
}
glshim_glEnd();
gl4es_glEnd();
if (mode == GL_LINE) {
glshim_glBegin(renderMode);
gl4es_glBegin(renderMode);
for (u = u1, i = i1; i <= i2; i++, u += du) {
for (v = v1, j = j1; j <= j2; j++, v += dv) {
glshim_glEvalCoord2f(u, v);
gl4es_glEvalCoord2f(u, v);
}
}
glshim_glEnd();
gl4es_glEnd();
}
}
void glshim_glEvalPoint1(GLint i) {
void gl4es_glEvalPoint1(GLint i) {
map_statef_t *map;
if (eval_mesh_prep(&map, 0))
glshim_glEvalCoord1f(i + map->u.d);
gl4es_glEvalCoord1f(i + map->u.d);
}
void glshim_glEvalPoint2(GLint i, GLint j) {
void gl4es_glEvalPoint2(GLint i, GLint j) {
map_statef_t *map;
if (eval_mesh_prep(&map, 0))
glshim_glEvalCoord2f(i + map->u.d, j + map->v.d);
gl4es_glEvalCoord2f(i + map->u.d, j + map->v.d);
}
#define GL_GET_MAP(t, type) \
void glshim_glGetMap##t##v(GLenum target, GLenum query, type *v) { \
void gl4es_glGetMap##t##v(GLenum target, GLenum query, type *v) { \
noerrorShim(); \
map_statef_t *map = *(map_statef_t **)get_map_pointer(target); \
if (map) { \
......@@ -317,18 +317,18 @@ GL_GET_MAP(d, GLdouble)
#undef GL_GET_MAP
//Direct wrapper
void glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points) AliasExport("glshim_glMap1d");
void glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points) AliasExport("glshim_glMap1f");
void glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points) AliasExport("glshim_glMap2d");
void glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points) AliasExport("glshim_glMap2f");
void glEvalCoord1f(GLfloat u) AliasExport("glshim_glEvalCoord1f");
void glEvalCoord2f(GLfloat u, GLfloat v) AliasExport("glshim_glEvalCoord2f");
void glEvalMesh1(GLenum mode, GLint i1, GLint i2) AliasExport("glshim_glEvalMesh1");
void glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) AliasExport("glshim_glEvalMesh2");
void glEvalPoint1(GLint i) AliasExport("glshim_glEvalPoint1");
void glEvalPoint2(GLint i, GLint j) AliasExport("glshim_glEvalPoint2");
void glMapGrid1f(GLint un, GLfloat u1, GLfloat u2) AliasExport("glshim_glMapGrid1f");
void glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) AliasExport("glshim_glMapGrid2f");
void glGetMapdv(GLenum target, GLenum query, GLdouble *v) AliasExport("glshim_glGetMapdv");
void glGetMapfv(GLenum target, GLenum query, GLfloat *v) AliasExport("glshim_glGetMapfv");
void glGetMapiv(GLenum target, GLenum query, GLint *v) AliasExport("glshim_glGetMapiv");
void glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points) AliasExport("gl4es_glMap1d");
void glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points) AliasExport("gl4es_glMap1f");
void glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points) AliasExport("gl4es_glMap2d");
void glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points) AliasExport("gl4es_glMap2f");
void glEvalCoord1f(GLfloat u) AliasExport("gl4es_glEvalCoord1f");
void glEvalCoord2f(GLfloat u, GLfloat v) AliasExport("gl4es_glEvalCoord2f");
void glEvalMesh1(GLenum mode, GLint i1, GLint i2) AliasExport("gl4es_glEvalMesh1");
void glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) AliasExport("gl4es_glEvalMesh2");
void glEvalPoint1(GLint i) AliasExport("gl4es_glEvalPoint1");
void glEvalPoint2(GLint i, GLint j) AliasExport("gl4es_glEvalPoint2");
void glMapGrid1f(GLint un, GLfloat u1, GLfloat u2) AliasExport("gl4es_glMapGrid1f");
void glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) AliasExport("gl4es_glMapGrid2f");
void glGetMapdv(GLenum target, GLenum query, GLdouble *v) AliasExport("gl4es_glGetMapdv");
void glGetMapfv(GLenum target, GLenum query, GLfloat *v) AliasExport("gl4es_glGetMapfv");
void glGetMapiv(GLenum target, GLenum query, GLint *v) AliasExport("gl4es_glGetMapiv");
......@@ -3,27 +3,27 @@
#ifndef GL_MAP_H
#define GL_MAP_H
void glshim_glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
void glshim_glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
void glshim_glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
void glshim_glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
void gl4es_glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
void gl4es_glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
void gl4es_glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
void gl4es_glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
void glshim_glEvalCoord1d(GLdouble u);
void glshim_glEvalCoord1f(GLfloat u);
void glshim_glEvalCoord2d(GLdouble u, GLdouble v);
void glshim_glEvalCoord2f(GLfloat u, GLfloat v);
void gl4es_glEvalCoord1d(GLdouble u);
void gl4es_glEvalCoord1f(GLfloat u);
void gl4es_glEvalCoord2d(GLdouble u, GLdouble v);
void gl4es_glEvalCoord2f(GLfloat u, GLfloat v);
void glshim_glEvalMesh1(GLenum mode, GLint i1, GLint i2);
void glshim_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
void glshim_glEvalPoint1(GLint i);
void glshim_glEvalPoint2(GLint i, GLint j);
void glshim_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2);
void glshim_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2);
void glshim_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
void glshim_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
void glshim_glGetMapdv(GLenum target, GLenum query, GLdouble *v);
void glshim_glGetMapfv(GLenum target, GLenum query, GLfloat *v);
void glshim_glGetMapiv(GLenum target, GLenum query, GLint *v);
void gl4es_glEvalMesh1(GLenum mode, GLint i1, GLint i2);
void gl4es_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
void gl4es_glEvalPoint1(GLint i);
void gl4es_glEvalPoint2(GLint i, GLint j);
void gl4es_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2);
void gl4es_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2);
void gl4es_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
void gl4es_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
void gl4es_glGetMapdv(GLenum target, GLenum query, GLdouble *v);
void gl4es_glGetMapfv(GLenum target, GLenum query, GLfloat *v);
void gl4es_glGetMapiv(GLenum target, GLenum query, GLint *v);
typedef struct {
GLenum type;
......
This diff is collapsed.
......@@ -3,28 +3,28 @@
#ifndef GL_FRAMEBUFFERS_H
#define GL_FRAMEBUFFERS_H
void glshim_glGenerateMipmap(GLenum target);
void glshim_glGenFramebuffers(GLsizei n, GLuint *ids);
void glshim_glDeleteFramebuffers(GLsizei n, GLuint *framebuffers);
GLboolean glshim_glIsFramebuffer(GLuint framebuffer);
GLenum glshim_glCheckFramebufferStatus(GLenum target);
void glshim_glBindFramebuffer(GLenum target, GLuint framebuffer);
void glshim_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
void glshim_glGenRenderbuffers(GLsizei n, GLuint *renderbuffers);
void glshim_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
void glshim_glDeleteRenderbuffers(GLsizei n, GLuint *renderbuffers);
void glshim_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
void glshim_glBindRenderbuffer(GLenum target, GLuint renderbuffer);
GLboolean glshim_glIsRenderbuffer(GLuint renderbuffer);
void glshim_glGenerateMipmap(GLenum target);
void glshim_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params);
void glshim_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params);
void gl4es_glGenerateMipmap(GLenum target);
void gl4es_glGenFramebuffers(GLsizei n, GLuint *ids);
void gl4es_glDeleteFramebuffers(GLsizei n, GLuint *framebuffers);
GLboolean gl4es_glIsFramebuffer(GLuint framebuffer);
GLenum gl4es_glCheckFramebufferStatus(GLenum target);
void gl4es_glBindFramebuffer(GLenum target, GLuint framebuffer);
void gl4es_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
void gl4es_glGenRenderbuffers(GLsizei n, GLuint *renderbuffers);
void gl4es_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
void gl4es_glDeleteRenderbuffers(GLsizei n, GLuint *renderbuffers);
void gl4es_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
void gl4es_glBindRenderbuffer(GLenum target, GLuint renderbuffer);
GLboolean gl4es_glIsRenderbuffer(GLuint renderbuffer);
void gl4es_glGenerateMipmap(GLenum target);
void gl4es_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params);
void gl4es_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params);
void glshim_glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); // naive Wrap
void glshim_glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint layer); // naive Wrap
void glshim_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); //STUB
void glshim_glFramebufferTextureLayer( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); // naive Wrap
void glshim_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
void gl4es_glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); // naive Wrap
void gl4es_glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint layer); // naive Wrap
void gl4es_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); //STUB
void gl4es_glFramebufferTextureLayer( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); // naive Wrap
void gl4es_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
// Need to keep track of Renderbuffer that are created as DEPTH_STENCIL, to create 2 seperate buffers...
typedef struct {
......
This diff is collapsed.