jkxr/Projects/Android/jni/SupportLibs/gl4es/spec/template/glwrap.h.j2
Simon 4597b03873 Initial Commit
Opens in Android Studio but haven't even tried to build it yet (it won't.. I know that much!)
2022-09-18 16:37:21 +01:00

20 lines
No EOL
614 B
Django/Jinja

{% extends "base/wrap.h.j2" %}
{% block content %}
{{ super() }}
{% for func in functions %}
#ifndef direct_{{ func.name }}
#define push_{{ func.name }}({{ func.args|args(0) }}) { \
{{ func.name }}_PACKED *packed_data = malloc(sizeof({{ func.name }}_PACKED)); \
packed_data->format = {{ func.name }}_FORMAT; \
packed_data->func = gl4es_{{ func.name }}; \
{% if func.args %}
{% for arg in func.args %}
packed_data->args.a{{ loop.index }} = ({{ arg.type|unconst }}){{ arg.name }}; \
{% endfor %}
{% endif %}
glPushCall((void *)packed_data); \
}
#endif
{% endfor %}
{% endblock %}