Merge branch 'sdl_android' of github.com:pelya/commandergenius into sdl_android

This commit is contained in:
Sergii Pylypenko
2015-09-16 19:28:45 +03:00
114 changed files with 2211 additions and 11677 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
APP_MODULES := application sdl-1.2 sdl_main sdl_native_helpers jpeg png ogg flac vorbis freetype tremor ogg
# To filter out static libs from all libs in makefile
APP_AVAILABLE_STATIC_LIBS := jpeg png tremor freetype xerces ogg tremor vorbis flac boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread boost_locale glu icudata icutest icui18n icuio icule iculx icutu icuuc sdl_savepng android_support crypto ssl
APP_AVAILABLE_STATIC_LIBS := jpeg png tremor freetype xerces ogg tremor vorbis flac boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread boost_locale glu icudata icutest icui18n icuio icule iculx icutu icuuc sdl_savepng android_support crypto ssl glshim
APP_ABI := armeabi
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
-6
View File
@@ -1,6 +0,0 @@
add_definitions(-g -funwind-tables -ffast-math)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
add_definitions(-fsingle-precision-constant -mfpu=neon -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8)
endif()
View File
View File
View File
View File
View File
View File
View File
View File
+4 -2
View File
@@ -35,8 +35,10 @@
#pragma message disable nosimpint
#endif
#endif
//#include <X11/Xlib.h>
//#include <X11/Xutil.h>
#ifndef ANDROID
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#endif //ANDROID
#ifdef __VMS
# ifdef __cplusplus
#pragma message enable nosimpint
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
+18 -11
View File
@@ -2,18 +2,25 @@
cd "$(dirname "$0")"
base=../src/
gles="yml/gles-1.1.yml,yml/oes.yml"
gles2="yml/gles-2.0.yml"
opengl="yml/opengl.yml"
cats="VERSION_1_0,VERSION_1_1,VERSION_1_2,VERSION_1_3,VERSION_1_4,VERSION_1_5,EXT_swap_control"
gles1=$(ls -1 yml/*-1.1.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" mock.c.j2 mock.c mock.h > "$base/../test/util/mock.c" &
./gen.py "$gles" --ifndef USE_ES2 mock.h.j2 mock.h "gl_str.h" "wrap/gles.h" > "$base/../test/util/mock.h"
./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" --ifndef USE_ES2 gleswrap.c.j2 gleswrap.c gles.h ../loader.h ../skip.h > "$base/gl/wrap/gles.c" &
./gen.py --deep "$opengl,$gles" --ifndef USE_ES2 glwrap.h.j2 gleswrap.h ../types.h > "$base/gl/wrap/gles.h"
./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 "$gles2" --ifdef USE_ES2 gleswrap.c.j2 gles2wrap.c gles2.h ../loader.h > "$base/gl/wrap/gles2.c"
./gen.py "$gles2" --ifdef USE_ES2 glwrap.h.j2 gles2wrap.h > "$base/gl/wrap/gles2.h"
# ./gen.py "yml/egl.yml" eglwrap.c.j2 eglwrap.c "<GLES/egl.h>" > "$base/gl/wrap/egl.c" &
rm -rf "$base/../test/build"
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
+20 -23
View File
@@ -8,6 +8,7 @@ from yaml import load
split_re = re.compile(r'^(?P<type>.*?)\s*(?P<name>\w+)$')
env = jinja2.Environment(
trim_blocks=True,
lstrip_blocks=True,
loader=jinja2.FileSystemLoader('template'),
)
@@ -19,30 +20,27 @@ def args(args, add_type=True):
f = '0.2f'
printf_lookup = {
'GLbitfield': 'd',
'GLboolean': 'd',
'GLbyte': 'c',
'GLubyte': 'c',
'GLchar': 'c',
'GLdouble': '0.2f',
'GLenum': '0x%04X',
'GLfloat': '0.2f',
'GLint': 'd',
'GLintptr': 'd',
'GLintptrARB': 'd',
'GLshort': 'd',
'GLsizei': 'd',
'GLsizeiptr': 'd',
'GLbitfield': 'd',
'GLboolean': 'd',
'GLbyte': 'c',
'GLubyte': 'c',
'GLchar': 'c',
'GLdouble': '0.2f',
'GLenum': 'u',
'GLfloat': '0.2f',
'GLint': 'd',
'GLintptr': 'd',
'GLintptrARB': 'd',
'GLshort': 'd',
'GLsizei': 'd',
'GLsizeiptr': 'd',
'GLsizeiptrARB': 'd',
'GLuint': 'u',
'GLushort': 'u',
'GLvoid': 'p',
'GLuint': 'u',
'GLushort': 'u',
'GLvoid': 'p',
}
def printf(args):
if isinstance(args, dict):
args = (args,)
types = []
for arg in args:
typ = arg['type']
@@ -50,11 +48,10 @@ def printf(args):
t = 'p'
else:
t = printf_lookup.get(typ, 'p')
if not '%' in t:
t = '%' + t
types.append(t)
return ', '.join(types)
return ', '.join('%' + t for t in types)
def unconst(s):
split = s.split(' ')
View File
@@ -3,5 +3,6 @@
{% if ifndef %}#ifndef {{ ifndef }}
{% endif %}
{% block main %}{% endblock %}
{% block content %}{% endblock %}
{% if ifdef %}#endif{% endif %}
{% if ifndef %}#endif{% endif %}
View File
View File
@@ -1,3 +1,4 @@
{% block headers %}
{% for header in headers %}
{% if "<" in header %}
#include {{ header }}
@@ -5,3 +6,4 @@
#include "{{ header }}"
{% endif %}
{% endfor %}
{% endblock %}
View File
View File
+1 -3
View File
@@ -1,11 +1,9 @@
{% extends "base/base.j2" %}
{% block main %}
{% block headers %}
{% include "base/headers.j2" %}
{% endblock %}
{% for func in functions %}
{% block definition scoped %}
{{ func.return }} {% block func_prefix %}{% endblock %}{{ func.name }}({{ func.args|args }}) {
{{ func.return }} {{ 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) }});
+11 -1
View File
@@ -1,6 +1,17 @@
{% extends "base/header.j2" %}
{% block content %}
typedef struct {
int format;
void *func;
void *args;
} packed_call_t;
typedef struct {
int func;
void *args;
} indexed_call_t;
enum FORMAT {
{% for f in formats %}
FORMAT_{{ f.types }},
@@ -19,7 +30,6 @@ typedef struct {
typedef struct {
int format;
FUNC_{{ f.types }} func;
int refs;
{% if f.args %}
ARGS_{{ f.types }} args;
{% endif %}
@@ -0,0 +1,52 @@
{% extends "base/wrap.c.j2" %}
{% block headers %}
#include <sys/syscall.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
{{ super() }}
{% endblock %}
{% block main %}
{{ super() }}
snd_config_t *snd_config = NULL;
__GLXextFuncPtr glXGetProcAddressARB(const GLubyte *name) {
{% for func in functions %}
{% if not func.name.startswith('snd_') %}
if (strcmp(name, "{{ func.name }}") == 0) {
return (void *){{ func.name }};
}
{% endif %}
{% endfor %}
printf("glXGetProcAddress(%s) not found\n", name);
return NULL;
}
__GLXextFuncPtr glXGetProcAddress(const GLubyte *name) {
return glXGetProcAddressARB(name);
}
{% endblock %}
{% block definition %}
#if !defined(skip_client_{{ func.name }}) && !defined(skip_index_{{ func.name }})
{{ super() -}}
#endif
{% endblock %}
{% block call %}
{{ func.name }}_INDEXED packed_data;
packed_data.func = {{ func.name }}_INDEX;
{% for arg in func.args %}
packed_data.args.a{{ loop.index }} = ({{ arg.type|unconst }}){{ arg.name }};
{% endfor %}
{% if not func.void %}
{{ func.return }} ret;
syscall(SYS_proxy, (void *)&packed_data, &ret);
return ret;
{% else %}
syscall(SYS_proxy, (void *)&packed_data, NULL);
{% endif %}
{% endblock %}
@@ -0,0 +1,23 @@
{% extends "base/wrap.c.j2" %}
{% block headers %}
{{ super() }}
void *egl_lib;
#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; \
if (egl##name == NULL) { \
if (egl_lib == NULL) { \
egl_lib = dlopen("libEGL.so", RTLD_LOCAL | RTLD_LAZY); \
WARN_NULL(egl_lib); \
} \
egl_##name = (eglptr_##name)dlsym(egl_lib, #name); \
WARN_NULL(egl_lib_##name); \
} \
{% endblock %}
{% block load %}
LOAD_EGL({{ func.return }}, {{ func.name }}
{%- if func.args %}, {{ func.args|args }}{% endif %});
{% endblock %}
{% block prefix %}egl{% endblock %}
@@ -1,9 +1,13 @@
{% extends "base/wrap.c.j2" %}
{% block headers %}
{{ super() }}
{% endblock %}
{% block content %}
{% include "base/packed_call.j2" %}
{% endblock %}
{% block definition %}
#ifndef skip_{{ func.name }}
{{ super() -}}
@@ -14,7 +18,7 @@
{% endblock %}
{% block call %}
#ifndef direct_{{ func.name }}
PUSH_IF_COMPILING({{ func.name }});
PUSH_IF_COMPILING({{ func.name }})
#endif
{{ super() }}
{% endblock %}
+20
View File
@@ -0,0 +1,20 @@
{% extends "base/wrap.c.j2" %}
{% block headers %}
{{ super() }}
{% endblock %}
{% block definition %}
#ifndef skip_{{ func.name }}
{{ super() -}}
#endif
{% endblock %}
{% block load %}
LOAD_GLES_OES({{ func.name }});
{% endblock %}
{% block call %}
#ifndef direct_{{ func.name }}
PUSH_IF_COMPILING({{ func.name }})
#endif
{{ super() }}
{% endblock %}
{% block prefix %}gles{% endblock %}
+1 -2
View File
@@ -8,7 +8,6 @@
{{ func.name }}_PACKED *packed_data = malloc(sizeof({{ func.name }}_PACKED)); \
packed_data->format = {{ func.name }}_FORMAT; \
packed_data->func = {{ func.name }}; \
packed_data->refs = 0; \
{% if func.args %}
{% for arg in func.args %}
packed_data->args.a{{ loop.index }} = ({{ arg.type|unconst }}){{ arg.name }}; \
@@ -18,4 +17,4 @@
}
#endif
{% endfor %}
{% endblock %}
{% endblock %}
@@ -0,0 +1,3 @@
{% for func in functions %}
EX({{ func.name }});
{% endfor %}
@@ -0,0 +1,6 @@
{% extends "base/header.j2" %}
{% block content %}
{% include "base/indexed_call.j2" %}
{% endblock %}
@@ -1,83 +0,0 @@
{% extends "base/wrap.c.j2" %}
{% block headers %}
{{ super() }}
#include <stdio.h>
#include "tack.h"
static tack_t mock = {0};
const char *mock_name(int func) {
switch (func) {
{% for f in functions %}
case {{ f.name }}_INDEX: return "{{ f.name }}";
{% endfor %}
}
}
void mock_print(const indexed_call_t *packed) {
if (packed == NULL) {
printf("NULL()\n");
return;
}
switch (packed->func) {
{% for f in functions %}
case {{ f.name }}_INDEX: {
INDEXED_{{ f.types }} *unpacked = (INDEXED_{{ f.types }} *)packed;
{% if f.args %}
ARGS_{{ f.types }} args = unpacked->args;
{% endif %}
printf("{{ f.name }}({{ f.args|printf }});\n"
{%- for arg in f.args %}, args.a{{ loop.index }}{% endfor -%});
break;
}
{% endfor %}
}
}
void *mock_get(int idx) {
return tack_get(&mock, idx);
}
void *mock_peek() {
return tack_peek(&mock);
}
void *mock_cur() {
return tack_cur(&mock);
}
void *mock_shift() {
return tack_shift(&mock);
}
void *mock_slide(int func) {
if (mock.pos >= mock.len) {
return NULL;
}
indexed_call_t **stack = (indexed_call_t **)mock.data;
for (int i = mock.pos; i < mock.len; i++) {
if (stack[i]->func == func) {
mock.pos = i + 1;
return stack[i];
}
}
return NULL;
}
void mock_push(void *call) {
tack_push(&mock, call);
}
void *mock_pop() {
return tack_pop(&mock);
}
{% endblock %}
{% block func_prefix %}gles_{% endblock %}
{% block call %}
emit_{{ func.name }}({{ func.args|args(0) }});
{% if not func.void %}
return ({{ func.return }})0;
{% endif %}
{% endblock %}
-132
View File
@@ -1,132 +0,0 @@
{% extends "base/header.j2" %}
{% block main %}
#ifdef __cplusplus
extern "C" {
#endif
{{ super() }}
#ifdef __cplusplus
} // extern "C"
#endif
{% endblock %}
{% block content %}
{{ super() }}
const char *mock_name(int func);
void *mock_cur();
void *mock_get(int idx);
void *mock_peek();
void *mock_shift();
void *mock_slide(int func);
void mock_print(const indexed_call_t *packed);
void mock_push(void *call);
static int verbose_test = 0;
static int failed_test = 0;
#define verbose { verbose_test = 1; }
#define mock_warningf(...) { printf("WARNING: "), printf(__VA_ARGS__); }
#define mock_errorf(...) { printf("ERROR: "); printf(__VA_ARGS__); failed_test = 1; }
#define mock_assert(cond, ...) { if (!(cond)) { mock_errorf(__VA_ARGS__); }}
#define assert(cond) mock_assert(cond, "%s\n", #cond)
#define mock_print_ptr(prefix, ptr, size) \
printf("%s ", prefix); \
if (ptr == NULL) { \
printf("NULL"); \
} else { \
for (size_t i = 0; i < size; i++) { \
if (i > 0 && i % 4 == 0) printf(" "); \
printf("%02X", *(uint8_t *)(ptr+i)); \
} \
} \
printf("\n");
#define mock_return { \
indexed_call_t *call = NULL; \
while ((call = mock_shift()) != NULL) { \
mock_warningf("extra "); \
mock_print(call); \
} \
if (state.error) { \
mock_warningf("Ended with GL error flag: %s\n", gl_str(state.error)); \
} \
return failed_test; \
}
{% for func in functions %}
#define pack_{{ func.name }}({{ func.args|args(0) }}) ({ \
{{ func.name }}_INDEXED *packed_data = malloc(sizeof({{ func.name }}_INDEXED)); \
packed_data->func = {{ func.name }}_INDEX; \
{% if func.args %}
{% for arg in func.args %}
packed_data->args.a{{ loop.index }} = ({{ arg.type|unconst }}){{ arg.name }}; \
{% endfor %}
{% endif %}
packed_data; \
})
#define emit_{{ func.name }}({{ func.args|args(0) }}) { \
mock_push(pack_{{ func.name }}({{ func.args|args(0) }})); \
}
#define test_{{ func.name }}({{ func.args|args(0) }}) { \
{{ func.name }}_INDEXED *packed = mock_cur(); \
if (packed == NULL) { \
mock_errorf("{{ func.name }} missing (no calls left)\n"); \
} else if (packed->func != {{ func.name }}_INDEX) { \
if (verbose_test) { \
mock_print(mock_cur()); \
} \
indexed_call_t *tmp = (indexed_call_t *)packed; \
packed = mock_slide({{ func.name }}_INDEX); \
if (! packed) { \
mock_errorf("{{ func.name }} missing\n"); \
} else { \
mock_warningf("unexpected call while looking for {{ func.name }}:\n "); \
mock_print(tmp); \
}\
} else { \
if (verbose_test) { \
mock_print(mock_cur()); \
} \
mock_shift(); \
} \
if (packed) { \
int match = 1; \
void *a, *b; \
{% for arg in func.args %}
{% if '*' in arg.type %}
a = packed->args.a{{ loop.index }}, b = {{ arg.name }}; \
if (b == NULL && a != NULL || (a != NULL && b != NULL && (memcmp(a, b, sizeof({{ arg.name }})) != 0))) { \
printf(" ERROR: arg mismatch: {{ arg.name }}\n"); \
mock_print_ptr(" expected:", b, sizeof({{ arg.name }})); \
mock_print_ptr(" found:", a, sizeof({{ arg.name }})); \
{% elif 'float' in arg.type or 'double' in arg.type %}
if (packed->args.a{{ loop.index }} - {{ arg.name }} >= 0.01) { \
{% else %}
if (packed->args.a{{ loop.index }} != {{ arg.name }}) { \
{% endif %}
match = 0; \
} \
{% endfor %}
if (! match) { \
mock_errorf("calls do not match:\n"); \
printf(" have: "); mock_print((const indexed_call_t *)packed); \
printf(" want: {{ func.name }}({{ func.args|printf }});\n", {{ func.args|args(0) }}); \
} \
} \
}
{% endfor %}
{% for func in functions %}
#define gles_{{ func.name }}_INDEX {{ loop.index }}
#define gles_{{ func.name }}_RETURN {{ func.return }}
#define gles_{{ func.name }}_ARG_NAMES {{ func.args|args(0) }}
#define gles_{{ func.name }}_ARG_EXPAND {{ func.args|args }}
#define gles_{{ func.name }}_PACKED PACKED_{{ func.types }}
#define gles_{{ func.name }}_INDEXED INDEXED_{{ func.types }}
#define gles_{{ func.name }}_FORMAT FORMAT_{{ func.types }}
{% endfor %}
{% for func in functions %}
{{ func.return }} gles_{{ func.name }}({{ func.name }}_ARG_EXPAND);
{% endfor %}
{% endblock %}
@@ -0,0 +1 @@
{% extends "base/wrap.h.j2" %}
View File
View File
View File
View File
View File
View File
File diff suppressed because it is too large Load Diff
+108
View File
@@ -0,0 +1,108 @@
eglBindAPI: [EGLBoolean, EGLenum api]
eglBindTexImage: [EGLBoolean, EGLDisplay dpy, EGLSurface surface, EGLint buffer]
eglChooseConfig: [EGLBoolean, EGLDisplay dpy, const EGLint * attrib_list, EGLConfig
* configs, EGLint config_size, EGLint * num_config]
eglClientWaitSyncKHR: [EGLint, EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR
timeout]
eglClientWaitSyncNV: [EGLint, EGLSyncNV sync, EGLint flags, EGLTimeNV timeout]
eglCopyBuffers: [EGLBoolean, EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType
target]
eglCreateContext: [EGLContext, EGLDisplay dpy, EGLConfig config, EGLContext share_context,
const EGLint * attrib_list]
eglCreateDRMImageMESA: [EGLImageKHR, EGLDisplay dpy, const EGLint * attrib_list]
eglCreateFenceSyncNV: [EGLSyncNV, EGLDisplay dpy, EGLenum condition, const EGLint
* attrib_list]
eglCreateImageKHR: [EGLImageKHR, EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer
buffer, const EGLint * attrib_list]
eglCreatePbufferFromClientBuffer: [EGLSurface, EGLDisplay dpy, EGLenum buftype, EGLClientBuffer
buffer, EGLConfig config, const EGLint * attrib_list]
eglCreatePbufferSurface: [EGLSurface, EGLDisplay dpy, EGLConfig config, const EGLint
* attrib_list]
eglCreatePixmapSurface: [EGLSurface, EGLDisplay dpy, EGLConfig config, EGLNativePixmapType
pixmap, const EGLint * attrib_list]
eglCreatePixmapSurfaceHI: [EGLSurface, EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI
* pixmap]
eglCreateStreamFromFileDescriptorKHR: [EGLStreamKHR, EGLDisplay dpy, EGLNativeFileDescriptorKHR
file_descriptor]
eglCreateStreamKHR: [EGLStreamKHR, EGLDisplay dpy, const EGLint * attrib_list]
eglCreateStreamProducerSurfaceKHR: [EGLSurface, EGLDisplay dpy, EGLConfig config,
EGLStreamKHR stream, const EGLint * attrib_list]
eglCreateSyncKHR: [EGLSyncKHR, EGLDisplay dpy, EGLenum type, const EGLint * attrib_list]
eglCreateWindowSurface: [EGLSurface, EGLDisplay dpy, EGLConfig config, EGLNativeWindowType
win, const EGLint * attrib_list]
eglDestroyContext: [EGLBoolean, EGLDisplay dpy, EGLContext ctx]
eglDestroyImageKHR: [EGLBoolean, EGLDisplay dpy, EGLImageKHR image]
eglDestroyStreamKHR: [EGLBoolean, EGLDisplay dpy, EGLStreamKHR stream]
eglDestroySurface: [EGLBoolean, EGLDisplay dpy, EGLSurface surface]
eglDestroySyncKHR: [EGLBoolean, EGLDisplay dpy, EGLSyncKHR sync]
eglDestroySyncNV: [EGLBoolean, EGLSyncNV sync]
eglDupNativeFenceFDANDROID: [EGLint, EGLDisplay dpy, EGLSyncKHR sync]
eglExportDRMImageMESA: [EGLBoolean, EGLDisplay dpy, EGLImageKHR image, EGLint * name,
EGLint * handle, EGLint * stride]
eglFenceNV: [EGLBoolean, EGLSyncNV sync]
eglGetConfigAttrib: [EGLBoolean, EGLDisplay dpy, EGLConfig config, EGLint attribute,
EGLint * value]
eglGetConfigs: [EGLBoolean, EGLDisplay dpy, EGLConfig * configs, EGLint config_size,
EGLint * num_config]
eglGetCurrentContext: [EGLContext]
eglGetCurrentDisplay: [EGLDisplay]
eglGetCurrentSurface: [EGLSurface, EGLint readdraw]
eglGetDisplay: [EGLDisplay, EGLNativeDisplayType display_id]
eglGetError: [EGLint]
eglGetProcAddress: [__eglMustCastToProperFunctionPointerType, const char * procname]
eglGetStreamFileDescriptorKHR: [EGLNativeFileDescriptorKHR, EGLDisplay dpy, EGLStreamKHR
stream]
eglGetSyncAttribKHR: [EGLBoolean, EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute,
EGLint * value]
eglGetSyncAttribNV: [EGLBoolean, EGLSyncNV sync, EGLint attribute, EGLint * value]
eglGetSystemTimeFrequencyNV: [EGLuint64NV]
eglGetSystemTimeNV: [EGLuint64NV]
eglInitialize: [EGLBoolean, EGLDisplay dpy, EGLint * major, EGLint * minor]
eglLockSurfaceKHR: [EGLBoolean, EGLDisplay display, EGLSurface surface, const EGLint
* attrib_list]
eglMakeCurrent: [EGLBoolean, EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext
ctx]
eglPostSubBufferNV: [EGLBoolean, EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint
y, EGLint width, EGLint height]
eglQueryAPI: [EGLenum]
eglQueryContext: [EGLBoolean, EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint
* value]
eglQueryNativeDisplayNV: [EGLBoolean, EGLDisplay dpy, EGLNativeDisplayType * display_id]
eglQueryNativePixmapNV: [EGLBoolean, EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType
* pixmap]
eglQueryNativeWindowNV: [EGLBoolean, EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType
* window]
eglQueryStreamKHR: [EGLBoolean, EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute,
EGLint * value]
eglQueryStreamTimeKHR: [EGLBoolean, EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute,
EGLTimeKHR * value]
eglQueryStreamu64KHR: [EGLBoolean, EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute,
EGLuint64KHR * value]
eglQueryString: [const char *, EGLDisplay dpy, EGLint name]
eglQuerySurface: [EGLBoolean, EGLDisplay dpy, EGLSurface surface, EGLint attribute,
EGLint * value]
eglQuerySurfacePointerANGLE: [EGLBoolean, EGLDisplay dpy, EGLSurface surface, EGLint
attribute, void ** value]
eglReleaseTexImage: [EGLBoolean, EGLDisplay dpy, EGLSurface surface, EGLint buffer]
eglReleaseThread: [EGLBoolean]
eglSetBlobCacheFuncsANDROID: ['void ', EGLDisplay dpy, EGLSetBlobFuncANDROID set,
EGLGetBlobFuncANDROID get]
eglSignalSyncKHR: [EGLBoolean, EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode]
eglSignalSyncNV: [EGLBoolean, EGLSyncNV sync, EGLenum mode]
eglStreamAttribKHR: [EGLBoolean, EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute,
EGLint value]
eglStreamConsumerAcquireKHR: [EGLBoolean, EGLDisplay dpy, EGLStreamKHR stream]
eglStreamConsumerGLTextureExternalKHR: [EGLBoolean, EGLDisplay dpy, EGLStreamKHR stream]
eglStreamConsumerReleaseKHR: [EGLBoolean, EGLDisplay dpy, EGLStreamKHR stream]
eglSurfaceAttrib: [EGLBoolean, EGLDisplay dpy, EGLSurface surface, EGLint attribute,
EGLint value]
eglSwapBuffers: [EGLBoolean, EGLDisplay dpy, EGLSurface surface]
eglSwapBuffersWithDamageEXT: [EGLBoolean, EGLDisplay dpy, EGLSurface surface, EGLint
* rects, EGLint n_rects]
eglSwapInterval: [EGLBoolean, EGLDisplay dpy, EGLint interval]
eglTerminate: [EGLBoolean, EGLDisplay dpy]
eglUnlockSurfaceKHR: [EGLBoolean, EGLDisplay display, EGLSurface surface]
eglWaitClient: [EGLBoolean]
eglWaitGL: [EGLBoolean]
eglWaitNative: [EGLBoolean, EGLint engine]
eglWaitSyncKHR: [EGLint, EGLDisplay dpy, EGLSyncKHR sync, EGLint flags]
View File
+25 -2
View File
@@ -1,4 +1,27 @@
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]
# glTexGenfvOES: [void, GLenum coord, GLenum pname, "const GLfloat *params"]
# glTexGeniOES: [void, GLenum coord, GLenum pname, GLint 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"]
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"]
glDrawTexi: [void, GLint x, GLint y, GLint z, GLint width, GLint height]
glDrawTexf: [void, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height]
+68
View File
@@ -0,0 +1,68 @@
glx:
glXBindHyperpipeSGIX: [int, Display *dpy, int hpId]
glXBindSwapBarrierSGIX: [void, uint32_t window, uint32_t barrier]
glXChangeDrawableAttributes: [void, uint32_t drawable]
glXChangeDrawableAttributesSGIX: [void, uint32_t drawable]
glXClientInfo: [void]
glXCopyContext: [void, uint32_t source, uint32_t dest, uint32_t mask]
glXCreateContext: [void, uint32_t gc_id, uint32_t screen, uint32_t visual, uint32_t
share_list]
glXCreateContextWithConfigSGIX: [void, uint32_t gc_id, uint32_t screen, uint32_t
config, uint32_t share_list]
glXCreateGLXPbufferSGIX: [void, uint32_t config, uint32_t pbuffer]
glXCreateGLXPixmap: [void, uint32_t visual, uint32_t pixmap, uint32_t glxpixmap]
glXCreateGLXPixmapWithConfigSGIX: [void, uint32_t config, uint32_t pixmap, uint32_t
glxpixmap]
glXCreateGLXVideoSourceSGIX: [void, uint32_t dpy, uint32_t screen, uint32_t server,
uint32_t path, uint32_t class, uint32_t node]
glXCreateNewContext: [void, uint32_t config, uint32_t render_type, uint32_t share_list,
uint32_t direct]
glXCreatePbuffer: [void, uint32_t config, uint32_t pbuffer]
glXCreatePixmap: [void, uint32_t config, uint32_t pixmap, uint32_t glxpixmap]
glXCreateWindow: [void, uint32_t config, uint32_t window, uint32_t glxwindow]
glXDestroyContext: [void, uint32_t context]
glXDestroyGLXPbufferSGIX: [void, uint32_t pbuffer]
glXDestroyGLXPixmap: [void, uint32_t pixmap]
glXDestroyGLXVideoSourceSGIX: [void, uint32_t dpy, uint32_t glxvideosource]
glXDestroyHyperpipeConfigSGIX: [int, Display *dpy, int hpId]
glXDestroyPbuffer: [void, uint32_t pbuffer]
glXDestroyPixmap: [void, uint32_t glxpixmap]
glXDestroyWindow: [void, uint32_t glxwindow]
glXGetDrawableAttributes: [void, uint32_t drawable]
glXGetDrawableAttributesSGIX: [void, uint32_t drawable]
glXGetFBConfigs: [void]
glXGetFBConfigsSGIX: [void]
glXGetVisualConfigs: [void]
glXHyperpipeAttribSGIX: [int, Display *dpy, int timeSlice, int attrib, int size,
const void *attribList]
glXHyperpipeConfigSGIX: [int, Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX
cfg, int *hpId]
glXIsDirect: [void, uint32_t dpy, uint32_t context]
glXJoinSwapGroupSGIX: [void, uint32_t window, uint32_t group]
glXMakeContextCurrent: [void, uint32_t drawable, uint32_t readdrawable, uint32_t
context]
glXMakeCurrent: [void, uint32_t drawable, uint32_t context]
glXMakeCurrentReadSGI: [void, uint32_t drawable, uint32_t readdrawable, uint32_t
context]
glXQueryContext: [void]
glXQueryContextInfoEXT: [void]
glXQueryExtensionsString: [void, uint32_t screen]
glXQueryHyperpipeAttribSGIX: [int, Display *dpy, int timeSlice, int attrib, int
size, const void *returnAttribList]
glXQueryHyperpipeBestAttribSGIX: [int, Display *dpy, int timeSlice, int attrib,
int size, const void *attribList, void *returnAttribList]
glXQueryHyperpipeConfigSGIX: [GLXHyperpipeConfigSGIX *, Display *dpy, int hpId,
int *npipes]
glXQueryHyperpipeNetworkSGIX: [GLXHyperpipeNetworkSGIX *, Display *dpy, int *npipes]
glXQueryMaxSwapBarriersSGIX: [void]
glXQueryServerString: [void, uint32_t screen, uint32_t name]
glXQueryVersion: [void, uint32_t *major, uint32_t *minor]
glXRender: [void]
glXRenderLarge: [void]
glXSwapBuffers: [void, uint32_t drawable]
glXSwapIntervalSGI: [void]
glXUseXFont: [void, uint32_t font, uint32_t first, uint32_t count, uint32_t list_base]
glXVendorPrivate: [void]
glXVendorPrivateWithReply: [void]
glXWaitGL: [void, uint32_t context]
glXWaitX: [void]
+178
View File
@@ -0,0 +1,178 @@
ARB_create_context:
glXCreateContextAttribsARB: [GLXContext, Display *dpy, GLXFBConfig config, GLXContext
share_context, Bool direct, const int *attrib_list]
ARB_get_proc_address:
glXGetProcAddressARB: [__GLXextFuncPtr, const GLubyte *procName]
EXT_import_context:
glXFreeContextEXT: [void, Display *dpy, GLXContext context]
glXGetContextIDEXT: [GLXContextID, const GLXContext context]
glXGetCurrentDisplayEXT: [Display *]
glXImportContextEXT: [GLXContext, Display *dpy, GLXContextID contextID]
glXQueryContextInfoEXT: [int, Display *dpy, GLXContext context, int attribute, int
*value]
EXT_swap_control:
glXSwapIntervalEXT: [void, Display *dpy, GLXDrawable drawable, int interval]
EXT_texture_from_pixmap:
glXBindTexImageEXT: [void, Display *dpy, GLXDrawable drawable, int buffer, const
int *attrib_list]
glXReleaseTexImageEXT: [void, Display *dpy, GLXDrawable drawable, int buffer]
MESA_agp_offset:
glXGetAGPOffsetMESA: [unsigned int, const void *pointer]
MESA_copy_sub_buffer:
glXCopySubBufferMESA: [void, Display *dpy, GLXDrawable drawable, int x, int y, int
width, int height]
MESA_pixmap_colormap:
glXCreateGLXPixmapMESA: [GLXPixmap, Display *dpy, XVisualInfo *visual, Pixmap pixmap,
Colormap cmap]
MESA_release_buffers:
glXReleaseBuffersMESA: [Bool, Display *dpy, GLXDrawable drawable]
MESA_set_3dfx_mode:
glXSet3DfxModeMESA: [Bool, int mode]
NV_copy_image:
glXCopyImageSubDataNV: [void, Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum
srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx,
GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint
dstZ, GLsizei width, GLsizei height, GLsizei depth]
NV_present_video:
glXBindVideoDeviceNV: [int, Display *dpy, unsigned int video_slot, unsigned int
video_device, const int *attrib_list]
glXEnumerateVideoDevicesNV: [unsigned int *, Display *dpy, int screen, int *nelements]
NV_swap_group:
glXBindSwapBarrierNV: [Bool, Display *dpy, GLuint group, GLuint barrier]
glXJoinSwapGroupNV: [Bool, Display *dpy, GLXDrawable drawable, GLuint group]
glXQueryFrameCountNV: [Bool, Display *dpy, int screen, GLuint *count]
glXQueryMaxSwapGroupsNV: [Bool, Display *dpy, int screen, GLuint *maxGroups, GLuint
*maxBarriers]
glXQuerySwapGroupNV: [Bool, Display *dpy, GLXDrawable drawable, GLuint *group, GLuint
*barrier]
glXResetFrameCountNV: [Bool, Display *dpy, int screen]
NV_video_capture:
glXBindVideoCaptureDeviceNV: [int, Display *dpy, unsigned int video_capture_slot,
GLXVideoCaptureDeviceNV device]
glXEnumerateVideoCaptureDevicesNV: [GLXVideoCaptureDeviceNV *, Display *dpy, int
screen, int *nelements]
glXLockVideoCaptureDeviceNV: [void, Display *dpy, GLXVideoCaptureDeviceNV device]
glXQueryVideoCaptureDeviceNV: [int, Display *dpy, GLXVideoCaptureDeviceNV device,
int attribute, int *value]
glXReleaseVideoCaptureDeviceNV: [void, Display *dpy, GLXVideoCaptureDeviceNV device]
NV_video_output:
glXBindVideoImageNV: [int, Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer
pbuf, int iVideoBuffer]
glXGetVideoDeviceNV: [int, Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV
*pVideoDevice]
glXGetVideoInfoNV: [int, Display *dpy, int screen, GLXVideoDeviceNV VideoDevice,
unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo]
glXReleaseVideoDeviceNV: [int, Display *dpy, int screen, GLXVideoDeviceNV VideoDevice]
glXReleaseVideoImageNV: [int, Display *dpy, GLXPbuffer pbuf]
glXSendPbufferToVideoNV: [int, Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned
long *pulCounterPbuffer, GLboolean bBlock]
OML_sync_control:
glXGetMscRateOML: [Bool, Display *dpy, GLXDrawable drawable, int32_t *numerator,
int32_t *denominator]
glXGetSyncValuesOML: [Bool, Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t
*msc, int64_t *sbc]
glXSwapBuffersMscOML: [int64_t, Display *dpy, GLXDrawable drawable, int64_t target_msc,
int64_t divisor, int64_t remainder]
glXWaitForMscOML: [Bool, Display *dpy, GLXDrawable drawable, int64_t target_msc,
int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc]
glXWaitForSbcOML: [Bool, Display *dpy, GLXDrawable drawable, int64_t target_sbc,
int64_t *ust, int64_t *msc, int64_t *sbc]
SGIX_dmbuffer:
glXAssociateDMPbufferSGIX: [Bool, Display *dpy, GLXPbufferSGIX pbuffer, DMparams
*params, DMbuffer dmbuffer]
SGIX_fbconfig:
glXChooseFBConfigSGIX: [GLXFBConfigSGIX *, Display *dpy, int screen, int *attrib_list,
int *nelements]
glXCreateContextWithConfigSGIX: [GLXContext, Display *dpy, GLXFBConfigSGIX config,
int render_type, GLXContext share_list, Bool direct]
glXCreateGLXPixmapWithConfigSGIX: [GLXPixmap, Display *dpy, GLXFBConfigSGIX config,
Pixmap pixmap]
glXGetFBConfigAttribSGIX: [int, Display *dpy, GLXFBConfigSGIX config, int attribute,
int *value]
glXGetFBConfigFromVisualSGIX: [GLXFBConfigSGIX, Display *dpy, XVisualInfo *vis]
glXGetVisualFromFBConfigSGIX: [XVisualInfo *, Display *dpy, GLXFBConfigSGIX config]
SGIX_hyperpipe:
glXBindHyperpipeSGIX: [int, Display *dpy, int hpId]
glXDestroyHyperpipeConfigSGIX: [int, Display *dpy, int hpId]
glXHyperpipeAttribSGIX: [int, Display *dpy, int timeSlice, int attrib, int size,
void *attribList]
glXHyperpipeConfigSGIX: [int, Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX
*cfg, int *hpId]
glXQueryHyperpipeAttribSGIX: [int, Display *dpy, int timeSlice, int attrib, int
size, void *returnAttribList]
glXQueryHyperpipeBestAttribSGIX: [int, Display *dpy, int timeSlice, int attrib,
int size, void *attribList, void *returnAttribList]
glXQueryHyperpipeConfigSGIX: [GLXHyperpipeConfigSGIX *, Display *dpy, int hpId,
int *npipes]
glXQueryHyperpipeNetworkSGIX: [GLXHyperpipeNetworkSGIX *, Display *dpy, int *npipes]
SGIX_pbuffer:
glXCreateGLXPbufferSGIX: [GLXPbufferSGIX, Display *dpy, GLXFBConfigSGIX config,
unsigned int width, unsigned int height, int *attrib_list]
glXDestroyGLXPbufferSGIX: [void, Display *dpy, GLXPbufferSGIX pbuf]
glXGetSelectedEventSGIX: [void, Display *dpy, GLXDrawable drawable, unsigned long
*mask]
glXQueryGLXPbufferSGIX: [int, Display *dpy, GLXPbufferSGIX pbuf, int attribute,
unsigned int *value]
glXSelectEventSGIX: [void, Display *dpy, GLXDrawable drawable, unsigned long mask]
SGIX_swap_barrier:
glXBindSwapBarrierSGIX: [void, Display *dpy, GLXDrawable drawable, int barrier]
glXQueryMaxSwapBarriersSGIX: [Bool, Display *dpy, int screen, int *max]
SGIX_swap_group:
glXJoinSwapGroupSGIX: [void, Display *dpy, GLXDrawable drawable, GLXDrawable member]
SGIX_video_resize:
glXBindChannelToWindowSGIX: [int, Display *display, int screen, int channel, Window
window]
glXChannelRectSGIX: [int, Display *display, int screen, int channel, int x, int
y, int w, int h]
glXChannelRectSyncSGIX: [int, Display *display, int screen, int channel, GLenum
synctype]
glXQueryChannelDeltasSGIX: [int, Display *display, int screen, int channel, int
*x, int *y, int *w, int *h]
glXQueryChannelRectSGIX: [int, Display *display, int screen, int channel, int *dx,
int *dy, int *dw, int *dh]
SGIX_video_source:
glXCreateGLXVideoSourceSGIX: [GLXVideoSourceSGIX, Display *display, int screen,
VLServer server, VLPath path, int nodeClass, VLNode drainNode]
glXDestroyGLXVideoSourceSGIX: [void, Display *dpy, GLXVideoSourceSGIX glxvideosource]
SGI_cushion:
glXCushionSGI: [void, Display *dpy, Window window, float cushion]
SGI_make_current_read:
glXGetCurrentReadDrawableSGI: [GLXDrawable]
glXMakeCurrentReadSGI: [Bool, Display *dpy, GLXDrawable draw, GLXDrawable read,
GLXContext ctx]
SGI_swap_control:
glXSwapIntervalSGI: [int, int interval]
SGI_video_sync:
glXGetVideoSyncSGI: [int, unsigned int *count]
glXWaitVideoSyncSGI: [int, int divisor, int remainder, unsigned int *count]
SUN_get_transparent_index:
glXGetTransparentIndexSUN: [Status, Display *dpy, Window overlay, Window underlay,
long *pTransparentIndex]
VERSION_1_3:
glXChooseFBConfig: [GLXFBConfig *, Display *dpy, int screen, const int *attrib_list,
int *nelements]
glXCreateNewContext: [GLXContext, Display *dpy, GLXFBConfig config, int render_type,
GLXContext share_list, Bool direct]
glXCreatePbuffer: [GLXPbuffer, Display *dpy, GLXFBConfig config, const int *attrib_list]
glXCreatePixmap: [GLXPixmap, Display *dpy, GLXFBConfig config, Pixmap pixmap, const
int *attrib_list]
glXCreateWindow: [GLXWindow, Display *dpy, GLXFBConfig config, Window win, const
int *attrib_list]
glXDestroyPbuffer: [void, Display *dpy, GLXPbuffer pbuf]
glXDestroyPixmap: [void, Display *dpy, GLXPixmap pixmap]
glXDestroyWindow: [void, Display *dpy, GLXWindow win]
glXGetCurrentDisplay: [Display *]
glXGetCurrentReadDrawable: [GLXDrawable]
glXGetFBConfigAttrib: [int, Display *dpy, GLXFBConfig config, int attribute, int
*value]
glXGetFBConfigs: [GLXFBConfig *, Display *dpy, int screen, int *nelements]
glXGetSelectedEvent: [void, Display *dpy, GLXDrawable draw, unsigned long *event_mask]
glXGetVisualFromFBConfig: [XVisualInfo *, Display *dpy, GLXFBConfig config]
glXMakeContextCurrent: [Bool, Display *dpy, GLXDrawable draw, GLXDrawable read,
GLXContext ctx]
glXQueryContext: [int, Display *dpy, GLXContext ctx, int attribute, int *value]
glXQueryDrawable: [void, Display *dpy, GLXDrawable draw, int attribute, unsigned
int *value]
glXSelectEvent: [void, Display *dpy, GLXDrawable draw, unsigned long event_mask]
VERSION_1_4:
glXGetProcAddress: [__GLXextFuncPtr, const GLubyte *procName]
+76
View File
@@ -0,0 +1,76 @@
glx:
glXChooseVisual: [XVisualInfo *, Display *dpy, int screen, int *attribList]
glXBindHyperpipeSGIX: [int, Display *dpy, int hpId]
glXBindSwapBarrierSGIX: [void, uint32_t window, uint32_t barrier]
glXChangeDrawableAttributes: [void, uint32_t drawable]
glXChangeDrawableAttributesSGIX: [void, uint32_t drawable]
glXClientInfo: [void]
glXCopyContext: [void, Display *dpy, GLXContext src, GLXContext dst, unsigned long mask]
glXCreateContext: [GLXContext, Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct]
glXCreateContextAttribsARB: [GLXContext, Display *display, void *config, GLXContext share_context, Bool direct, const int *attrib_list]
glXCreateContextWithConfigSGIX: [void, uint32_t gc_id, uint32_t screen, uint32_t
config, uint32_t share_list]
glXCreateGLXPbufferSGIX: [void, uint32_t config, uint32_t pbuffer]
glXCreateGLXPixmap: [GLXPixmap, Display *dpy, XVisualInfo *visual, Pixmap pixmap]
glXCreateGLXPixmapWithConfigSGIX: [void, uint32_t config, uint32_t pixmap, uint32_t
glxpixmap]
glXCreateGLXVideoSourceSGIX: [void, Display *dpy, uint32_t screen, uint32_t server,
uint32_t path, uint32_t class, uint32_t node]
glXCreateNewContext: [void, uint32_t config, uint32_t render_type, uint32_t share_list,
uint32_t direct]
glXCreatePbuffer: [void, uint32_t config, uint32_t pbuffer]
glXCreatePixmap: [void, uint32_t config, uint32_t pixmap, uint32_t glxpixmap]
glXCreateWindow: [void, uint32_t config, uint32_t window, uint32_t glxwindow]
glXDestroyContext: [void, Display *dpy, GLXContext ctx]
glXDestroyGLXPbufferSGIX: [void, uint32_t pbuffer]
glXDestroyGLXPixmap: [void, Display *dpy, GLXPixmap pixmap]
glXDestroyGLXVideoSourceSGIX: [void, Display *dpy, uint32_t glxvideosource]
glXDestroyHyperpipeConfigSGIX: [int, Display *dpy, int hpId]
glXDestroyPbuffer: [void, uint32_t pbuffer]
glXDestroyPixmap: [void, uint32_t glxpixmap]
glXDestroyWindow: [void, uint32_t glxwindow]
glXGetDrawableAttributes: [void, uint32_t drawable]
glXGetDrawableAttributesSGIX: [void, uint32_t drawable]
glXGetClientString: [const char *, Display *display, int name]
glXGetCurrentContext: [GLXContext]
glXGetCurrentDrawable: [GLXDrawable]
glXGetConfig: [int, Display *display, XVisualInfo *visual, int attribute, int *value]
glXGetFBConfigs: [void]
glXGetFBConfigsSGIX: [void]
glXGetVisualConfigs: [void]
glXHyperpipeAttribSGIX: [int, Display *dpy, int timeSlice, int attrib, int size,
const void *attribList]
glXHyperpipeConfigSGIX: [int, Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX
cfg, int *hpId]
glXIsDirect: [Bool, Display *dpy, GLXContext ctx]
glXJoinSwapGroupSGIX: [void, uint32_t window, uint32_t group]
glXMakeContextCurrent: [void, uint32_t drawable, uint32_t readdrawable, uint32_t
context]
glXMakeCurrent: [Bool, Display *dpy, GLXDrawable drawable, GLXContext ctx]
glXMakeCurrentReadSGI: [void, uint32_t drawable, uint32_t readdrawable, uint32_t
context]
glXQueryContext: [void]
glXQueryContextInfoEXT: [void]
glXQueryExtension: [Bool, Display *display, int *errorBase, int *eventBase]
glXQueryExtensionsString: [const char *, Display *dpy, int screen]
glXQueryHyperpipeAttribSGIX: [int, Display *dpy, int timeSlice, int attrib, int
size, const void *returnAttribList]
glXQueryHyperpipeBestAttribSGIX: [int, Display *dpy, int timeSlice, int attrib,
int size, const void *attribList, void *returnAttribList]
glXQueryHyperpipeConfigSGIX: [GLXHyperpipeConfigSGIX *, Display *dpy, int hpId,
int *npipes]
glXQueryHyperpipeNetworkSGIX: [GLXHyperpipeNetworkSGIX *, Display *dpy, int *npipes]
glXQueryMaxSwapBarriersSGIX: [void]
glXQueryServerString: [const char *, Display *dpy, int screen, int name]
glXQueryVersion: [Bool, Display *dpy, int *maj, int *min]
glXReleaseBuffersMESA: [Bool, Display *dpy, GLXDrawable drawable]
glXRender: [void]
glXRenderLarge: [void]
glXSwapBuffers: [void, Display *dpy, GLXDrawable drawable]
glXSwapIntervalSGI: [void, unsigned int interval]
glXSwapIntervalMESA: [int, unsigned int interval]
glXUseXFont: [void, Font font, int first, int count, int list]
glXVendorPrivate: [void]
glXVendorPrivateWithReply: [void]
glXWaitGL: [void]
glXWaitX: [void]
-4
View File
@@ -1,4 +0,0 @@
glBlendColorOES: [void, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha]
glBlendEquationOES: [void, GLenum mode]
glBlendEquationSeparateOES: [void, GLenum modeRGB, GLenum modeAlpha]
glBlendFuncSeparateOES: [void, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha]
View File
+177
View File
@@ -0,0 +1,177 @@
3DL_stereo_control:
wglSetStereoEmitterState3DL: [BOOL, HDC hDC, UINT uState]
AMD_gpu_association:
wglBlitContextFramebufferAMD: [VOID, HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint
srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield
mask, GLenum filter]
wglCreateAssociatedContextAMD: [HGLRC, UINT id]
wglCreateAssociatedContextAttribsAMD: [HGLRC, UINT id, HGLRC hShareContext, const
int *attribList]
wglDeleteAssociatedContextAMD: [BOOL, HGLRC hglrc]
wglGetContextGPUIDAMD: [UINT, HGLRC hglrc]
wglGetCurrentAssociatedContextAMD: [HGLRC]
wglGetGPUIDsAMD: [UINT, UINT maxCount, UINT *ids]
wglGetGPUInfoAMD: [INT, UINT id, int property, GLenum dataType, UINT size, void
*data]
wglMakeAssociatedContextCurrentAMD: [BOOL, HGLRC hglrc]
ARB_buffer_region:
wglCreateBufferRegionARB: [HANDLE, HDC hDC, int iLayerPlane, UINT uType]
wglDeleteBufferRegionARB: [VOID, HANDLE hRegion]
wglRestoreBufferRegionARB: [BOOL, HANDLE hRegion, int x, int y, int width, int height,
int xSrc, int ySrc]
wglSaveBufferRegionARB: [BOOL, HANDLE hRegion, int x, int y, int width, int height]
ARB_create_context:
wglCreateContextAttribsARB: [HGLRC, HDC hDC, HGLRC hShareContext, const int *attribList]
ARB_extensions_string:
wglGetExtensionsStringARB: [const char *, HDC hdc]
ARB_make_current_read:
wglGetCurrentReadDCARB: [HDC]
wglMakeContextCurrentARB: [BOOL, HDC hDrawDC, HDC hReadDC, HGLRC hglrc]
ARB_pbuffer:
wglCreatePbufferARB: [HPBUFFERARB, HDC hDC, int iPixelFormat, int iWidth, int iHeight,
const int *piAttribList]
wglDestroyPbufferARB: [BOOL, HPBUFFERARB hPbuffer]
wglGetPbufferDCARB: [HDC, HPBUFFERARB hPbuffer]
wglQueryPbufferARB: [BOOL, HPBUFFERARB hPbuffer, int iAttribute, int *piValue]
wglReleasePbufferDCARB: [int, HPBUFFERARB hPbuffer, HDC hDC]
ARB_pixel_format:
wglChoosePixelFormatARB: [BOOL, HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList,
UINT nMaxFormats, int *piFormats, UINT *nNumFormats]
wglGetPixelFormatAttribfvARB: [BOOL, HDC hdc, int iPixelFormat, int iLayerPlane,
UINT nAttributes, const int *piAttributes, FLOAT *pfValues]
wglGetPixelFormatAttribivARB: [BOOL, HDC hdc, int iPixelFormat, int iLayerPlane,
UINT nAttributes, const int *piAttributes, int *piValues]
ARB_render_texture:
wglBindTexImageARB: [BOOL, HPBUFFERARB hPbuffer, int iBuffer]
wglReleaseTexImageARB: [BOOL, HPBUFFERARB hPbuffer, int iBuffer]
wglSetPbufferAttribARB: [BOOL, HPBUFFERARB hPbuffer, const int *piAttribList]
EXT_display_color_table:
wglBindDisplayColorTableEXT: [GLboolean, GLushort id]
wglCreateDisplayColorTableEXT: [GLboolean, GLushort id]
wglDestroyDisplayColorTableEXT: [VOID, GLushort id]
wglLoadDisplayColorTableEXT: [GLboolean, const GLushort *table, GLuint length]
EXT_extensions_string:
wglGetExtensionsStringEXT: [const char *]
EXT_make_current_read:
wglGetCurrentReadDCEXT: [HDC]
wglMakeContextCurrentEXT: [BOOL, HDC hDrawDC, HDC hReadDC, HGLRC hglrc]
EXT_pbuffer:
wglCreatePbufferEXT: [HPBUFFEREXT, HDC hDC, int iPixelFormat, int iWidth, int iHeight,
const int *piAttribList]
wglDestroyPbufferEXT: [BOOL, HPBUFFEREXT hPbuffer]
wglGetPbufferDCEXT: [HDC, HPBUFFEREXT hPbuffer]
wglQueryPbufferEXT: [BOOL, HPBUFFEREXT hPbuffer, int iAttribute, int *piValue]
wglReleasePbufferDCEXT: [int, HPBUFFEREXT hPbuffer, HDC hDC]
EXT_pixel_format:
wglChoosePixelFormatEXT: [BOOL, HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList,
UINT nMaxFormats, int *piFormats, UINT *nNumFormats]
wglGetPixelFormatAttribfvEXT: [BOOL, HDC hdc, int iPixelFormat, int iLayerPlane,
UINT nAttributes, int *piAttributes, FLOAT *pfValues]
wglGetPixelFormatAttribivEXT: [BOOL, HDC hdc, int iPixelFormat, int iLayerPlane,
UINT nAttributes, int *piAttributes, int *piValues]
EXT_swap_control:
wglGetSwapIntervalEXT: [int]
wglSwapIntervalEXT: [BOOL, int interval]
I3D_digital_video_control:
wglGetDigitalVideoParametersI3D: [BOOL, HDC hDC, int iAttribute, int *piValue]
wglSetDigitalVideoParametersI3D: [BOOL, HDC hDC, int iAttribute, const int *piValue]
I3D_gamma:
wglGetGammaTableI3D: [BOOL, HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen,
USHORT *puBlue]
wglGetGammaTableParametersI3D: [BOOL, HDC hDC, int iAttribute, int *piValue]
wglSetGammaTableI3D: [BOOL, HDC hDC, int iEntries, const USHORT *puRed, const USHORT
*puGreen, const USHORT *puBlue]
wglSetGammaTableParametersI3D: [BOOL, HDC hDC, int iAttribute, const int *piValue]
I3D_genlock:
wglDisableGenlockI3D: [BOOL, HDC hDC]
wglEnableGenlockI3D: [BOOL, HDC hDC]
wglGenlockSampleRateI3D: [BOOL, HDC hDC, UINT uRate]
wglGenlockSourceDelayI3D: [BOOL, HDC hDC, UINT uDelay]
wglGenlockSourceEdgeI3D: [BOOL, HDC hDC, UINT uEdge]
wglGenlockSourceI3D: [BOOL, HDC hDC, UINT uSource]
wglGetGenlockSampleRateI3D: [BOOL, HDC hDC, UINT *uRate]
wglGetGenlockSourceDelayI3D: [BOOL, HDC hDC, UINT *uDelay]
wglGetGenlockSourceEdgeI3D: [BOOL, HDC hDC, UINT *uEdge]
wglGetGenlockSourceI3D: [BOOL, HDC hDC, UINT *uSource]
wglIsEnabledGenlockI3D: [BOOL, HDC hDC, BOOL *pFlag]
wglQueryGenlockMaxSourceDelayI3D: [BOOL, HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay]
I3D_image_buffer:
wglAssociateImageBufferEventsI3D: [BOOL, HDC hDC, const HANDLE *pEvent, const LPVOID
*pAddress, const DWORD *pSize, UINT count]
wglCreateImageBufferI3D: [LPVOID, HDC hDC, DWORD dwSize, UINT uFlags]
wglDestroyImageBufferI3D: [BOOL, HDC hDC, LPVOID pAddress]
wglReleaseImageBufferEventsI3D: [BOOL, HDC hDC, const LPVOID *pAddress, UINT count]
I3D_swap_frame_lock:
wglDisableFrameLockI3D: [BOOL]
wglEnableFrameLockI3D: [BOOL]
wglIsEnabledFrameLockI3D: [BOOL, BOOL *pFlag]
wglQueryFrameLockMasterI3D: [BOOL, BOOL *pFlag]
I3D_swap_frame_usage:
wglBeginFrameTrackingI3D: [BOOL]
wglEndFrameTrackingI3D: [BOOL]
wglGetFrameUsageI3D: [BOOL, float *pUsage]
wglQueryFrameTrackingI3D: [BOOL, DWORD *pFrameCount, DWORD *pMissedFrames, float
*pLastMissedUsage]
NV_DX_interop:
wglDXCloseDeviceNV: [BOOL, HANDLE hDevice]
wglDXLockObjectsNV: [BOOL, HANDLE hDevice, GLint count, HANDLE *hObjects]
wglDXObjectAccessNV: [BOOL, HANDLE hObject, GLenum access]
wglDXOpenDeviceNV: [HANDLE, void *dxDevice]
wglDXRegisterObjectNV: [HANDLE, HANDLE hDevice, void *dxObject, GLuint name, GLenum
type, GLenum access]
wglDXSetResourceShareHandleNV: [BOOL, void *dxObject, HANDLE shareHandle]
wglDXUnlockObjectsNV: [BOOL, HANDLE hDevice, GLint count, HANDLE *hObjects]
wglDXUnregisterObjectNV: [BOOL, HANDLE hDevice, HANDLE hObject]
NV_copy_image:
wglCopyImageSubDataNV: [BOOL, HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint
srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName,
GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei
width, GLsizei height, GLsizei depth]
NV_gpu_affinity:
wglCreateAffinityDCNV: [HDC, const HGPUNV *phGpuList]
wglDeleteDCNV: [BOOL, HDC hdc]
wglEnumGpuDevicesNV: [BOOL, HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice]
wglEnumGpusFromAffinityDCNV: [BOOL, HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu]
wglEnumGpusNV: [BOOL, UINT iGpuIndex, HGPUNV *phGpu]
NV_present_video:
wglBindVideoDeviceNV: [BOOL, HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV
hVideoDevice, const int *piAttribList]
wglEnumerateVideoDevicesNV: [int, HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList]
wglQueryCurrentContextNV: [BOOL, int iAttribute, int *piValue]
NV_swap_group:
wglBindSwapBarrierNV: [BOOL, GLuint group, GLuint barrier]
wglJoinSwapGroupNV: [BOOL, HDC hDC, GLuint group]
wglQueryFrameCountNV: [BOOL, HDC hDC, GLuint *count]
wglQueryMaxSwapGroupsNV: [BOOL, HDC hDC, GLuint *maxGroups, GLuint *maxBarriers]
wglQuerySwapGroupNV: [BOOL, HDC hDC, GLuint *group, GLuint *barrier]
wglResetFrameCountNV: [BOOL, HDC hDC]
NV_vertex_array_range:
wglAllocateMemoryNV: [void *, GLsizei size, GLfloat readfreq, GLfloat writefreq,
GLfloat priority]
wglFreeMemoryNV: [void *, void *pointer]
NV_video_capture:
wglBindVideoCaptureDeviceNV: [BOOL, UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice]
wglEnumerateVideoCaptureDevicesNV: [UINT, HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList]
wglLockVideoCaptureDeviceNV: [BOOL, HDC hDc, HVIDEOINPUTDEVICENV hDevice]
wglQueryVideoCaptureDeviceNV: [BOOL, HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute,
int *piValue]
wglReleaseVideoCaptureDeviceNV: [BOOL, HDC hDc, HVIDEOINPUTDEVICENV hDevice]
NV_video_output:
wglBindVideoImageNV: [BOOL, HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer]
wglGetVideoDeviceNV: [BOOL, HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice]
wglGetVideoInfoNV: [BOOL, HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer,
unsigned long *pulCounterOutputVideo]
wglReleaseVideoDeviceNV: [BOOL, HPVIDEODEV hVideoDevice]
wglReleaseVideoImageNV: [BOOL, HPBUFFERARB hPbuffer, int iVideoBuffer]
wglSendPbufferToVideoNV: [BOOL, HPBUFFERARB hPbuffer, int iBufferType, unsigned
long *pulCounterPbuffer, BOOL bBlock]
OML_sync_control:
wglGetMscRateOML: [BOOL, HDC hdc, INT32 *numerator, INT32 *denominator]
wglGetSyncValuesOML: [BOOL, HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc]
wglSwapBuffersMscOML: [INT64, HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder]
wglSwapLayerBuffersMscOML: [INT64, HDC hdc, int fuPlanes, INT64 target_msc, INT64
divisor, INT64 remainder]
wglWaitForMscOML: [BOOL, HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder,
INT64 *ust, INT64 *msc, INT64 *sbc]
wglWaitForSbcOML: [BOOL, HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64
*sbc]
+1 -2
View File
@@ -15,11 +15,10 @@ add_library(GL SHARED ${GL_SOURCES})
if(BCMHOST)
set(PI_LIBS bcm_host vcos pthread)
target_link_libraries(GL ${PI_LIBS} GLESv1_CM)
target_link_libraries(GL2 ${PI_LIBS} GLESv2)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries(GL X11 dl)
target_link_libraries(GL X11 m dl)
endif()
if(CMAKE_SHARED_LIBRARY_SUFFIX MATCHES ".so")
+10 -8
View File
@@ -202,16 +202,18 @@ GLfloat *copy_eval_double(GLenum target, GLint ustride, GLint uorder,
return points;
}
void normalize_indices(GLushort *indices, GLsizei *max, GLsizei *min, GLsizei count) {
*max = 0;
*min = -1;
for (int i = 0; i < count; i++) {
void getminmax_indices(GLushort *indices, GLsizei *max, GLsizei *min, GLsizei count) {
if (!count) return;
*max = indices[0];
*min = indices[0];
for (int i = 1; i < count; i++) {
GLsizei n = indices[i];
if (*min == -1)
*min = n;
*min = (n < *min) ? n : *min;
*max = (n > *max) ? n : *max;
if( n < *min) *min = n;
if (n > *max) *max = n;
}
}
void normalize_indices(GLushort *indices, GLsizei *max, GLsizei *min, GLsizei count) {
getminmax_indices(indices, max, min, count);
for (int i = 0; i < count; i++) {
indices[i] -= *min;
}
+1
View File
@@ -19,4 +19,5 @@ GLvoid *copy_gl_pointer_raw(pointer_state_t *ptr, GLsizei width, GLsizei skip, G
GLfloat *gl_pointer_index(pointer_state_t *ptr, GLint index);
GLfloat *copy_eval_double(GLenum target, GLint ustride, GLint uorder, GLint vstride, GLint vorder, const GLdouble *points);
void normalize_indices(GLushort *indices, GLsizei *max, GLsizei *min, GLsizei count);
void getminmax_indices(GLushort *indices, GLsizei *max, GLsizei *min, GLsizei count);
#endif
+4
View File
@@ -282,6 +282,10 @@
#define GL_NAME_STACK_DEPTH 0x0D70
#define GL_MAX_NAME_STACK_DEPTH 0x0D37
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
// evaluators
#define GL_AUTO_NORMAL 0x0D80
Executable → Regular
View File
+27 -5
View File
@@ -146,6 +146,15 @@ const GLubyte *glGetString(GLenum name) {
}
}
void transposeMatrix(float *matrix)
{
float tmp[16];
memcpy(tmp, matrix, sizeof(tmp));
for (int i=0; i<4; i++)
for (int j=0; j<4; j++)
matrix[i*4+j]=tmp[j*4+i];
}
// glGet
extern float zoomx, zoomy;
extern GLfloat raster_scale[4];
@@ -376,6 +385,18 @@ void glGetFloatv(GLenum pname, GLfloat *params) {
case GL_PIXEL_UNPACK_BUFFER_BINDING:
*params=(state.buffers.unpack)?state.buffers.unpack->buffer:0;
break;
case GL_TRANSPOSE_PROJECTION_MATRIX:
gles_glGetFloatv(GL_PROJECTION_MATRIX, params);
transposeMatrix(params);
break;
case GL_TRANSPOSE_MODELVIEW_MATRIX:
gles_glGetFloatv(GL_MODELVIEW_MATRIX, params);
transposeMatrix(params);
break;
case GL_TRANSPOSE_TEXTURE_MATRIX:
gles_glGetFloatv(GL_TEXTURE_MATRIX, params);
transposeMatrix(params);
break;
default:
errorGL();
gles_glGetFloatv(pname, params);
@@ -1345,12 +1366,13 @@ void glEndList() {
state.lists[list - 1] = GetFirst(state.list.active);
state.list.compiling = false;
end_renderlist(state.list.active);
if (gl_batch) {
init_batch();
} else state.list.active = NULL;
state.list.active = NULL;
if (state.list.mode == GL_COMPILE_AND_EXECUTE) {
glCallList(list);
}
if (gl_batch) {
init_batch();
}
}
}
@@ -1646,12 +1668,12 @@ void glBlendFunc(GLenum sfactor, GLenum dfactor) {
default:
break;
}
/*
/*
if ((sfactor==GL_SRC_ALPHA) && (dfactor==GL_ONE)) {
// special case, as seen in Xash3D, but it breaks torus_trooper, so disabled
sfactor = GL_ONE;
}
*/
*/
gles_glBlendFunc(sfactor, dfactor);
}
Executable → Regular
View File
+20 -25
View File
@@ -46,8 +46,8 @@ renderlist_t *alloc_renderlist() {
for (a=0; a<16; a++)
list->matrix_val[a]=((a%4)==0)?1.0f:0.0f; // load identity matrix
*/
list->matrix_val[0] = list->matrix_val[4] = list->matrix_val[8] =
list->matrix_val[12] = list->matrix_val[16] = 1.0f;
list->matrix_val[0] = list->matrix_val[5] = list->matrix_val[10] =
list->matrix_val[15] = 1.0f;
/*
for (a=0; a<MAX_TEX; a++)
list->tex[a] = NULL;
@@ -125,7 +125,7 @@ int rendermode_dimensions(GLenum mode) {
extern GLuint gl_mergelist;
bool islistscompatible_renderlist(renderlist_t *a, renderlist_t *b) {
if (!gl_mergelist)
if (!gl_mergelist || !a)
return false;
// check if 2 "pure rendering" list are compatible for merge
@@ -204,7 +204,7 @@ void renderlist_linestrip_lines(renderlist_t *a, GLushort *indices, int count) {
}
}
void renderlist_triangletrip_triangles(renderlist_t *a, GLushort *indices, int count) {
void renderlist_trianglestrip_triangles(renderlist_t *a, GLushort *indices, int count) {
GLushort *ind = a->indices;
int len = (ind)? a->ilen:a->len;
int ilen = (len-2)*3;
@@ -395,7 +395,7 @@ void append_renderlist(renderlist_t *a, renderlist_t *b) {
case GL_QUAD_STRIP:
case GL_TRIANGLE_STRIP:
alloc_a_indices;
renderlist_triangletrip_triangles(a, newind, 0);
renderlist_trianglestrip_triangles(a, newind, 0);
a->mode = GL_TRIANGLES;
copy_a_indices;
break;
@@ -442,7 +442,7 @@ void append_renderlist(renderlist_t *a, renderlist_t *b) {
break;
case GL_QUAD_STRIP:
case GL_TRIANGLE_STRIP:
renderlist_triangletrip_triangles(b, a->indices + ilen_a, a->len);
renderlist_trianglestrip_triangles(b, a->indices + ilen_a, a->len);
break;
case GL_TRIANGLE_FAN:
case GL_POLYGON:
@@ -470,6 +470,7 @@ void append_renderlist(renderlist_t *a, renderlist_t *b) {
a->len += b->len;
a->ilen += ilen_b;
//all done
a->stage = STAGE_DRAW; // just in case
return;
}
void adjust_renderlist(renderlist_t *list);
@@ -846,7 +847,8 @@ void draw_renderlist(renderlist_t *list) {
vtx.type = GL_FLOAT;
vtx.size = 3;
vtx.stride = 0;
select_glDrawElements(&vtx, list->mode, list->len, GL_UNSIGNED_SHORT, indices);
vtx.buffer = NULL;
select_glDrawElements(&vtx, list->mode, list->ilen, GL_UNSIGNED_SHORT, indices);
} else {
if (state.polygon_mode == GL_LINE && list->mode_init>=GL_TRIANGLES) {
int n, s;
@@ -935,6 +937,7 @@ void draw_renderlist(renderlist_t *list) {
vtx.type = GL_FLOAT;
vtx.size = 3;
vtx.stride = 0;
vtx.buffer = NULL;
select_glDrawArrays(&vtx, list->mode, 0, list->len);
} else {
int len = list->len;
@@ -1083,8 +1086,6 @@ void rlNormal3f(renderlist_t *list, GLfloat x, GLfloat y, GLfloat z) {
GLfloat *normal = (list->normal + (i * 3));
memcpy(normal, list->lastNormal, sizeof(GLfloat) * 3);
}
} else {
resize_renderlist(list);
}
GLfloat *normal = list->lastNormal;
@@ -1099,12 +1100,10 @@ void rlColor4f(renderlist_t *list, GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
if (list->len) for (i = 0; i < list->len-1; i++) {
GLfloat *color = (list->color + (i * 4));
memcpy(color, state.color, sizeof(GLfloat) * 4);
} else {
}/* else {
GLfloat *color = list->color;
color[0] = r; color[1] = g; color[2] = b; color[3] = a;
}
} else {
resize_renderlist(list);
}*/
}
GLfloat *color = state.color;
@@ -1120,8 +1119,6 @@ void rlSecondary3f(renderlist_t *list, GLfloat r, GLfloat g, GLfloat b) {
GLfloat *secondary = (list->secondary + (i * 4));
memcpy(secondary, state.secondary, sizeof(GLfloat) * 4);
}
} else {
resize_renderlist(list);
}
GLfloat *color = state.secondary;
@@ -1230,26 +1227,24 @@ void rlTexCoord2f(renderlist_t *list, GLfloat s, GLfloat t) {
memcpy(tex, state.texcoord[0], sizeof(GLfloat) * 2);
tex += 2;
}
} else {
resize_renderlist(list);
}
GLfloat *tex = state.texcoord[0];
tex[0] = s; tex[1] = t;
}
void rlMultiTexCoord2f(renderlist_t *list, GLenum target, GLfloat s, GLfloat t) {
if (list->tex[target-GL_TEXTURE0] == NULL) {
list->tex[target-GL_TEXTURE0] = alloc_sublist(2, list->cap);
const int tmu = target - GL_TEXTURE0;
if (list->tex[tmu] == NULL) {
list->tex[tmu] = alloc_sublist(2, list->cap);
// catch up
GLfloat *tex = list->tex[target-GL_TEXTURE0];
GLfloat *tex = list->tex[tmu];
if (list->len) for (int i = 0; i < list->len-1; i++) {
memcpy(tex, state.texcoord[target-GL_TEXTURE0], sizeof(GLfloat) * 2);
memcpy(tex, state.texcoord[tmu], sizeof(GLfloat) * 2);
tex += 2;
}
} else {
resize_renderlist(list);
}
GLfloat *tex = state.texcoord[target-GL_TEXTURE0];
GLfloat *tex = state.texcoord[tmu];
tex[0] = s; tex[1] = t;
}
@@ -1286,7 +1281,7 @@ void rlPushCall(renderlist_t *list, packed_call_t *data) {
cl->calls[cl->len++] = data;
}
renderlist_t* GetFirst(const renderlist_t* list) {
renderlist_t* GetFirst(renderlist_t* list) {
while(list->prev)
list = list->prev;
return list;
+1 -1
View File
@@ -139,7 +139,7 @@ typedef struct _renderlist_t {
#define NewStage(l, s) if (l->stage+StageExclusive[l->stage] > s) {l = extend_renderlist(l);} l->stage = s
renderlist_t* GetFirst(const renderlist_t* list);
renderlist_t* GetFirst(renderlist_t* list);
extern renderlist_t *alloc_renderlist();
extern renderlist_t *extend_renderlist(renderlist_t *list);
View File
View File
+106 -65
View File
@@ -1,5 +1,35 @@
#include "render.h"
void push_hit() {
// push current hit to hit list, and re-init current hit
if (state.selectbuf.hit) {
if (!state.selectbuf.overflow) {
if (state.selectbuf.zmin<0.0f) state.selectbuf.zmin=0.0f; // not really normalized...
if (state.selectbuf.zmax>1.0f) state.selectbuf.zmax=1.0f; // TODO, normalize for good?
int tocopy = state.namestack.top + 3;
if (tocopy+state.selectbuf.pos > state.selectbuf.size) {
state.selectbuf.overflow = 1;
tocopy = state.selectbuf.size - state.selectbuf.pos;
}
if(tocopy>0)
state.selectbuf.buffer[state.selectbuf.pos+0] = state.namestack.top;
if(tocopy>1)
state.selectbuf.buffer[state.selectbuf.pos+1] = (unsigned int)(state.selectbuf.zmin * INT_MAX );
if(tocopy>2)
state.selectbuf.buffer[state.selectbuf.pos+2] = (unsigned int)(state.selectbuf.zmax * INT_MAX );
if(tocopy>3)
memcpy(state.selectbuf.buffer + state.selectbuf.pos + 3, state.namestack.names, (tocopy-3) * sizeof(GLuint));
state.selectbuf.count++;
state.selectbuf.pos += tocopy;
}
state.selectbuf.hit = 0;
}
state.selectbuf.zmin = 1.0f;
state.selectbuf.zmax = 0.0f;
}
GLint glRenderMode(GLenum mode) {
int ret = 0;
if ((mode==GL_SELECT) || (mode==GL_RENDER)) { // missing GL_FEEDBACK
@@ -8,15 +38,32 @@ GLint glRenderMode(GLenum mode) {
errorShim(GL_INVALID_ENUM);
return 0;
}
if (state.render_mode == GL_SELECT)
ret = state.selectbuf.count/4;
if (state.render_mode == GL_SELECT) {
push_hit();
ret = state.selectbuf.count;
}
if (mode == GL_SELECT) {
if (state.selectbuf.buffer == NULL) {// error, cannot use Select Mode without select buffer
errorShim(GL_INVALID_OPERATION);
return 0;
}
state.selectbuf.count = 0;
state.selectbuf.pos = 0;
state.selectbuf.overflow = 0;
state.selectbuf.zmin = 1.0f;
state.selectbuf.zmax = 0.0f;
state.selectbuf.hit = 0;
}
if((mode==GL_SELECT) && (state.gl_batch)) {
state.gl_batch = 0;
flush();
}
if((mode==GL_RENDER) && (state.gl_batch==0) && (gl_batch==1)) {
state.gl_batch = 1;
flush();
}
state.render_mode = mode;
return ret;
}
@@ -33,6 +80,7 @@ void glPopName() {
noerrorShim();
if (state.render_mode != GL_SELECT)
return;
push_hit();
if (state.namestack.top>0)
state.namestack.top--;
else
@@ -45,6 +93,7 @@ void glPushName(GLuint name) {
return;
if (state.namestack.names==0)
return;
push_hit();
if (state.namestack.top < 1024) {
state.namestack.names[state.namestack.top++] = name;
}
@@ -56,7 +105,10 @@ void glLoadName(GLuint name) {
return;
if (state.namestack.names == 0)
return;
state.namestack.names[state.namestack.top] = name;
push_hit();
if (state.namestack.top == 0)
return;
state.namestack.names[state.namestack.top-1] = name;
}
void glSelectBuffer(GLsizei size, GLuint *buffer) {
@@ -86,15 +138,15 @@ void select_transform(GLfloat *a) {
matrix_vector(projection, tmp, a);
//matrix_vector(model_proj, a, a);
}
GLboolean select_point_in_viewscreen(const GLfloat *a) {
/*
Return True is point is inside the Viewport
*/
if (a[0]<-1.0f) return false;
if (a[1]<-1.0f) return false;
if (a[0]>+1.0f) return false;
if (a[1]>+1.0f) return false;
if (a[0]>-1.0 && a[0]<1.0 && a[1]>-1.0 && a[1]<1.0) {
return true;
}
return false;
}
@@ -113,26 +165,28 @@ GLboolean select_segment_in_viewscreen(const GLfloat *a, const GLfloat *b) {
vx=b[0]-a[0];
vy=b[1]-a[1];
GLfloat p[4] = {-vx, vx, -vy, vy};
GLfloat q[4] = {a[0] + 1.0f, -1.0f - a[0], a[1] + 1.0f, -1.0f - a[1]};
GLfloat u1 = -1e10;
GLfloat u2 = +1e10;
GLfloat q[4] = {a[0] + 1.0f, +1.0f - a[0], a[1] + 1.0f, +1.0f - a[1]};
GLfloat u1 = 0.0f;
GLfloat u2 = 1.0f;
for (int i=0; i<4; i++) {
if (p[i] == 0.0f) {
if (q[i]<0)
if (q[i]<0.0f)
return false;
} else {
GLfloat t =q[i] / p[i];
if ((p[i]<0.0f) && (u1<t))
u1 = t;
else if ((p[i]>0.0f) && (u2>t))
u2 = t;
if (p[i]<0.0) {
if(t>u2) return false;
else if(u1<t)
u1 = t;
}
else if (p[i]>0.0) {
if(t<u1) return false;
else if (u2>t)
u2 = t;
}
}
}
if ((u1 > u2) || (u1>1) || (u1<0))
return false;
return true;
}
@@ -140,10 +194,10 @@ GLboolean select_triangle_in_viewscreen(const GLfloat *a, const GLfloat *b, cons
/*
Return True is the triangle is in the viewscreen, or completly include, or include the viewscreen
*/
// fast, check either point inside the viewscreen
if (select_point_in_viewscreen(a)) return true;
if (select_point_in_viewscreen(b)) return true;
if (select_point_in_viewscreen(c)) return true;
// Check if any segment intersect the viewscreen (include test if any point is inside the viewscreen)
if (select_segment_in_viewscreen(a, b)) return true;
if (select_segment_in_viewscreen(b, c)) return true;
if (select_segment_in_viewscreen(c, a)) return true;
// Now check if the viewscreen is completly inside the triangle
#define sign(p1, p2, p3) (p1[0]-p3[0])*(p2[1]-p3[1])-(p2[0]-p3[0])*(p1[1]-p3[1])
@@ -161,10 +215,6 @@ GLboolean select_triangle_in_viewscreen(const GLfloat *a, const GLfloat *b, cons
}
#undef sign
// Check if any segment intersect the viewscreen
if (select_segment_in_viewscreen(a, b)) return true;
if (select_segment_in_viewscreen(b, c)) return true;
if (select_segment_in_viewscreen(c, a)) return true;
return false;
}
@@ -174,67 +224,60 @@ void select_glDrawArrays(const pointer_state_t* vtx, GLenum mode, GLuint first,
if (state.selectbuf.buffer == NULL) return;
GLfloat *vert = copy_gl_array(vtx->pointer, vtx->type,
vtx->size, vtx->stride,
GL_FLOAT, 3, 0, count);
GL_FLOAT, 3, 0, count+first);
GLfloat tmp[3];
GLfloat zmin=1.0f, zmax=0.0f;
init_select();
#define FOUND() { \
free(vert); \
for (int j=i+1; j<count; j++) { \
select_transform(vert+j*3); \
if (vert[j*3+2]<zmin) zmin=vert[j*3+2]; \
if (vert[j*3+2]>zmax) zmax=vert[j*3+2]; \
} \
if (zmin<0.0f) zmin = 0.0f; \
if (zmax>1.0f) zmax = 1.0f; \
if (state.selectbuf.count+4<state.selectbuf.size) { \
state.selectbuf.buffer[state.selectbuf.count++] = state.selectbuf.count/4; \
state.selectbuf.buffer[state.selectbuf.count++] = zmin*(1<<31); \
state.selectbuf.buffer[state.selectbuf.count++] = zmax*(1<<31); \
state.selectbuf.buffer[state.selectbuf.count++] = state.namestack.names[state.namestack.top];\
} \
return; }
for (int i=first; i<count; i++) {
if (zmin<state.selectbuf.zmin) state.selectbuf.zmin=zmin; \
if (zmax>state.selectbuf.zmax) state.selectbuf.zmax=zmax; \
state.selectbuf.hit = 1; \
free(vert); \
return; \
}
// transform the points
for (int i=first; i<count+first; i++) {
select_transform(vert+i*3);
if (vert[i*3+2]<zmin) zmin=vert[i*3+2];
if (vert[i*3+2]>zmax) zmax=vert[i*3+2];
//matrix_vector(projection, vert+i*3, tmp);
//matrix_vector(modelview, tmp, vert+i*3);
}
// intersect with screen now
GLfloat *vert2 = vert + first*3;
for (int i=0; i<count; i++) {
switch (mode) {
case GL_POINTS:
if (select_point_in_viewscreen(vert+i*3))
if (select_point_in_viewscreen(vert2+i*3))
FOUND();
break;
case GL_LINES:
if (i%2==1) {
if (select_segment_in_viewscreen(vert+(i-1)*3, vert+i*3))
if (select_segment_in_viewscreen(vert2+(i-1)*3, vert2+i*3))
FOUND();
}
break;
case GL_LINE_STRIP:
case GL_LINE_LOOP: //FIXME: the last "loop" segment is missing here
if (i>0) {
if (select_segment_in_viewscreen(vert+(i-1)*3, vert+i*3))
if (select_segment_in_viewscreen(vert2+(i-1)*3, vert2+i*3))
FOUND();
}
break;
case GL_TRIANGLES:
if (i%3==2) {
if (select_triangle_in_viewscreen(vert+(i-2)*3, vert+(i-1)*3, vert+i*3))
if (select_triangle_in_viewscreen(vert2+(i-2)*3, vert2+(i-1)*3, vert2+i*3))
FOUND();
}
break;
case GL_TRIANGLE_STRIP:
if (i>1) {
if (select_triangle_in_viewscreen(vert+(i-2)*3, vert+(i-1)*3, vert+i*3))
if (select_triangle_in_viewscreen(vert2+(i-2)*3, vert2+(i-1)*3, vert2+i*3))
FOUND();
}
break;
case GL_TRIANGLE_FAN:
if (i>1) {
if (select_triangle_in_viewscreen(vert, vert+(i-1)*3, vert+i*3))
if (select_triangle_in_viewscreen(vert2, vert2+(i-1)*3, vert2+i*3))
FOUND();
}
break;
@@ -253,8 +296,8 @@ void select_glDrawElements(const pointer_state_t* vtx, GLenum mode, GLuint count
GLushort *ind = (GLushort*)indices;
GLsizei min, max;
normalize_indices(indices, &max, &min, count);
getminmax_indices(indices, &max, &min, count);
max++;
GLfloat *vert = copy_gl_array(vtx->pointer, vtx->type,
vtx->size, vtx->stride,
GL_FLOAT, 3, 0, max);
@@ -266,18 +309,16 @@ void select_glDrawElements(const pointer_state_t* vtx, GLenum mode, GLuint count
if (vert[i*3+2]<zmin) zmin=vert[i*3+2];
if (vert[i*3+2]>zmax) zmax=vert[i*3+2];
}
if (zmin<0.0f) zmin = 0.0f;
if (zmax>1.0f) zmax = 1.0f;
#define FOUND() { \
free(vert); \
if (zmin<0.0f) zmin = 0.0f; \
if (zmax>1.0f) zmax = 1.0f; \
if (state.selectbuf.count+4<state.selectbuf.size) { \
state.selectbuf.buffer[state.selectbuf.count++] = state.selectbuf.count/4; \
state.selectbuf.buffer[state.selectbuf.count++] = zmin*(1<<31); \
state.selectbuf.buffer[state.selectbuf.count++] = zmax*(1<<31); \
state.selectbuf.buffer[state.selectbuf.count++] = state.namestack.names[state.namestack.top];\
} \
return; }
if (zmin<state.selectbuf.zmin) state.selectbuf.zmin=zmin; \
if (zmax>state.selectbuf.zmax) state.selectbuf.zmax=zmax; \
state.selectbuf.hit = 1; \
free(vert); \
return; \
}
for (int i=0; i<count; i++) {
switch (mode) {
+7 -2
View File
@@ -97,9 +97,14 @@ typedef struct {
} namestack_t;
typedef struct {
int count;
GLuint count;
GLuint *buffer;
GLuint size;
GLuint size;
GLfloat zmin;
GLfloat zmax;
GLuint overflow;
GLuint pos;
GLboolean hit;
} selectbuf_t;
typedef struct {
View File
View File
View File
-1
View File
@@ -245,7 +245,6 @@ Display *glXGetCurrentDisplay();
// GLX 1.3
GLXContext glXGetCurrentContext();
XVisualInfo *glXGetVisualFromFBConfig(Display *display, GLXFBConfig config);
GLXFBConfig *glXChooseFBConfig(Display *display, int screen, const int *attrib_list, int *count);
GLXFBConfig *glXGetFBConfigs(Display *display, int screen, int *count);
+1 -2
View File
@@ -310,7 +310,7 @@ void *glXGetProcAddressARB(const char *name) {
EX(glDrawBuffer);
EX(glDrawPixels);
EX(glDrawRangeElements);
EXT(glDrawRangeElements);
EX(glDrawRangeElementsEXT);
EX(glEdgeFlag);
EX(glEnd);
EX(glEndList);
@@ -465,7 +465,6 @@ void *glXGetProcAddressARB(const char *name) {
STUB(glIndexPointer);
printf("glXGetProcAddress: %s not found.\n", name);
return NULL;
}
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
-2
View File
@@ -1,2 +0,0 @@
Jinja2
blessings
-4
View File
@@ -1,4 +0,0 @@
#!/bin/bash -u
cd $(dirname "$0")
python util/run.py --project="$(pwd)/.." --base "$(pwd)/tests" "$@"
@@ -1,27 +0,0 @@
int main() {
#define STRIDE 0, 0, 0, 0, 0, 0, 0, 0, 0
GLfloat vert[] = {
0, 0, 0, STRIDE,
1, 1, 1, STRIDE,
2, 2, 2, STRIDE,
3, 3, 3, STRIDE,
4, 4, 4, STRIDE,
5, 5, 5, STRIDE,
};
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_FLOAT, 12 * sizeof(GLfloat), vert);
glDrawArrays(GL_QUADS, 2, 4);
GLfloat vert_out[] = {
2, 2, 2,
3, 3, 3,
4, 4, 4,
5, 5, 5,
};
GLushort indices[] = {0, 1, 3, 1, 2, 3};
test_glEnableClientState(GL_VERTEX_ARRAY);
test_glVertexPointer(3, GL_FLOAT, 12 * 4, vert);
test_glVertexPointer(3, GL_FLOAT, 0, vert_out);
test_glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices);
mock_return;
}
@@ -1,52 +0,0 @@
int main() {
glBegin(GL_QUADS);
glColor4f(0, 0.1, 0.2, 0.3);
glTexCoord2f(0.4, 0.5);
glVertex3f(0, 1, 2);
glVertex3f(3, 4, 5);
glVertex3f(6, 7, 8);
glVertex3f(9, 10, 11);
glEnd();
GLfloat verts[] = {
0, 1, 2,
3, 4, 5,
6, 7, 8,
9, 10, 11,
};
GLfloat color[] = {
0, 0.1, 0.2, 0.3,
0, 0.1, 0.2, 0.3,
0, 0.1, 0.2, 0.3,
0, 0.1, 0.2, 0.3,
};
GLfloat tex[] = {
0.4, 0.5,
0.4, 0.5,
0.4, 0.5,
0.4, 0.5,
};
GLushort indices[] = {
0, 1, 3,
1, 2, 3,
};
// TODO: out of order glEnableClientState?
test_glColor4f(0.0, 0.1, 0.2, 0.3);
test_glEnableClientState(GL_VERTEX_ARRAY);
test_glVertexPointer(3, GL_FLOAT, 0, verts);
test_glEnableClientState(GL_COLOR_ARRAY);
test_glColorPointer(4, GL_FLOAT, 0, color);
test_glEnableClientState(GL_TEXTURE_COORD_ARRAY);
test_glTexCoordPointer(2, GL_FLOAT, 0, tex);
test_glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices);
test_glDisableClientState(GL_VERTEX_ARRAY);
test_glDisableClientState(GL_COLOR_ARRAY);
test_glDisableClientState(GL_TEXTURE_COORD_ARRAY);
mock_return;
}
@@ -1,18 +0,0 @@
int main() {
for (int i = 0; i < 3; i++) {
glRectf(0, 0, 1, 1);
test_glEnableClientState(GL_VERTEX_ARRAY);
// TODO: pointers are skipped in verification
GLfloat verts[] = {
0, 0, 0,
1, 0, 0,
1, 1, 0,
0, 1, 0,
};
test_glVertexPointer(3, GL_FLOAT, 0, verts);
test_glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
test_glDisableClientState(GL_VERTEX_ARRAY);
}
mock_return;
}

Some files were not shown because too many files have changed in this diff Show More