diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/glfw/CMakeLists.txt | 11 | ||||
-rw-r--r-- | src/glfw/bind | 47 | ||||
-rw-r--r-- | src/glfw/bind.bind | 439 | ||||
-rw-r--r-- | src/glfw/context.c | 49 | ||||
-rw-r--r-- | src/glfw/init.c | 58 | ||||
-rw-r--r-- | src/glfw/input.c | 586 | ||||
-rw-r--r-- | src/glfw/monitor.c | 250 | ||||
-rw-r--r-- | src/glfw/setup.c | 33 | ||||
-rw-r--r-- | src/glfw/setup.h | 419 | ||||
-rw-r--r-- | src/glfw/window.c | 588 | ||||
-rw-r--r-- | src/miniaudio/CMakeLists.txt (renamed from src/audio/CMakeLists.txt) | 0 | ||||
-rw-r--r-- | src/miniaudio/audio.h (renamed from src/audio/audio.h) | 0 | ||||
-rw-r--r-- | src/miniaudio/bind (renamed from src/audio/bind) | 0 | ||||
-rw-r--r-- | src/miniaudio/bind.bind (renamed from src/audio/bind.bind) | 0 | ||||
-rw-r--r-- | src/miniaudio/engine.c (renamed from src/audio/engine.c) | 0 | ||||
-rw-r--r-- | src/miniaudio/impl.c (renamed from src/audio/impl.c) | 0 | ||||
-rw-r--r-- | src/miniaudio/setup.c (renamed from src/audio/setup.c) | 0 | ||||
-rw-r--r-- | src/miniaudio/sound.c (renamed from src/audio/sound.c) | 0 | ||||
-rw-r--r-- | src/miniaudio/sound_group.c (renamed from src/audio/sound_group.c) | 0 | ||||
-rw-r--r-- | src/modules.h | 1 | ||||
-rw-r--r-- | src/opengl/CMakeLists.txt (renamed from src/gl/CMakeLists.txt) | 0 | ||||
-rw-r--r-- | src/opengl/bind.h | 1818 | ||||
-rw-r--r-- | src/opengl/bind/a | 3 | ||||
-rw-r--r-- | src/opengl/bind/a.bind | 26 | ||||
-rw-r--r-- | src/opengl/bind/b | 35 | ||||
-rw-r--r-- | src/opengl/bind/b.bind | 350 | ||||
-rw-r--r-- | src/opengl/bind/c | 31 | ||||
-rw-r--r-- | src/opengl/bind/c.bind | 354 | ||||
-rw-r--r-- | src/opengl/bind/d | 36 | ||||
-rw-r--r-- | src/opengl/bind/d.bind | 331 | ||||
-rw-r--r-- | src/opengl/bind/e | 7 | ||||
-rw-r--r-- | src/opengl/bind/e.bind | 57 | ||||
-rw-r--r-- | src/opengl/bind/f | 11 | ||||
-rw-r--r-- | src/opengl/bind/f.bind | 115 | ||||
-rw-r--r-- | src/opengl/bind/g | 88 | ||||
-rw-r--r-- | src/opengl/bind/g.bind | 910 | ||||
-rw-r--r-- | src/opengl/bind/h | 1 | ||||
-rw-r--r-- | src/opengl/bind/h.bind | 9 | ||||
-rw-r--r-- | src/opengl/bind/i | 14 | ||||
-rw-r--r-- | src/opengl/bind/i.bind | 127 | ||||
-rw-r--r-- | src/opengl/bind/l | 4 | ||||
-rw-r--r-- | src/opengl/bind/l.bind | 24 | ||||
-rw-r--r-- | src/opengl/bind/m | 7 | ||||
-rw-r--r-- | src/opengl/bind/m.bind | 66 | ||||
-rw-r--r-- | src/opengl/bind/p | 50 | ||||
-rw-r--r-- | src/opengl/bind/p.bind | 521 | ||||
-rw-r--r-- | src/opengl/bind/q | 1 | ||||
-rw-r--r-- | src/opengl/bind/q.bind | 9 | ||||
-rw-r--r-- | src/opengl/bind/r | 6 | ||||
-rw-r--r-- | src/opengl/bind/r.bind | 61 | ||||
-rw-r--r-- | src/opengl/bind/s | 21 | ||||
-rw-r--r-- | src/opengl/bind/s.bind | 202 | ||||
-rw-r--r-- | src/opengl/bind/sigs | 445 | ||||
-rw-r--r-- | src/opengl/bind/t | 16 | ||||
-rw-r--r-- | src/opengl/bind/t.bind | 204 | ||||
-rw-r--r-- | src/opengl/bind/u | 37 | ||||
-rw-r--r-- | src/opengl/bind/u.bind | 382 | ||||
-rw-r--r-- | src/opengl/bind/v | 76 | ||||
-rw-r--r-- | src/opengl/bind/v.bind | 742 | ||||
-rw-r--r-- | src/opengl/bind/w | 1 | ||||
-rw-r--r-- | src/opengl/bind/w.bind | 10 | ||||
-rw-r--r-- | src/opengl/data.c (renamed from src/gl/data.c) | 0 | ||||
-rw-r--r-- | src/opengl/data.test.c (renamed from src/gl/data.test.c) | 0 | ||||
-rw-r--r-- | src/opengl/drawing.c (renamed from src/gl/drawing.c) | 0 | ||||
-rw-r--r-- | src/opengl/gl.c (renamed from src/gl/gl.c) | 0 | ||||
-rw-r--r-- | src/opengl/gl.h (renamed from src/gl/gl.h) | 0 | ||||
-rw-r--r-- | src/opengl/gl.test.c (renamed from src/gl/gl.test.c) | 0 | ||||
-rw-r--r-- | src/opengl/glad/CMakeLists.txt (renamed from src/gl/glad/CMakeLists.txt) | 0 | ||||
-rw-r--r-- | src/opengl/glad/include/KHR/khrplatform.h (renamed from src/gl/glad/include/KHR/khrplatform.h) | 0 | ||||
-rw-r--r-- | src/opengl/glad/include/glad/glad.h (renamed from src/gl/glad/include/glad/glad.h) | 0 | ||||
-rw-r--r-- | src/opengl/glad/src/glad.c (renamed from src/gl/glad/src/glad.c) | 0 | ||||
-rw-r--r-- | src/opengl/notes.md (renamed from src/gl/notes.md) | 0 | ||||
-rw-r--r-- | src/opengl/setup.c | 23 | ||||
-rw-r--r-- | src/opengl/shader.c (renamed from src/gl/shader.c) | 0 | ||||
-rw-r--r-- | src/opengl/texture.c (renamed from src/gl/texture.c) | 0 | ||||
-rw-r--r-- | src/opengl/window.c (renamed from src/gl/window.c) | 0 | ||||
-rw-r--r-- | src/opengl/window.test.c (renamed from src/gl/window.test.c) | 0 |
77 files changed, 9712 insertions, 0 deletions
diff --git a/src/glfw/CMakeLists.txt b/src/glfw/CMakeLists.txt new file mode 100644 index 0000000..6637d2b --- /dev/null +++ b/src/glfw/CMakeLists.txt @@ -0,0 +1,11 @@ +project(honey-engine) + + +target_sources(honey PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/setup.c + ${CMAKE_CURRENT_LIST_DIR}/context.c + ${CMAKE_CURRENT_LIST_DIR}/init.c + ${CMAKE_CURRENT_LIST_DIR}/input.c + ${CMAKE_CURRENT_LIST_DIR}/monitor.c + ${CMAKE_CURRENT_LIST_DIR}/window.c +) diff --git a/src/glfw/bind b/src/glfw/bind new file mode 100644 index 0000000..ce1aace --- /dev/null +++ b/src/glfw/bind @@ -0,0 +1,47 @@ +void glfwDefaultWindowHints () +void glfwWindowHint (int hint, int value) +void glfwWindowHintString (int hint, const char *value) +GLFWwindow * glfwCreateWindow (int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share) +void glfwDestroyWindow (GLFWwindow *window) +int glfwWindowShouldClose (GLFWwindow *window) +void glfwSetWindowShouldClose (GLFWwindow *window, int value) +void glfwSetWindowTitle (GLFWwindow *window, const char *title) +void glfwSetWindowIcon (GLFWwindow *window, int count, const GLFWimage *images) +void glfwGetWindowPos (GLFWwindow *window, int *xpos, int *ypos) +void glfwSetWindowPos (GLFWwindow *window, int xpos, int ypos) +void glfwGetWindowSize (GLFWwindow *window, int *width, int *height) +void glfwSetWindowSizeLimits (GLFWwindow *window, int minwidth, int minheight, int maxwidth, int maxheight) +void glfwSetWindowAspectRatio (GLFWwindow *window, int numer, int denom) +void glfwSetWindowSize (GLFWwindow *window, int width, int height) +void glfwGetFramebufferSize (GLFWwindow *window, int *width, int *height) +void glfwGetWindowFrameSize (GLFWwindow *window, int *left, int *top, int *right, int *bottom) +void glfwGetWindowContentScale (GLFWwindow *window, float *xscale, float *yscale) +float glfwGetWindowOpacity (GLFWwindow *window) +void glfwSetWindowOpacity (GLFWwindow *window, float opacity) +void glfwIconifyWindow (GLFWwindow *window) +void glfwRestoreWindow (GLFWwindow *window) +void glfwMaximizeWindow (GLFWwindow *window) +void glfwShowWindow (GLFWwindow *window) +void glfwHideWindow (GLFWwindow *window) +void glfwFocusWindow (GLFWwindow *window) +void glfwRequestWindowAttention (GLFWwindow *window) +GLFWmonitor * glfwGetWindowMonitor (GLFWwindow *window) +void glfwSetWindowMonitor (GLFWwindow *window, GLFWmonitor *monitor, int xpos, int ypos, int width, int height, int refreshRate) +int glfwGetWindowAttrib (GLFWwindow *window, int attrib) +void glfwSetWindowAttrib (GLFWwindow *window, int attrib, int value) +void glfwSetWindowUserPointer (GLFWwindow *window, void *pointer) +void * glfwGetWindowUserPointer (GLFWwindow *window) +GLFWwindowposfun glfwSetWindowPosCallback (GLFWwindow *window, GLFWwindowposfun callback) +GLFWwindowsizefun glfwSetWindowSizeCallback (GLFWwindow *window, GLFWwindowsizefun callback) +GLFWwindowclosefun glfwSetWindowCloseCallback (GLFWwindow *window, GLFWwindowclosefun callback) +GLFWwindowrefreshfun glfwSetWindowRefreshCallback (GLFWwindow *window, GLFWwindowrefreshfun callback) +GLFWwindowfocusfun glfwSetWindowFocusCallback (GLFWwindow *window, GLFWwindowfocusfun callback) +GLFWwindowiconifyfun glfwSetWindowIconifyCallback (GLFWwindow *window, GLFWwindowiconifyfun callback) +GLFWwindowmaximizefun glfwSetWindowMaximizeCallback (GLFWwindow *window, GLFWwindowmaximizefun callback) +GLFWframebuffersizefun glfwSetFramebufferSizeCallback (GLFWwindow *window, GLFWframebuffersizefun callback) +GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback (GLFWwindow *window, GLFWwindowcontentscalefun callback) +void glfwPollEvents () +void glfwWaitEvents () +void glfwWaitEventsTimeout (double timeout) +void glfwPostEmptyEvent () +void glfwSwapBuffers (GLFWwindow *window) diff --git a/src/glfw/bind.bind b/src/glfw/bind.bind new file mode 100644 index 0000000..b75587a --- /dev/null +++ b/src/glfw/bind.bind @@ -0,0 +1,439 @@ +int glfwDefaultWindowHints_bind(lua_State *L) +{ + glfwDefaultWindowHints(); + return 0; +} + + +int glfwWindowHint_bind(lua_State *L) +{ + int hint = luaL_checkinteger(L, 1); + int value = luaL_checkinteger(L, 2); + glfwWindowHint(hint, value); + return 0; +} + + +int glfwWindowHintString_bind(lua_State *L) +{ + int hint = luaL_checkinteger(L, 1); + const char * value = luaL_checkstring(L, 2); + glfwWindowHintString(hint, value); + return 0; +} + + +int glfwCreateWindow_bind(lua_State *L) +{ + int width = luaL_checkinteger(L, 1); + int height = luaL_checkinteger(L, 2); + const char * title = luaL_checkstring(L, 3); + GLFWmonitor * monitor = get: GLFWmonitor * + GLFWwindow * share = get: GLFWwindow * + GLFWwindow * bind_result = glfwCreateWindow(width, height, title, monitor, share); + /* push result */ + return /* count */; +} + + +int glfwDestroyWindow_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + glfwDestroyWindow(window); + return 0; +} + + +int glfwWindowShouldClose_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + int bind_result = glfwWindowShouldClose(window); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwSetWindowShouldClose_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + int value = luaL_checkinteger(L, 2); + glfwSetWindowShouldClose(window, value); + return 0; +} + + +int glfwSetWindowTitle_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + const char * title = luaL_checkstring(L, 2); + glfwSetWindowTitle(window, title); + return 0; +} + + +int glfwSetWindowIcon_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + int count = luaL_checkinteger(L, 2); + const GLFWimage * images = get: const GLFWimage * + glfwSetWindowIcon(window, count, images); + return 0; +} + + +int glfwGetWindowPos_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + int * xpos = get: int * + int * ypos = get: int * + glfwGetWindowPos(window, xpos, ypos); + return 0; +} + + +int glfwSetWindowPos_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + int xpos = luaL_checkinteger(L, 2); + int ypos = luaL_checkinteger(L, 3); + glfwSetWindowPos(window, xpos, ypos); + return 0; +} + + +int glfwGetWindowSize_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + int * width = get: int * + int * height = get: int * + glfwGetWindowSize(window, width, height); + return 0; +} + + +int glfwSetWindowSizeLimits_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + int minwidth = luaL_checkinteger(L, 2); + int minheight = luaL_checkinteger(L, 3); + int maxwidth = luaL_checkinteger(L, 4); + int maxheight = luaL_checkinteger(L, 5); + glfwSetWindowSizeLimits(window, minwidth, minheight, maxwidth, maxheight); + return 0; +} + + +int glfwSetWindowAspectRatio_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + int numer = luaL_checkinteger(L, 2); + int denom = luaL_checkinteger(L, 3); + glfwSetWindowAspectRatio(window, numer, denom); + return 0; +} + + +int glfwSetWindowSize_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + int width = luaL_checkinteger(L, 2); + int height = luaL_checkinteger(L, 3); + glfwSetWindowSize(window, width, height); + return 0; +} + + +int glfwGetFramebufferSize_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + int * width = get: int * + int * height = get: int * + glfwGetFramebufferSize(window, width, height); + return 0; +} + + +int glfwGetWindowFrameSize_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + int * left = get: int * + int * top = get: int * + int * right = get: int * + int * bottom = get: int * + glfwGetWindowFrameSize(window, left, top, right, bottom); + return 0; +} + + +int glfwGetWindowContentScale_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + float * xscale = get: float * + float * yscale = get: float * + glfwGetWindowContentScale(window, xscale, yscale); + return 0; +} + + +int glfwGetWindowOpacity_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + float bind_result = glfwGetWindowOpacity(window); + lua_pushnumber(L, bind_result); + return 1; +} + + +int glfwSetWindowOpacity_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + float opacity = luaL_checknumber(L, 2); + glfwSetWindowOpacity(window, opacity); + return 0; +} + + +int glfwIconifyWindow_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + glfwIconifyWindow(window); + return 0; +} + + +int glfwRestoreWindow_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + glfwRestoreWindow(window); + return 0; +} + + +int glfwMaximizeWindow_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + glfwMaximizeWindow(window); + return 0; +} + + +int glfwShowWindow_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + glfwShowWindow(window); + return 0; +} + + +int glfwHideWindow_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + glfwHideWindow(window); + return 0; +} + + +int glfwFocusWindow_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + glfwFocusWindow(window); + return 0; +} + + +int glfwRequestWindowAttention_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + glfwRequestWindowAttention(window); + return 0; +} + + +int glfwGetWindowMonitor_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + GLFWmonitor * bind_result = glfwGetWindowMonitor(window); + /* push result */ + return /* count */; +} + + +int glfwSetWindowMonitor_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + GLFWmonitor * monitor = get: GLFWmonitor * + int xpos = luaL_checkinteger(L, 3); + int ypos = luaL_checkinteger(L, 4); + int width = luaL_checkinteger(L, 5); + int height = luaL_checkinteger(L, 6); + int refreshRate = luaL_checkinteger(L, 7); + glfwSetWindowMonitor(window, monitor, xpos, ypos, width, height, refreshRate); + return 0; +} + + +int glfwGetWindowAttrib_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + int attrib = luaL_checkinteger(L, 2); + int bind_result = glfwGetWindowAttrib(window, attrib); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwSetWindowAttrib_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + int attrib = luaL_checkinteger(L, 2); + int value = luaL_checkinteger(L, 3); + glfwSetWindowAttrib(window, attrib, value); + return 0; +} + + +int glfwSetWindowUserPointer_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + void * pointer = get: void * + glfwSetWindowUserPointer(window, pointer); + return 0; +} + + +int glfwGetWindowUserPointer_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + void * bind_result = glfwGetWindowUserPointer(window); + /* push result */ + return /* count */; +} + + +int glfwSetWindowPosCallback_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + GLFWwindowposfun callback = get: GLFWwindowposfun + GLFWwindowposfun bind_result = glfwSetWindowPosCallback(window, callback); + /* push result */ + return /* count */; +} + + +int glfwSetWindowSizeCallback_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + GLFWwindowsizefun callback = get: GLFWwindowsizefun + GLFWwindowsizefun bind_result = glfwSetWindowSizeCallback(window, callback); + /* push result */ + return /* count */; +} + + +int glfwSetWindowCloseCallback_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + GLFWwindowclosefun callback = get: GLFWwindowclosefun + GLFWwindowclosefun bind_result = glfwSetWindowCloseCallback(window, callback); + /* push result */ + return /* count */; +} + + +int glfwSetWindowRefreshCallback_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + GLFWwindowrefreshfun callback = get: GLFWwindowrefreshfun + GLFWwindowrefreshfun bind_result = glfwSetWindowRefreshCallback(window, callback); + /* push result */ + return /* count */; +} + + +int glfwSetWindowFocusCallback_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + GLFWwindowfocusfun callback = get: GLFWwindowfocusfun + GLFWwindowfocusfun bind_result = glfwSetWindowFocusCallback(window, callback); + /* push result */ + return /* count */; +} + + +int glfwSetWindowIconifyCallback_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + GLFWwindowiconifyfun callback = get: GLFWwindowiconifyfun + GLFWwindowiconifyfun bind_result = glfwSetWindowIconifyCallback(window, callback); + /* push result */ + return /* count */; +} + + +int glfwSetWindowMaximizeCallback_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + GLFWwindowmaximizefun callback = get: GLFWwindowmaximizefun + GLFWwindowmaximizefun bind_result = glfwSetWindowMaximizeCallback(window, callback); + /* push result */ + return /* count */; +} + + +int glfwSetFramebufferSizeCallback_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + GLFWframebuffersizefun callback = get: GLFWframebuffersizefun + GLFWframebuffersizefun bind_result = glfwSetFramebufferSizeCallback(window, callback); + /* push result */ + return /* count */; +} + + +int glfwSetWindowContentScaleCallback_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + GLFWwindowcontentscalefun callback = get: GLFWwindowcontentscalefun + GLFWwindowcontentscalefun bind_result = glfwSetWindowContentScaleCallback(window, callback); + /* push result */ + return /* count */; +} + + +int glfwPollEvents_bind(lua_State *L) +{ + glfwPollEvents(); + return 0; +} + + +int glfwWaitEvents_bind(lua_State *L) +{ + glfwWaitEvents(); + return 0; +} + + +int glfwWaitEventsTimeout_bind(lua_State *L) +{ + double timeout = luaL_checknumber(L, 1); + glfwWaitEventsTimeout(timeout); + return 0; +} + + +int glfwPostEmptyEvent_bind(lua_State *L) +{ + glfwPostEmptyEvent(); + return 0; +} + + +int glfwSwapBuffers_bind(lua_State *L) +{ + GLFWwindow * window = get: GLFWwindow * + glfwSwapBuffers(window); + return 0; +} + + diff --git a/src/glfw/context.c b/src/glfw/context.c new file mode 100644 index 0000000..e22533e --- /dev/null +++ b/src/glfw/context.c @@ -0,0 +1,49 @@ +#include <lua.h> +#include <lauxlib.h> +#include <GLFW/glfw3.h> +#include "setup.h" + + +int glfwMakeContextCurrent_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + glfwMakeContextCurrent(*window); + return 0; +} + + +int glfwGetCurrentContext_bind(lua_State *L) +{ + GLFWwindow * bind_result = glfwGetCurrentContext(); + struct h_glfw_window_data_t *data = glfwGetWindowUserPointer(bind_result); + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + return 1; +} + + +int glfwSwapInterval_bind(lua_State *L) +{ + int interval = luaL_checkinteger(L, 1); + glfwSwapInterval(interval); + return 0; +} + + +int glfwExtensionSupported_bind(lua_State *L) +{ + const char * extension = luaL_checkstring(L, 1); + int bind_result = glfwExtensionSupported(extension); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwGetProcAddress_bind(lua_State *L) +{ + const char * procname = luaL_checkstring(L, 1); + GLFWglproc bind_result = glfwGetProcAddress(procname); + lua_pushlightuserdata(L, bind_result); + return 1; +} + + diff --git a/src/glfw/init.c b/src/glfw/init.c new file mode 100644 index 0000000..6d91d28 --- /dev/null +++ b/src/glfw/init.c @@ -0,0 +1,58 @@ +#include <lua.h> +#include <lauxlib.h> +#include <glad/glad.h> +#include <GLFW/glfw3.h> +#include "setup.h" + + +int glfwInit_bind(lua_State *L) +{ + int bind_result = glfwInit(); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwTerminate_bind(lua_State *L) +{ + glfwTerminate(); + return 0; +} + + +int glfwInitHint_bind(lua_State *L) +{ + int hint = luaL_checkinteger(L, 1); + int value = luaL_checkinteger(L, 2); + glfwInitHint(hint, value); + return 0; +} + + +int glfwGetVersion_bind(lua_State *L) +{ + int major, minor, rev; + glfwGetVersion(&major, &minor, &rev); + lua_pushinteger(L, major); + lua_pushinteger(L, minor); + lua_pushinteger(L, rev); + return 3; +} + + +int glfwGetVersionString_bind(lua_State *L) +{ + const char * bind_result = glfwGetVersionString(); + lua_pushstring(L, bind_result); + return 1; +} + + +int glfwGetError_bind(lua_State *L) +{ + const char * description; + int bind_result = glfwGetError(&description); + lua_pushinteger(L, bind_result); + lua_pushstring(L, description); + return 2; +} diff --git a/src/glfw/input.c b/src/glfw/input.c new file mode 100644 index 0000000..4233d56 --- /dev/null +++ b/src/glfw/input.c @@ -0,0 +1,586 @@ +#include <lua.h> +#include <lauxlib.h> +#include <GLFW/glfw3.h> +#include "setup.h" + + +int glfwGetInputMode_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int mode = luaL_checkinteger(L, 2); + int bind_result = glfwGetInputMode(*window, mode); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwSetInputMode_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int mode = luaL_checkinteger(L, 2); + int value = luaL_checkinteger(L, 3); + glfwSetInputMode(*window, mode, value); + return 0; +} + + +int glfwRawMouseMotionSupported_bind(lua_State *L) +{ + int bind_result = glfwRawMouseMotionSupported(); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwGetKeyName_bind(lua_State *L) +{ + int key = luaL_checkinteger(L, 1); + int scancode = luaL_checkinteger(L, 2); + const char * bind_result = glfwGetKeyName(key, scancode); + lua_pushstring(L, bind_result); + return 1; +} + + +int glfwGetKeyScancode_bind(lua_State *L) +{ + int key = luaL_checkinteger(L, 1); + int bind_result = glfwGetKeyScancode(key); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwGetKey_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int key = luaL_checkinteger(L, 2); + int bind_result = glfwGetKey(*window, key); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwGetMouseButton_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int button = luaL_checkinteger(L, 2); + int bind_result = glfwGetMouseButton(*window, button); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwGetCursorPos_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + double xpos, ypos; + glfwGetCursorPos(*window, &xpos, &ypos); + lua_pushnumber(L, xpos); + lua_pushnumber(L, ypos); + return 2; +} + + +int glfwSetCursorPos_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + double xpos = luaL_checknumber(L, 2); + double ypos = luaL_checknumber(L, 3); + glfwSetCursorPos(*window, xpos, ypos); + return 0; +} + + +static GLFWcursor ** create_cursor(lua_State *L) +{ + GLFWcursor **cursor = lua_newuserdata(L, sizeof(GLFWcursor *)); + luaL_getmetatable(L, glfw_cursor_tname); + lua_setmetatable(L, -2); +} + +int glfwCreateCursor_bind(lua_State *L) +{ + const GLFWimage * image = lua_touserdata(L, 1); + int xhot = luaL_checkinteger(L, 2); + int yhot = luaL_checkinteger(L, 3); + + GLFWcursor **cursor = create_cursor(L); + *cursor = glfwCreateCursor(image, xhot, yhot); + return 1; +} + + +int glfwCreateStandardCursor_bind(lua_State *L) +{ + int shape = luaL_checkinteger(L, 1); + GLFWcursor **cursor = create_cursor(L); + *cursor = glfwCreateStandardCursor(shape); + return 1; +} + + +int glfwDestroyCursor_bind(lua_State *L) +{ + GLFWcursor ** cursor = luaL_checkudata(L, 1, glfw_cursor_tname); + glfwDestroyCursor(*cursor); + return 0; +} + + +int glfwSetCursor_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + GLFWcursor ** cursor = luaL_checkudata(L, 2, glfw_cursor_tname); + glfwSetCursor(*window, *cursor); + return 0; +} + + +/* helpers for creating callback setter binds */ +static GLFWwindow ** check_callback_args(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int type = lua_type(L, 2); + if (type == LUA_TNIL || type == LUA_TFUNCTION) { + return window; + } + else { + luaL_typerror(L, 2, "nil or function"); + } +} + +#define SET_CALLBACK(L, win, setter, cb, key) \ +do { \ + /* get window data */ \ + struct h_glfw_window_data_t *data = glfwGetWindowUserPointer(win); \ + \ + /* push old callback */ \ + lua_rawgeti(L, LUA_REGISTRYINDEX, data->key); \ + \ + /* set new callback */ \ + if (lua_isnil(L, 2)) { \ + /* new "callback" is nil, unset */ \ + setter(win, NULL); \ + data->key = LUA_NOREF; \ + } \ + else { \ + /* new callback is function */ \ + setter(win, cb); \ + lua_pushvalue(L, 2); \ + data->key = luaL_ref(L, LUA_REGISTRYINDEX); \ + } \ +} while(0) + +#define RETRIEVE_CALLBACK(win, key) \ +struct h_glfw_window_data_t *data = glfwGetWindowUserPointer(win); \ +if (data->key == LUA_NOREF) { return; } \ +lua_State *L = data->L; \ +lua_rawgeti(L, LUA_REGISTRYINDEX, data->key); + + +static void h_key_cb( + GLFWwindow *window, + int key, int scancode, + int action, int mods) +{ + RETRIEVE_CALLBACK(window, key_cb_ref); + /* push arguments */ + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushinteger(L, key); + lua_pushinteger(L, scancode); + lua_pushinteger(L, action); + lua_pushinteger(L, mods); + /* call */ + lua_call(L, 5, 0); +} +int glfwSetKeyCallback_bind(lua_State *L) +{ + GLFWwindow **window = check_callback_args(L); + SET_CALLBACK( + L, *window, + glfwSetKeyCallback, + h_key_cb, key_cb_ref + ); + return 1; +} + + +static void h_char_cb(GLFWwindow *window, unsigned int codepoint) +{ + RETRIEVE_CALLBACK(window, char_cb_ref); + /* push arguments */ + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushinteger(L, codepoint); + /* call */ + lua_call(L, 2, 0); +} +int glfwSetCharCallback_bind(lua_State *L) +{ + GLFWwindow **window = check_callback_args(L); + SET_CALLBACK( + L, *window, + glfwSetCharCallback, + h_char_cb, char_cb_ref + ); + return 1; +} + + +static void h_char_mods_cb(GLFWwindow *window, unsigned int codepoint, int mods) +{ + RETRIEVE_CALLBACK(window, char_mods_cb_ref); + /* push arguments */ + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushinteger(L, codepoint); + lua_pushinteger(L, mods); + /* call */ + lua_call(L, 3, 0); +} +int glfwSetCharModsCallback_bind(lua_State *L) +{ + GLFWwindow **window = check_callback_args(L); + SET_CALLBACK( + L, *window, + glfwSetCharModsCallback, + h_char_mods_cb, char_mods_cb_ref + ); + return 1; +} + + +static void h_mouse_button_cb(GLFWwindow *window, int button, int action, int mods) +{ + RETRIEVE_CALLBACK(window, char_mods_cb_ref); + /* push arguments */ + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushinteger(L, button); + lua_pushinteger(L, action); + lua_pushinteger(L, mods); + /* call */ + lua_call(L, 4, 0); +} +int glfwSetMouseButtonCallback_bind(lua_State *L) +{ + GLFWwindow **window = check_callback_args(L); + SET_CALLBACK( + L, *window, + glfwSetMouseButtonCallback, + h_mouse_button_cb, mouse_button_cb_ref + ); + return 1; +} + + +static void h_cursor_pos_cb(GLFWwindow *window, double xpos, double ypos) +{ + RETRIEVE_CALLBACK(window, cursor_pos_cb_ref); + /* push_arguments */ + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushnumber(L, xpos); + lua_pushnumber(L, ypos); + /* call */ + lua_call(L, 3, 0); +} +int glfwSetCursorPosCallback_bind(lua_State *L) +{ + GLFWwindow **window = check_callback_args(L); + SET_CALLBACK( + L, *window, + glfwSetCursorPosCallback, + h_cursor_pos_cb, cursor_pos_cb_ref + ); + return 1; +} + + +static void h_cursor_enter_cb(GLFWwindow *window, int entered) +{ + RETRIEVE_CALLBACK(window, cursor_enter_cb_ref); + /* push_arguments */ + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushinteger(L, entered); + /* call */ + lua_call(L, 2, 0); +} +int glfwSetCursorEnterCallback_bind(lua_State *L) +{ + GLFWwindow **window = check_callback_args(L); + SET_CALLBACK( + L, *window, + glfwSetCursorEnterCallback, + h_cursor_enter_cb, cursor_enter_cb_ref + ); + return 1; +} + + +static void h_scroll_cb(GLFWwindow *window, double xoffset, double yoffset) +{ + RETRIEVE_CALLBACK(window, scroll_cb_ref); + /* push_arguments */ + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushnumber(L, xoffset); + lua_pushnumber(L, yoffset); + /* call */ + lua_call(L, 3, 0); + +} +int glfwSetScrollCallback_bind(lua_State *L) +{ + GLFWwindow **window = check_callback_args(L); + SET_CALLBACK( + L, *window, + glfwSetScrollCallback, + h_scroll_cb, scroll_cb_ref + ); + return 1; +} + + +static void h_drop_cb(GLFWwindow *window, int path_count, const char **paths) +{ + RETRIEVE_CALLBACK(window, drop_cb_ref); + /* push_arguments */ + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_createtable(L, path_count, 0); + int tbl = lua_gettop(L); + for (int i=0; i<path_count; i++) { + lua_pushstring(L, paths[i]); + lua_rawseti(L, tbl, i+1); + } + /* call */ + lua_call(L, 2, 0); + +} +int glfwSetDropCallback_bind(lua_State *L) +{ + GLFWwindow **window = check_callback_args(L); + SET_CALLBACK( + L, *window, + glfwSetDropCallback, + h_drop_cb, drop_cb_ref + ); + return 1; +} + + +int glfwJoystickPresent_bind(lua_State *L) +{ + int jid = luaL_checkinteger(L, 1); + int bind_result = glfwJoystickPresent(jid); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwGetJoystickAxes_bind(lua_State *L) +{ + int jid = luaL_checkinteger(L, 1); + int count; + const float * bind_result = glfwGetJoystickAxes(jid, &count); + + lua_createtable(L, count, 0); + int tbl = lua_gettop(L); + for (int i=0; i<count; i++) { + lua_pushnumber(L, bind_result[i]); + lua_rawseti(L, tbl, i+1); + } + return 1; +} + + +int glfwGetJoystickButtons_bind(lua_State *L) +{ + int jid = luaL_checkinteger(L, 1); + int count; + const unsigned char * bind_result = glfwGetJoystickButtons(jid, &count); + + lua_createtable(L, count, 0); + int tbl = lua_gettop(L); + for (int i=0; i<count; i++) { + lua_pushinteger(L, bind_result[i]); + lua_rawseti(L, tbl, i+1); + } + return 1; +} + + +int glfwGetJoystickHats_bind(lua_State *L) +{ + int jid = luaL_checkinteger(L, 1); + int count; + const unsigned char * bind_result = glfwGetJoystickHats(jid, &count); + + lua_createtable(L, count, 0); + int tbl = lua_gettop(L); + for (int i=0; i<count; i++) { + lua_pushinteger(L, bind_result[i]); + lua_rawseti(L, tbl, i+1); + } + return 1; +} + + +int glfwGetJoystickName_bind(lua_State *L) +{ + int jid = luaL_checkinteger(L, 1); + const char * bind_result = glfwGetJoystickName(jid); + lua_pushstring(L, bind_result); + return 1; +} + + +int glfwGetJoystickGUID_bind(lua_State *L) +{ + int jid = luaL_checkinteger(L, 1); + const char * bind_result = glfwGetJoystickGUID(jid); + lua_pushstring(L, bind_result); + return 1; +} + + +int glfwJoystickIsGamepad_bind(lua_State *L) +{ + int jid = luaL_checkinteger(L, 1); + int bind_result = glfwJoystickIsGamepad(jid); + lua_pushinteger(L, bind_result); + return 1; +} + + +struct h_js_data_t { + lua_State *L; + int cb_ref; +} static h_js_data = { NULL, LUA_NOREF }; +static void h_joystick_cb(int jid, int event) +{ + if (h_js_data.cb_ref == LUA_NOREF) { return; } + + lua_State *L = h_js_data.L; + lua_rawgeti(L, LUA_REGISTRYINDEX, h_js_data.cb_ref); + lua_pushinteger(L, jid); + lua_pushinteger(L, event); + lua_call(L, 2, 0); +} +int glfwSetJoystickCallback_bind(lua_State *L) +{ + int type = lua_type(L, 1); + if (type != LUA_TNIL && type != LUA_TFUNCTION) { + return luaL_typerror(L, 1, "function or nil"); + } + + /* push old cb */ + h_js_data.L = L; + lua_rawgeti(L, LUA_REGISTRYINDEX, h_js_data.cb_ref); + + /* set new cb */ + if (type == LUA_TNIL) { + glfwSetJoystickCallback(NULL); + h_js_data.cb_ref = LUA_NOREF; + } + else { + glfwSetJoystickCallback(h_joystick_cb); + lua_pushvalue(L, 1); + h_js_data.cb_ref = luaL_ref(L, LUA_REGISTRYINDEX); + } + + return 1; +} + + +int glfwUpdateGamepadMappings_bind(lua_State *L) +{ + const char * string = luaL_checkstring(L, 1); + int bind_result = glfwUpdateGamepadMappings(string); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwGetGamepadName_bind(lua_State *L) +{ + int jid = luaL_checkinteger(L, 1); + const char * bind_result = glfwGetGamepadName(jid); + lua_pushstring(L, bind_result); + return 1; +} + + +int glfwGetGamepadState_bind(lua_State *L) +{ + int jid = luaL_checkinteger(L, 1); + GLFWgamepadstate state; + int bind_result = glfwGetGamepadState(jid, &state); + lua_pushinteger(L, bind_result); + if (bind_result == GLFW_FALSE) { + lua_pushnil(L); + lua_pushnil(L); + } + else { + lua_createtable(L, 15, 0); + int buttons = lua_gettop(L); + for (int i=0; i<15; i++) { + lua_pushinteger(L, state.buttons[i]); + lua_rawseti(L, buttons, i+1); + } + lua_createtable(L, 6, 0); + int axes = lua_gettop(L); + for (int i=0; i<6; i++) { + lua_pushnumber(L, state.axes[i]); + lua_rawseti(L, axes, i+1); + } + } + + return 3; +} + + +int glfwSetClipboardString_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + const char * string = luaL_checkstring(L, 2); + glfwSetClipboardString(*window, string); + return 0; +} + + +int glfwGetClipboardString_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + const char * bind_result = glfwGetClipboardString(*window); + lua_pushstring(L, bind_result); + return 1; +} + + +int glfwGetTime_bind(lua_State *L) +{ + double bind_result = glfwGetTime(); + lua_pushnumber(L, bind_result); + return 1; +} + + +int glfwSetTime_bind(lua_State *L) +{ + double time = luaL_checknumber(L, 1); + glfwSetTime(time); + return 0; +} + + +int glfwGetTimerValue_bind(lua_State *L) +{ + uint64_t bind_result = glfwGetTimerValue(); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwGetTimerFrequency_bind(lua_State *L) +{ + uint64_t bind_result = glfwGetTimerFrequency(); + lua_pushinteger(L, bind_result); + return 1; +} diff --git a/src/glfw/monitor.c b/src/glfw/monitor.c new file mode 100644 index 0000000..0f1b3fc --- /dev/null +++ b/src/glfw/monitor.c @@ -0,0 +1,250 @@ +#include <stdlib.h> +#include <lua.h> +#include <lauxlib.h> +#include <GLFW/glfw3.h> +#include "setup.h" + + +GLFWmonitor ** create_monitor(lua_State *L) +{ + GLFWmonitor ** monitor = lua_newuserdata(L, sizeof(GLFWmonitor *)); + luaL_getmetatable(L, glfw_monitor_tname); + lua_setmetatable(L, -2); + return monitor; +} + +int glfwGetMonitors_bind(lua_State *L) +{ + int count; + GLFWmonitor ** bind_result = glfwGetMonitors(&count); + lua_createtable(L, count, 0); + int tbl = lua_gettop(L); + for (int i=0; i<count; i++) { + GLFWmonitor **monitor = create_monitor(L); + *monitor = bind_result[i]; + lua_rawseti(L, tbl, i+1); + } + return 1; +} + + +int glfwGetPrimaryMonitor_bind(lua_State *L) +{ + GLFWmonitor **monitor = create_monitor(L); + *monitor = glfwGetPrimaryMonitor(); + return 1; +} + + +int glfwGetMonitorPos_bind(lua_State *L) +{ + GLFWmonitor * monitor = luaL_checkudata(L, 1, glfw_monitor_tname); + int xpos, ypos; + glfwGetMonitorPos(monitor, &xpos, &ypos); + lua_pushinteger(L, xpos); + lua_pushinteger(L, ypos); + return 2; +} + + +int glfwGetMonitorWorkarea_bind(lua_State *L) +{ + GLFWmonitor * monitor = luaL_checkudata(L, 1, glfw_monitor_tname); + int xpos, ypos, width, height; + glfwGetMonitorWorkarea(monitor, &xpos, &ypos, &width, &height); + lua_pushinteger(L, xpos); + lua_pushinteger(L, ypos); + lua_pushinteger(L, width); + lua_pushinteger(L, height); + return 4; +} + + +int glfwGetMonitorPhysicalSize_bind(lua_State *L) +{ + GLFWmonitor * monitor = luaL_checkudata(L, 1, glfw_monitor_tname); + int widthMM, heightMM; + glfwGetMonitorPhysicalSize(monitor, &widthMM, &heightMM); + lua_pushinteger(L, widthMM); + lua_pushinteger(L, heightMM); + return 2; +} + + +int glfwGetMonitorContentScale_bind(lua_State *L) +{ + GLFWmonitor * monitor = luaL_checkudata(L, 1, glfw_monitor_tname); + float xscale, yscale; + glfwGetMonitorContentScale(monitor, &xscale, &yscale); + lua_pushnumber(L, xscale); + lua_pushnumber(L, yscale); + return 2; +} + + +int glfwGetMonitorName_bind(lua_State *L) +{ + GLFWmonitor * monitor = luaL_checkudata(L, 1, glfw_monitor_tname); + const char * bind_result = glfwGetMonitorName(monitor); + lua_pushstring(L, bind_result); + return 1; +} + + +struct h_glfw_monitor_data_t { + lua_State *L; + int cb_ref; +} static h_monitor_data = { NULL, LUA_NOREF }; +static void h_monitor_cb(GLFWmonitor *monitor, int event) +{ + if (h_monitor_data.cb_ref == LUA_NOREF) { return; } + + lua_State *L = h_monitor_data.L; + lua_rawgeti(L, LUA_REGISTRYINDEX, h_monitor_data.cb_ref); + GLFWmonitor **m = create_monitor(L); + *m = monitor; + lua_pushinteger(L, event); + lua_call(L, 2, 0); +} + +int glfwSetMonitorCallback_bind(lua_State *L) +{ + int type = lua_type(L, 1); + if (type != LUA_TNIL && type != LUA_TFUNCTION) { + return luaL_typerror(L, 1, "function or nil"); + } + + /* push old cb */ + h_monitor_data.L = L; + lua_rawgeti(L, LUA_REGISTRYINDEX, h_monitor_data.cb_ref); + + /* set new cb */ + if (type == LUA_TNIL) { + glfwSetMonitorCallback(NULL); + h_monitor_data.cb_ref = LUA_NOREF; + } + else { + glfwSetMonitorCallback(h_monitor_cb); + lua_pushvalue(L, 1); + h_monitor_data.cb_ref = luaL_ref(L, LUA_REGISTRYINDEX); + } + + return 1; +} + + +static void push_vidmode(lua_State *L, GLFWvidmode mode) +{ + lua_createtable(L, 0, 6); + int tbl = lua_gettop(L); + + lua_pushinteger(L, mode.width); + lua_setfield(L, tbl, "width"); + lua_pushinteger(L, mode.height); + lua_setfield(L, tbl, "height"); + lua_pushinteger(L, mode.redBits); + lua_setfield(L, tbl, "redBits"); + lua_pushinteger(L, mode.greenBits); + lua_setfield(L, tbl, "greenBits"); + lua_pushinteger(L, mode.blueBits); + lua_setfield(L, tbl, "blueBits"); + lua_pushinteger(L, mode.refreshRate); + lua_setfield(L, tbl, "refreshRate"); +} +int glfwGetVideoModes_bind(lua_State *L) +{ + GLFWmonitor * monitor = luaL_checkudata(L, 1, glfw_monitor_tname); + int count; + const GLFWvidmode * bind_result = glfwGetVideoModes(monitor, &count); + + lua_createtable(L, count, 0); + int tbl = lua_gettop(L); + for (int i=0; i<count; i++) { + push_vidmode(L, bind_result[i]); + lua_rawseti(L, tbl, i+1); + } + return 1; +} + + +int glfwGetVideoMode_bind(lua_State *L) +{ + GLFWmonitor * monitor = luaL_checkudata(L, 1, glfw_monitor_tname); + const GLFWvidmode * bind_result = glfwGetVideoMode(monitor); + push_vidmode(L, *bind_result); + return 1; +} + + +int glfwSetGamma_bind(lua_State *L) +{ + GLFWmonitor * monitor = luaL_checkudata(L, 1, glfw_monitor_tname); + float gamma = luaL_checknumber(L, 2); + glfwSetGamma(monitor, gamma); + return 0; +} + + +int glfwGetGammaRamp_bind(lua_State *L) +{ + GLFWmonitor * monitor = luaL_checkudata(L, 1, glfw_monitor_tname); + const GLFWgammaramp * ramp = glfwGetGammaRamp(monitor); + lua_createtable(L, ramp->size, 0); + int ramp_tbl = lua_gettop(L); + for (int i=0; i<ramp->size; i++) { + lua_createtable(L, 3, 0); + int tbl = lua_gettop(L); + lua_pushinteger(L, ramp->red[i]); + lua_rawseti(L, tbl, 1); + lua_pushinteger(L, ramp->green[i]); + lua_rawseti(L, tbl, 2); + lua_pushinteger(L, ramp->blue[i]); + lua_rawseti(L, tbl, 3); + lua_rawseti(L, ramp_tbl, i+1); + } + + return 1; +} + + +int glfwSetGammaRamp_bind(lua_State *L) +{ + GLFWmonitor * monitor = luaL_checkudata(L, 1, glfw_monitor_tname); + luaL_checktype(L, 2, LUA_TTABLE); + + GLFWgammaramp ramp = { NULL, NULL, NULL, 0 }; + size_t len = lua_objlen(L, 2); + ramp.red = malloc(len * sizeof(unsigned short)); + ramp.green = malloc(len * sizeof(unsigned short)); + ramp.blue = malloc(len * sizeof(unsigned short)); + ramp.size = len; + if ( + ramp.red == NULL || + ramp.green == NULL || + ramp.blue == NULL + ) { + return luaL_error( + L, + "failed to allocate one or more gamma ramp " + "color buffers of %lu bytes each", + len * sizeof(unsigned short) + ); + } + + for (int i=0; i<len; i++) { + lua_rawgeti(L, 2, i+1); + int tbl = lua_gettop(L); + lua_rawgeti(L, tbl, 1); + ramp.red[i] = lua_tonumber(L, -1); + lua_rawgeti(L, tbl, 2); + ramp.green[i] = lua_tonumber(L, -1); + lua_rawgeti(L, tbl, 3); + ramp.blue[i] = lua_tonumber(L, -1); + lua_pop(L, 4); + } + + glfwSetGammaRamp(monitor, &ramp); + return 0; +} + + diff --git a/src/glfw/setup.c b/src/glfw/setup.c new file mode 100644 index 0000000..0abab35 --- /dev/null +++ b/src/glfw/setup.c @@ -0,0 +1,33 @@ +#include <lua.h> +#include <lauxlib.h> +#include "util/util.h" +#include "setup.h" + + +#define X(str, mt) const char *glfw_ ## mt ## _tname = str; +H_GLFW_METATABLES +#undef X + + +void setup_glfw(lua_State *L, int honey_tbl) +{ + /* create metatables */ + #define X(str, mt) luaL_newmetatable(L, glfw_ ## mt ## _tname); lua_pop(L, 1); + H_GLFW_METATABLES + #undef X + + struct honey_tbl_t tbl[] = { + #define X(name, val) H_INT(name, val), + H_GLFW_ENUM + #undef X + + #define X(name, func) H_FUNC(name, func), + H_GLFW_FUNCTIONS + #undef X + + H_END + }; + + create_table(L, tbl); + lua_setfield(L, honey_tbl, "glfw"); +} diff --git a/src/glfw/setup.h b/src/glfw/setup.h new file mode 100644 index 0000000..1b30728 --- /dev/null +++ b/src/glfw/setup.h @@ -0,0 +1,419 @@ +#ifndef HONEY_GLFW_SETUP_H +#define HONEY_GLFW_SETUP_H + +#include <lua.h> +#include <GLFW/glfw3.h> + +struct h_glfw_window_data_t { + lua_State *L; + int self_ref; + + /* callbacks */ + int key_cb_ref; + int char_cb_ref; + int char_mods_cb_ref; + int mouse_button_cb_ref; + int cursor_pos_cb_ref; + int cursor_enter_cb_ref; + int scroll_cb_ref; + int drop_cb_ref; + int pos_cb_ref; + int size_cb_ref; + int close_cb_ref; + int refresh_cb_ref; + int focus_cb_ref; + int iconify_cb_ref; + int maximize_cb_ref; + int framebuffer_size_cb_ref; + int content_scale_cb_ref; +}; + + +GLFWmonitor ** create_monitor(lua_State *L); + + +#define H_GLFW_METATABLES \ + X("glfw.window", window) \ + X("glfw.cursor", cursor) \ + X("glfw.monitor", monitor) \ + +#define X(str, name) extern const char *glfw_ ## name ## _tname; +H_GLFW_METATABLES +#undef X + + +#define H_GLFW_FUNCTIONS \ + /* context */ \ + X("MakeContextCurrent", glfwMakeContextCurrent_bind) \ + X("GetCurrentContext", glfwGetCurrentContext_bind) \ + X("SwapInterval", glfwSwapInterval_bind) \ + X("ExtensionSupported", glfwExtensionSupported_bind) \ + X("GetProcAddress", glfwGetProcAddress_bind) \ +\ + /* setup/error */ \ + X("Init", glfwInit_bind) \ + X("Terminate", glfwTerminate_bind) \ + X("InitHint", glfwInitHint_bind) \ + X("GetVersion", glfwGetVersion_bind) \ + X("GetVersionString", glfwGetVersionString_bind) \ + X("GetError", glfwGetError_bind) \ +\ + /* input */ \ + X("GetInputMode", glfwGetInputMode_bind) \ + X("SetInputMode", glfwSetInputMode_bind) \ + X("RawMouseMotionSupported", glfwRawMouseMotionSupported_bind) \ + X("GetKeyName", glfwGetKeyName_bind) \ + X("GetKeyScancode", glfwGetKeyScancode_bind) \ + X("GetKey", glfwGetKey_bind) \ + X("GetMouseButton", glfwGetMouseButton_bind) \ + X("GetCursorPos", glfwGetCursorPos_bind) \ + X("SetCursorPos", glfwSetCursorPos_bind) \ + X("CreateCursor", glfwCreateCursor_bind) \ + X("CreateStandardCursor", glfwCreateStandardCursor_bind) \ + X("DestroyCursor", glfwDestroyCursor_bind) \ + X("SetCursor", glfwSetCursor_bind) \ + X("SetKeyCallback", glfwSetKeyCallback_bind) \ + X("SetCharCallback", glfwSetCharCallback_bind) \ + X("SetCharModsCallback", glfwSetCharModsCallback_bind) \ + X("SetMouseButtonCallback", glfwSetMouseButtonCallback_bind) \ + X("SetCursorPosCallback", glfwSetCursorPosCallback_bind) \ + X("SetCursorEnterCallback", glfwSetCursorEnterCallback_bind) \ + X("SetScrollCallback", glfwSetScrollCallback_bind) \ + X("SetDropCallback", glfwSetDropCallback_bind) \ + X("JoystickPresent", glfwJoystickPresent_bind) \ + X("GetJoystickAxes", glfwGetJoystickAxes_bind) \ + X("GetJoystickButtons", glfwGetJoystickButtons_bind) \ + X("GetJoystickHats", glfwGetJoystickHats_bind) \ + X("GetJoystickName", glfwGetJoystickName_bind) \ + X("GetJoystickGUID", glfwGetJoystickGUID_bind) \ + X("JoystickIsGamepad", glfwJoystickIsGamepad_bind) \ + X("SetJoystickCallback", glfwSetJoystickCallback_bind) \ + X("UpdateGamepadMappings", glfwUpdateGamepadMappings_bind) \ + X("GetGamepadName", glfwGetGamepadName_bind) \ + X("GetGamepadState", glfwGetGamepadState_bind) \ + X("SetClipboardString", glfwSetClipboardString_bind) \ + X("GetClipboardString", glfwGetClipboardString_bind) \ + X("GetTime", glfwGetTime_bind) \ + X("SetTime", glfwSetTime_bind) \ + X("GetTimerValue", glfwGetTimerValue_bind) \ + X("GetTimerFrequency", glfwGetTimerFrequency_bind) \ +\ + /* monitor */ \ + X("GetMonitors", glfwGetMonitors_bind) \ + X("GetPrimaryMonitor", glfwGetPrimaryMonitor_bind) \ + X("GetMonitorPos", glfwGetMonitorPos_bind) \ + X("GetMonitorWorkarea", glfwGetMonitorWorkarea_bind) \ + X("GetMonitorPhysicalSize", glfwGetMonitorPhysicalSize_bind) \ + X("GetMonitorContentScale", glfwGetMonitorContentScale_bind) \ + X("GetMonitorName", glfwGetMonitorName_bind) \ + X("SetMonitorCallback", glfwSetMonitorCallback_bind) \ + X("GetVideoModes", glfwGetVideoModes_bind) \ + X("GetVideoMode", glfwGetVideoMode_bind) \ + X("SetGamma", glfwSetGamma_bind) \ + X("GetGammaRamp", glfwGetGammaRamp_bind) \ + X("SetGammaRamp", glfwSetGammaRamp_bind) \ +\ + /* window */ \ + X("DefaultWindowHints", glfwDefaultWindowHints_bind) \ + X("WindowHint", glfwWindowHint_bind) \ + X("WindowHintString", glfwWindowHintString_bind) \ + X("CreateWindow", glfwCreateWindow_bind) \ + X("DestroyWindow", glfwDestroyWindow_bind) \ + X("WindowShouldClose", glfwWindowShouldClose_bind) \ + X("SetWindowShouldClose", glfwSetWindowShouldClose_bind) \ + X("SetWindowTitle", glfwSetWindowTitle_bind) \ + X("SetWindowIcon", glfwSetWindowIcon_bind) \ + X("GetWindowPos", glfwGetWindowPos_bind) \ + X("SetWindowPos", glfwSetWindowPos_bind) \ + X("GetWindowSize", glfwGetWindowSize_bind) \ + X("SetWindowSizeLimits", glfwSetWindowSizeLimits_bind) \ + X("SetWindowAspectRatio", glfwSetWindowAspectRatio_bind) \ + X("SetWindowSize", glfwSetWindowSize_bind) \ + X("GetFramebufferSize", glfwGetFramebufferSize_bind) \ + X("GetWindowFrameSize", glfwGetWindowFrameSize_bind) \ + X("GetWindowContentScale", glfwGetWindowContentScale_bind) \ + X("GetWindowOpacity", glfwGetWindowOpacity_bind) \ + X("SetWindowOpacity", glfwSetWindowOpacity_bind) \ + X("IconifyWindow", glfwIconifyWindow_bind) \ + X("RestoreWindow", glfwRestoreWindow_bind) \ + X("MaximizeWindow", glfwMaximizeWindow_bind) \ + X("ShowWindow", glfwShowWindow_bind) \ + X("HideWindow", glfwHideWindow_bind) \ + X("FocusWindow", glfwFocusWindow_bind) \ + X("RequestWindowAttention", glfwRequestWindowAttention_bind) \ + X("GetWindowMonitor", glfwGetWindowMonitor_bind) \ + X("SetWindowMonitor", glfwSetWindowMonitor_bind) \ + X("GetWindowAttrib", glfwGetWindowAttrib_bind) \ + X("SetWindowAttrib", glfwSetWindowAttrib_bind) \ + X("SetWindowPosCallback", glfwSetWindowPosCallback_bind) \ + X("SetWindowSizeCallback", glfwSetWindowSizeCallback_bind) \ + X("SetWindowCloseCallback", glfwSetWindowCloseCallback_bind) \ + X("SetWindowRefreshCallback", glfwSetWindowRefreshCallback_bind) \ + X("SetWindowFocusCallback", glfwSetWindowFocusCallback_bind) \ + X("SetWindowIconifyCallback", glfwSetWindowIconifyCallback_bind) \ + X("SetWindowMaximizeCallback", glfwSetWindowMaximizeCallback_bind) \ + X("SetFramebufferSizeCallback", glfwSetFramebufferSizeCallback_bind) \ + X("SetWindowContentScaleCallback", glfwSetWindowContentScaleCallback_bind) \ + X("PollEvents", glfwPollEvents_bind) \ + X("WaitEvents", glfwWaitEvents_bind) \ + X("WaitEventsTimeout", glfwWaitEventsTimeout_bind) \ + X("PostEmptyEvent", glfwPostEmptyEvent_bind) \ + X("SwapBuffers", glfwSwapBuffers_bind) \ + + +#define X(name, func) int func(lua_State *L); +H_GLFW_FUNCTIONS +#undef X + + +#define H_GLFW_ENUM \ + X("FOCUSED", GLFW_FOCUSED) \ + X("ICONIFIED", GLFW_ICONIFIED) \ + X("RESIZABLE", GLFW_RESIZABLE) \ + X("VISIBLE", GLFW_VISIBLE) \ + X("DECORATED", GLFW_DECORATED) \ + X("GLFW_AUTO_ICONIFY", GLFW_AUTO_ICONIFY) \ + X("FLOATING", GLFW_FLOATING) \ + X("MAXIMIZED", GLFW_MAXIMIZED) \ + X("CENTER_CURSOR", GLFW_CENTER_CURSOR) \ + X("TRANSPARENT_FRAMEBUFFER", GLFW_TRANSPARENT_FRAMEBUFFER) \ + X("HOVERED", GLFW_HOVERED) \ + X("FOCUS_ON_SHOW", GLFW_FOCUS_ON_SHOW) \ + X("RED_BITS", GLFW_RED_BITS) \ + X("GREEN_BITS", GLFW_GREEN_BITS) \ + X("BLUE_BITS", GLFW_BLUE_BITS) \ + X("ALPHA_BITS", GLFW_ALPHA_BITS) \ + X("DEPTH_BITS", GLFW_DEPTH_BITS) \ + X("STENCIL_BITS", GLFW_STENCIL_BITS) \ + X("ACCUM_RED_BITS", GLFW_ACCUM_RED_BITS) \ + X("ACCUM_GREEN_BITS", GLFW_ACCUM_GREEN_BITS) \ + X("ACCUM_BLUE_BITS", GLFW_ACCUM_BLUE_BITS) \ + X("ACCUM_ALPHA_BITS", GLFW_ACCUM_ALPHA_BITS) \ + X("AUX_BUFFERS", GLFW_AUX_BUFFERS) \ + X("STEREO", GLFW_STEREO) \ + X("SAMPLES", GLFW_SAMPLES) \ + X("SRGB_CAPABLE", GLFW_SRGB_CAPABLE) \ + X("REFRESH_RATE", GLFW_REFRESH_RATE) \ + X("DOUBLEBUFFER", GLFW_DOUBLEBUFFER) \ + X("CLIENT_API", GLFW_CLIENT_API) \ + X("CONTEXT_VERSION_MAJOR", GLFW_CONTEXT_VERSION_MAJOR) \ + X("CONTEXT_VERSION_MINOR", GLFW_CONTEXT_VERSION_MINOR) \ + X("CONTEXT_REVISION", GLFW_CONTEXT_REVISION) \ + X("CONTEXT_ROBUSTNESS", GLFW_CONTEXT_ROBUSTNESS) \ + X("OPENGL_FORWARD_COMPAT", GLFW_OPENGL_FORWARD_COMPAT) \ + X("OPENGL_DEBUG_CONTEXT", GLFW_OPENGL_DEBUG_CONTEXT) \ + X("OPENGL_PROFILE", GLFW_OPENGL_PROFILE) \ + X("CONTEXT_RELEASE_BEHAVIOR", GLFW_CONTEXT_RELEASE_BEHAVIOR) \ + X("CONTEXT_NO_ERROR", GLFW_CONTEXT_NO_ERROR) \ + X("CONTEXT_CREATION_API", GLFW_CONTEXT_CREATION_API) \ + X("SCALE_TO_MONITOR", GLFW_SCALE_TO_MONITOR) \ + X("COCOA_RETINA_FRAMEBUFFER", GLFW_COCOA_RETINA_FRAMEBUFFER) \ + X("COCOA_FRAME_NAME", GLFW_COCOA_FRAME_NAME) \ + X("COCOA_GRAPHICS_SWITCHING", GLFW_COCOA_GRAPHICS_SWITCHING) \ + X("X11_CLASS_NAME", GLFW_X11_CLASS_NAME) \ + X("X11_INSTANCE_NAME", GLFW_X11_INSTANCE_NAME) \ + X("GAMEPAD_AXIS_LEFT_X", GLFW_GAMEPAD_AXIS_LEFT_X) \ + X("GAMEPAD_AXIS_LEFT_Y", GLFW_GAMEPAD_AXIS_LEFT_Y) \ + X("GAMEPAD_AXIS_RIGHT_X", GLFW_GAMEPAD_AXIS_RIGHT_X) \ + X("GAMEPAD_AXIS_RIGHT_Y", GLFW_GAMEPAD_AXIS_RIGHT_Y) \ + X("GAMEPAD_AXIS_LEFT_TRIGGER", GLFW_GAMEPAD_AXIS_LEFT_TRIGGER) \ + X("GAMEPAD_AXIS_RIGHT_TRIGGER", GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER) \ + X("GAMEPAD_AXIS_LAST", GLFW_GAMEPAD_AXIS_LAST) \ + X("GAMEPAD_AXIS_LEFT_X", GLFW_GAMEPAD_AXIS_LEFT_X) \ + X("GAMEPAD_AXIS_LEFT_Y", GLFW_GAMEPAD_AXIS_LEFT_Y) \ + X("GAMEPAD_AXIS_RIGHT_X", GLFW_GAMEPAD_AXIS_RIGHT_X) \ + X("GAMEPAD_AXIS_RIGHT_Y", GLFW_GAMEPAD_AXIS_RIGHT_Y) \ + X("GAMEPAD_AXIS_LEFT_TRIGGER", GLFW_GAMEPAD_AXIS_LEFT_TRIGGER) \ + X("GAMEPAD_AXIS_RIGHT_TRIGGER", GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER) \ + X("GAMEPAD_AXIS_LAST", GLFW_GAMEPAD_AXIS_LAST) \ + X("HAT_CENTERED", GLFW_HAT_CENTERED) \ + X("HAT_UP", GLFW_HAT_UP) \ + X("HAT_RIGHT", GLFW_HAT_RIGHT) \ + X("HAT_DOWN", GLFW_HAT_DOWN) \ + X("HAT_LEFT", GLFW_HAT_LEFT) \ + X("HAT_RIGHT_UP", GLFW_HAT_RIGHT_UP) \ + X("HAT_RIGHT_DOWN", GLFW_HAT_RIGHT_DOWN) \ + X("HAT_LEFT_UP", GLFW_HAT_LEFT_UP) \ + X("HAT_LEFT_DOWN", GLFW_HAT_LEFT_DOWN) \ + X("JOYSTICK_1", GLFW_JOYSTICK_1) \ + X("JOYSTICK_2", GLFW_JOYSTICK_2) \ + X("JOYSTICK_3", GLFW_JOYSTICK_3) \ + X("JOYSTICK_4", GLFW_JOYSTICK_4) \ + X("JOYSTICK_5", GLFW_JOYSTICK_5) \ + X("JOYSTICK_6", GLFW_JOYSTICK_6) \ + X("JOYSTICK_7", GLFW_JOYSTICK_7) \ + X("JOYSTICK_8", GLFW_JOYSTICK_8) \ + X("JOYSTICK_9", GLFW_JOYSTICK_9) \ + X("JOYSTICK_10", GLFW_JOYSTICK_10) \ + X("JOYSTICK_11", GLFW_JOYSTICK_11) \ + X("JOYSTICK_12", GLFW_JOYSTICK_12) \ + X("JOYSTICK_13", GLFW_JOYSTICK_13) \ + X("JOYSTICK_14", GLFW_JOYSTICK_14) \ + X("JOYSTICK_15", GLFW_JOYSTICK_15) \ + X("JOYSTICK_16", GLFW_JOYSTICK_16) \ + X("JOYSTICK_LAST", GLFW_JOYSTICK_LAST) \ + X("KEY_UNKNOWN", GLFW_KEY_UNKNOWN) \ + X("KEY_SPACE", GLFW_KEY_SPACE) \ + X("KEY_APOSTROPHE", GLFW_KEY_APOSTROPHE) \ + X("KEY_COMMA", GLFW_KEY_COMMA) \ + X("KEY_MINUS", GLFW_KEY_MINUS) \ + X("KEY_PERIOD", GLFW_KEY_PERIOD) \ + X("KEY_SLASH", GLFW_KEY_SLASH) \ + X("KEY_0", GLFW_KEY_0) \ + X("KEY_1", GLFW_KEY_1) \ + X("KEY_2", GLFW_KEY_2) \ + X("KEY_3", GLFW_KEY_3) \ + X("KEY_4", GLFW_KEY_4) \ + X("KEY_5", GLFW_KEY_5) \ + X("KEY_6", GLFW_KEY_6) \ + X("KEY_7", GLFW_KEY_7) \ + X("KEY_8", GLFW_KEY_8) \ + X("KEY_9", GLFW_KEY_9) \ + X("KEY_SEMICOLON", GLFW_KEY_SEMICOLON) \ + X("KEY_EQUAL", GLFW_KEY_EQUAL) \ + X("KEY_A", GLFW_KEY_A) \ + X("KEY_B", GLFW_KEY_B) \ + X("KEY_C", GLFW_KEY_C) \ + X("KEY_D", GLFW_KEY_D) \ + X("KEY_E", GLFW_KEY_E) \ + X("KEY_F", GLFW_KEY_F) \ + X("KEY_G", GLFW_KEY_G) \ + X("KEY_H", GLFW_KEY_H) \ + X("KEY_I", GLFW_KEY_I) \ + X("KEY_J", GLFW_KEY_J) \ + X("KEY_K", GLFW_KEY_K) \ + X("KEY_L", GLFW_KEY_L) \ + X("KEY_M", GLFW_KEY_M) \ + X("KEY_N", GLFW_KEY_N) \ + X("KEY_O", GLFW_KEY_O) \ + X("KEY_P", GLFW_KEY_P) \ + X("KEY_Q", GLFW_KEY_Q) \ + X("KEY_R", GLFW_KEY_R) \ + X("KEY_S", GLFW_KEY_S) \ + X("KEY_T", GLFW_KEY_T) \ + X("KEY_U", GLFW_KEY_U) \ + X("KEY_V", GLFW_KEY_V) \ + X("KEY_W", GLFW_KEY_W) \ + X("KEY_X", GLFW_KEY_X) \ + X("KEY_Y", GLFW_KEY_Y) \ + X("KEY_Z", GLFW_KEY_Z) \ + X("KEY_LEFT_BRACKET", GLFW_KEY_LEFT_BRACKET) \ + X("KEY_BACKSLASH", GLFW_KEY_BACKSLASH) \ + X("KEY_RIGHT_BRACKET", GLFW_KEY_RIGHT_BRACKET) \ + X("KEY_GRAVE_ACCENT", GLFW_KEY_GRAVE_ACCENT) \ + X("KEY_WORLD_1", GLFW_KEY_WORLD_1) \ + X("KEY_WORLD_2", GLFW_KEY_WORLD_2) \ + X("KEY_ESCAPE", GLFW_KEY_ESCAPE) \ + X("KEY_ENTER", GLFW_KEY_ENTER) \ + X("KEY_TAB", GLFW_KEY_TAB) \ + X("KEY_BACKSPACE", GLFW_KEY_BACKSPACE) \ + X("KEY_INSERT", GLFW_KEY_INSERT) \ + X("KEY_DELETE", GLFW_KEY_DELETE) \ + X("KEY_RIGHT", GLFW_KEY_RIGHT) \ + X("KEY_LEFT", GLFW_KEY_LEFT) \ + X("KEY_DOWN", GLFW_KEY_DOWN) \ + X("KEY_UP", GLFW_KEY_UP) \ + X("KEY_PAGE_UP", GLFW_KEY_PAGE_UP) \ + X("KEY_PAGE_DOWN", GLFW_KEY_PAGE_DOWN) \ + X("KEY_HOME", GLFW_KEY_HOME) \ + X("KEY_END", GLFW_KEY_END) \ + X("KEY_CAPS_LOCK", GLFW_KEY_CAPS_LOCK) \ + X("KEY_SCROLL_LOCK", GLFW_KEY_SCROLL_LOCK) \ + X("KEY_NUM_LOCK", GLFW_KEY_NUM_LOCK) \ + X("KEY_PRINT_SCREEN", GLFW_KEY_PRINT_SCREEN) \ + X("KEY_PAUSE", GLFW_KEY_PAUSE) \ + X("KEY_F1", GLFW_KEY_F1) \ + X("KEY_F2", GLFW_KEY_F2) \ + X("KEY_F3", GLFW_KEY_F3) \ + X("KEY_F4", GLFW_KEY_F4) \ + X("KEY_F5", GLFW_KEY_F5) \ + X("KEY_F6", GLFW_KEY_F6) \ + X("KEY_F7", GLFW_KEY_F7) \ + X("KEY_F8", GLFW_KEY_F8) \ + X("KEY_F9", GLFW_KEY_F9) \ + X("KEY_F10", GLFW_KEY_F10) \ + X("KEY_F11", GLFW_KEY_F11) \ + X("KEY_F12", GLFW_KEY_F12) \ + X("KEY_F13", GLFW_KEY_F13) \ + X("KEY_F14", GLFW_KEY_F14) \ + X("KEY_F15", GLFW_KEY_F15) \ + X("KEY_F16", GLFW_KEY_F16) \ + X("KEY_F17", GLFW_KEY_F17) \ + X("KEY_F18", GLFW_KEY_F18) \ + X("KEY_F19", GLFW_KEY_F19) \ + X("KEY_F20", GLFW_KEY_F20) \ + X("KEY_F21", GLFW_KEY_F21) \ + X("KEY_F22", GLFW_KEY_F22) \ + X("KEY_F23", GLFW_KEY_F23) \ + X("KEY_F24", GLFW_KEY_F24) \ + X("KEY_F25", GLFW_KEY_F25) \ + X("KEY_KP_0", GLFW_KEY_KP_0) \ + X("KEY_KP_1", GLFW_KEY_KP_1) \ + X("KEY_KP_2", GLFW_KEY_KP_2) \ + X("KEY_KP_3", GLFW_KEY_KP_3) \ + X("KEY_KP_4", GLFW_KEY_KP_4) \ + X("KEY_KP_5", GLFW_KEY_KP_5) \ + X("KEY_KP_6", GLFW_KEY_KP_6) \ + X("KEY_KP_7", GLFW_KEY_KP_7) \ + X("KEY_KP_8", GLFW_KEY_KP_8) \ + X("KEY_KP_9", GLFW_KEY_KP_9) \ + X("KEY_KP_DECIMAL", GLFW_KEY_KP_DECIMAL) \ + X("KEY_KP_DIVIDE", GLFW_KEY_KP_DIVIDE) \ + X("KEY_KP_MULTIPLY", GLFW_KEY_KP_MULTIPLY) \ + X("KEY_KP_SUBTRACT", GLFW_KEY_KP_SUBTRACT) \ + X("KEY_KP_ADD", GLFW_KEY_KP_ADD) \ + X("KEY_KP_ENTER", GLFW_KEY_KP_ENTER) \ + X("KEY_KP_EQUAL", GLFW_KEY_KP_EQUAL) \ + X("KEY_LEFT_SHIFT", GLFW_KEY_LEFT_SHIFT) \ + X("KEY_LEFT_CONTROL", GLFW_KEY_LEFT_CONTROL) \ + X("KEY_LEFT_ALT", GLFW_KEY_LEFT_ALT) \ + X("KEY_LEFT_SUPER", GLFW_KEY_LEFT_SUPER) \ + X("KEY_RIGHT_SHIFT", GLFW_KEY_RIGHT_SHIFT) \ + X("KEY_RIGHT_CONTROL", GLFW_KEY_RIGHT_CONTROL) \ + X("KEY_RIGHT_ALT", GLFW_KEY_RIGHT_ALT) \ + X("KEY_RIGHT_SUPER", GLFW_KEY_RIGHT_SUPER) \ + X("KEY_MENU", GLFW_KEY_MENU) \ + X("KEY_LAST", GLFW_KEY_LAST) \ + X("MOD_SHIFT", GLFW_MOD_SHIFT) \ + X("MOD_CONTROL", GLFW_MOD_CONTROL) \ + X("MOD_ALT", GLFW_MOD_ALT) \ + X("MOD_SUPER", GLFW_MOD_SUPER) \ + X("MOD_CAPS_LOCK", GLFW_MOD_CAPS_LOCK) \ + X("MOD_NUM_LOCK", GLFW_MOD_NUM_LOCK) \ + X("MOUSE_BUTTON_1", GLFW_MOUSE_BUTTON_1) \ + X("MOUSE_BUTTON_2", GLFW_MOUSE_BUTTON_2) \ + X("MOUSE_BUTTON_3", GLFW_MOUSE_BUTTON_3) \ + X("MOUSE_BUTTON_4", GLFW_MOUSE_BUTTON_4) \ + X("MOUSE_BUTTON_5", GLFW_MOUSE_BUTTON_5) \ + X("MOUSE_BUTTON_6", GLFW_MOUSE_BUTTON_6) \ + X("MOUSE_BUTTON_7", GLFW_MOUSE_BUTTON_7) \ + X("MOUSE_BUTTON_8", GLFW_MOUSE_BUTTON_8) \ + X("MOUSE_BUTTON_LAST", GLFW_MOUSE_BUTTON_LAST) \ + X("MOUSE_BUTTON_LEFT", GLFW_MOUSE_BUTTON_LEFT) \ + X("MOUSE_BUTTON_RIGHT", GLFW_MOUSE_BUTTON_RIGHT) \ + X("MOUSE_BUTTON_MIDDLE", GLFW_MOUSE_BUTTON_MIDDLE) \ + X("ARROW_CURSOR", GLFW_ARROW_CURSOR) \ + X("IBEAM_CURSOR", GLFW_IBEAM_CURSOR) \ + X("CROSSHAIR_CURSOR", GLFW_CROSSHAIR_CURSOR) \ + X("HAND_CURSOR", GLFW_HAND_CURSOR) \ + X("HRESIZE_CURSOR", GLFW_HRESIZE_CURSOR) \ + X("VRESIZE_CURSOR", GLFW_VRESIZE_CURSOR) \ + X("TRUE", GLFW_TRUE) \ + X("FALSE", GLFW_FALSE) \ + X("JOYSTICK_HAT_BUTTONS", GLFW_JOYSTICK_HAT_BUTTONS) \ + X("COCOA_CHDIR_RESOURCES", GLFW_COCOA_CHDIR_RESOURCES) \ + X("COCOA_MENUBAR", GLFW_COCOA_MENUBAR) \ + X("NO_ERROR", GLFW_NO_ERROR) \ + X("NOT_INITIALIZED", GLFW_NOT_INITIALIZED) \ + X("NO_CURRENT_CONTEXT", GLFW_NO_CURRENT_CONTEXT) \ + X("INVALID_ENUM", GLFW_INVALID_ENUM) \ + X("INVALID_VALUE", GLFW_INVALID_VALUE) \ + X("OUT_OF_MEMORY", GLFW_OUT_OF_MEMORY) \ + X("API_UNAVAILABLE", GLFW_API_UNAVAILABLE) \ + X("VERSION_UNAVAILABLE", GLFW_VERSION_UNAVAILABLE) \ + X("PLATFORM_ERROR", GLFW_PLATFORM_ERROR) \ + X("FORMAT_UNAVAILABLE", GLFW_FORMAT_UNAVAILABLE) \ + X("NO_WINDOW_CONTEXT", GLFW_NO_WINDOW_CONTEXT) \ + + +#endif diff --git a/src/glfw/window.c b/src/glfw/window.c new file mode 100644 index 0000000..1aafeb4 --- /dev/null +++ b/src/glfw/window.c @@ -0,0 +1,588 @@ +#include <lua.h> +#include <lauxlib.h> +#include <GLFW/glfw3.h> +#include "setup.h" + + +struct window_data_t { + GLFWwindow * window; + struct h_glfw_window_data_t data; +}; +GLFWwindow ** create_window(lua_State *L) +{ + /* allocate userdata memory */ + struct window_data_t *d = lua_newuserdata(L, sizeof(struct window_data_t)); + GLFWwindow ** window = &(d->window); + + /* set metatable */ + int self = lua_gettop(L); + luaL_getmetatable(L, glfw_window_tname); + lua_setmetatable(L, -2); + + /* configure window data struct */ + d->data.L = L; + lua_pushvalue(L, self); + d->data.self_ref = luaL_ref(L, LUA_REGISTRYINDEX); + + d->data.key_cb_ref = LUA_NOREF; + d->data.char_cb_ref = LUA_NOREF; + d->data.char_mods_cb_ref = LUA_NOREF; + d->data.mouse_button_cb_ref = LUA_NOREF; + d->data.cursor_pos_cb_ref = LUA_NOREF; + d->data.cursor_enter_cb_ref = LUA_NOREF; + d->data.scroll_cb_ref = LUA_NOREF; + d->data.drop_cb_ref = LUA_NOREF; + d->data.pos_cb_ref = LUA_NOREF; + d->data.size_cb_ref = LUA_NOREF; + d->data.close_cb_ref = LUA_NOREF; + d->data.refresh_cb_ref = LUA_NOREF; + d->data.focus_cb_ref = LUA_NOREF; + d->data.iconify_cb_ref = LUA_NOREF; + d->data.maximize_cb_ref = LUA_NOREF; + d->data.framebuffer_size_cb_ref = LUA_NOREF; + d->data.content_scale_cb_ref = LUA_NOREF; + + glfwSetWindowUserPointer(*window, &(d->data)); + + return window; +} + + +int glfwDefaultWindowHints_bind(lua_State *L) +{ + glfwDefaultWindowHints(); + return 0; +} + + +int glfwWindowHint_bind(lua_State *L) +{ + int hint = luaL_checkinteger(L, 1); + int value = luaL_checkinteger(L, 2); + glfwWindowHint(hint, value); + return 0; +} + + +int glfwWindowHintString_bind(lua_State *L) +{ + int hint = luaL_checkinteger(L, 1); + const char * value = luaL_checkstring(L, 2); + glfwWindowHintString(hint, value); + return 0; +} + + +int glfwCreateWindow_bind(lua_State *L) +{ + int width = luaL_checkinteger(L, 1); + int height = luaL_checkinteger(L, 2); + const char * title = luaL_checkstring(L, 3); + GLFWmonitor ** monitor = luaL_checkudata(L, 4, glfw_monitor_tname); + GLFWwindow ** share = luaL_checkudata(L, 5, glfw_window_tname); + + GLFWwindow ** window = create_window(L); + *window = glfwCreateWindow(width, height, title, *monitor, *share); + return 1; +} + + +int glfwDestroyWindow_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + glfwDestroyWindow(*window); + return 0; +} + + +int glfwWindowShouldClose_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int bind_result = glfwWindowShouldClose(*window); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwSetWindowShouldClose_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int value = luaL_checkinteger(L, 2); + glfwSetWindowShouldClose(*window, value); + return 0; +} + + +int glfwSetWindowTitle_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + const char * title = luaL_checkstring(L, 2); + glfwSetWindowTitle(*window, title); + return 0; +} + + +int glfwSetWindowIcon_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int count = luaL_checkinteger(L, 2); + const GLFWimage * images = lua_touserdata(L, 3); + glfwSetWindowIcon(*window, count, images); + return 0; +} + + +int glfwGetWindowPos_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int xpos, ypos; + glfwGetWindowPos(*window, &xpos, &ypos); + lua_pushinteger(L, xpos); + lua_pushinteger(L, ypos); + return 2; +} + + +int glfwSetWindowPos_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int xpos = luaL_checkinteger(L, 2); + int ypos = luaL_checkinteger(L, 3); + glfwSetWindowPos(*window, xpos, ypos); + return 0; +} + + +int glfwGetWindowSize_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int width, height; + glfwGetWindowSize(*window, &width, &height); + lua_pushinteger(L, width); + lua_pushinteger(L, height); + return 2; +} + + +int glfwSetWindowSizeLimits_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int minwidth = luaL_checkinteger(L, 2); + int minheight = luaL_checkinteger(L, 3); + int maxwidth = luaL_checkinteger(L, 4); + int maxheight = luaL_checkinteger(L, 5); + glfwSetWindowSizeLimits(*window, minwidth, minheight, maxwidth, maxheight); + return 0; +} + + +int glfwSetWindowAspectRatio_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int numer = luaL_checkinteger(L, 2); + int denom = luaL_checkinteger(L, 3); + glfwSetWindowAspectRatio(*window, numer, denom); + return 0; +} + + +int glfwSetWindowSize_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int width = luaL_checkinteger(L, 2); + int height = luaL_checkinteger(L, 3); + glfwSetWindowSize(*window, width, height); + return 0; +} + + +int glfwGetFramebufferSize_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int width, height; + glfwGetFramebufferSize(*window, &width, &height); + lua_pushinteger(L, width); + lua_pushinteger(L, height); + return 2; +} + + +int glfwGetWindowFrameSize_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int left; + int top; + int right; + int bottom; + glfwGetWindowFrameSize(*window, &left, &top, &right, &bottom); + lua_pushnumber(L, left); + lua_pushnumber(L, top); + lua_pushnumber(L, right); + lua_pushnumber(L, bottom); + return 4; +} + + +int glfwGetWindowContentScale_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + float xscale; + float yscale; + glfwGetWindowContentScale(*window, &xscale, &yscale); + lua_pushnumber(L, xscale); + lua_pushnumber(L, yscale); + return 0; +} + + +int glfwGetWindowOpacity_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + float bind_result = glfwGetWindowOpacity(*window); + lua_pushnumber(L, bind_result); + return 1; +} + + +int glfwSetWindowOpacity_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + float opacity = luaL_checknumber(L, 2); + glfwSetWindowOpacity(*window, opacity); + return 0; +} + + +int glfwIconifyWindow_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + glfwIconifyWindow(*window); + return 0; +} + + +int glfwRestoreWindow_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + glfwRestoreWindow(*window); + return 0; +} + + +int glfwMaximizeWindow_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + glfwMaximizeWindow(*window); + return 0; +} + + +int glfwShowWindow_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + glfwShowWindow(*window); + return 0; +} + + +int glfwHideWindow_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + glfwHideWindow(*window); + return 0; +} + + +int glfwFocusWindow_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + glfwFocusWindow(*window); + return 0; +} + + +int glfwRequestWindowAttention_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + glfwRequestWindowAttention(*window); + return 0; +} + + +int glfwGetWindowMonitor_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + GLFWmonitor **monitor = create_monitor(L); + *monitor = glfwGetWindowMonitor(*window); + return 1; +} + + +int glfwSetWindowMonitor_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + GLFWmonitor ** monitor = luaL_checkudata(L, 2, glfw_monitor_tname); + int xpos = luaL_checkinteger(L, 3); + int ypos = luaL_checkinteger(L, 4); + int width = luaL_checkinteger(L, 5); + int height = luaL_checkinteger(L, 6); + int refreshRate = luaL_checkinteger(L, 7); + glfwSetWindowMonitor(*window, *monitor, xpos, ypos, width, height, refreshRate); + return 0; +} + + +int glfwGetWindowAttrib_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int attrib = luaL_checkinteger(L, 2); + int bind_result = glfwGetWindowAttrib(*window, attrib); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glfwSetWindowAttrib_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int attrib = luaL_checkinteger(L, 2); + int value = luaL_checkinteger(L, 3); + glfwSetWindowAttrib(*window, attrib, value); + return 0; +} + + +/* helpers for creating callback setter binds */ +static GLFWwindow ** check_callback_args(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + int type = lua_type(L, 2); + if (type == LUA_TNIL || type == LUA_TFUNCTION) { + return window; + } + else { + luaL_typerror(L, 2, "nil or function"); + } +} + +#define SET_CALLBACK(L, win, setter, cb, key) \ +do { \ + /* get window data */ \ + struct h_glfw_window_data_t *data = glfwGetWindowUserPointer(win); \ + \ + /* push old callback */ \ + lua_rawgeti(L, LUA_REGISTRYINDEX, data->key); \ + \ + /* set new callback */ \ + if (lua_isnil(L, 2)) { \ + /* new "callback" is nil, unset */ \ + setter(win, NULL); \ + data->key = LUA_NOREF; \ + } \ + else { \ + /* new callback is function */ \ + setter(win, cb); \ + lua_pushvalue(L, 2); \ + data->key = luaL_ref(L, LUA_REGISTRYINDEX); \ + } \ +} while(0) + +#define RETRIEVE_CALLBACK(win, key) \ +struct h_glfw_window_data_t *data = glfwGetWindowUserPointer(win); \ +if (data->key == LUA_NOREF) { return; } \ +lua_State *L = data->L; \ +lua_rawgeti(L, LUA_REGISTRYINDEX, data->key); + + +static void h_pos_cb(GLFWwindow *window, int xpos, int ypos) +{ + RETRIEVE_CALLBACK(window, pos_cb_ref); + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushinteger(L, xpos); + lua_pushinteger(L, ypos); + lua_call(L, 3, 0); +} +int glfwSetWindowPosCallback_bind(lua_State *L) +{ + GLFWwindow ** window = check_callback_args(L); + SET_CALLBACK(L, *window, glfwSetWindowPosCallback, h_pos_cb, pos_cb_ref); + return 1; +} + + +static void h_size_cb(GLFWwindow *window, int width, int height) +{ + RETRIEVE_CALLBACK(window, size_cb_ref); + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushinteger(L, width); + lua_pushinteger(L, height); + lua_call(L, 3, 0); +} +int glfwSetWindowSizeCallback_bind(lua_State *L) +{ + GLFWwindow ** window = check_callback_args(L); + SET_CALLBACK(L, *window, glfwSetWindowSizeCallback, h_size_cb, size_cb_ref); + return 1; +} + + +static void h_close_cb(GLFWwindow *window) +{ + RETRIEVE_CALLBACK(window, close_cb_ref); + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_call(L, 1, 0); +} +int glfwSetWindowCloseCallback_bind(lua_State *L) +{ + GLFWwindow ** window = check_callback_args(L); + SET_CALLBACK(L, *window, glfwSetWindowCloseCallback, h_close_cb, close_cb_ref); + return 1; +} + + +static void h_refresh_cb(GLFWwindow *window) +{ + RETRIEVE_CALLBACK(window, refresh_cb_ref); + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_call(L, 1, 0); +} +int glfwSetWindowRefreshCallback_bind(lua_State *L) +{ + GLFWwindow ** window = check_callback_args(L); + SET_CALLBACK(L, *window, glfwSetWindowRefreshCallback, h_refresh_cb, refresh_cb_ref); + return 1; +} + + +static void h_focus_cb(GLFWwindow *window, int focused) +{ + RETRIEVE_CALLBACK(window, focus_cb_ref); + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushinteger(L, focused); + lua_call(L, 2, 0); +} +int glfwSetWindowFocusCallback_bind(lua_State *L) +{ + GLFWwindow ** window = check_callback_args(L); + SET_CALLBACK( + L, *window, + glfwSetWindowFocusCallback, + h_focus_cb, focus_cb_ref + ); + return 1; +} + + +static void h_iconify_cb(GLFWwindow *window, int iconified) +{ + RETRIEVE_CALLBACK(window, iconify_cb_ref); + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushinteger(L, iconified); + lua_call(L, 2, 0); +} +int glfwSetWindowIconifyCallback_bind(lua_State *L) +{ + GLFWwindow ** window = check_callback_args(L); + SET_CALLBACK( + L, *window, + glfwSetWindowIconifyCallback, + h_iconify_cb, iconify_cb_ref + ); + return 1; +} + + +static void h_maximize_cb(GLFWwindow *window, int maximized) +{ + RETRIEVE_CALLBACK(window, maximize_cb_ref); + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushinteger(L, maximized); + lua_call(L, 2, 0); +} +int glfwSetWindowMaximizeCallback_bind(lua_State *L) +{ + GLFWwindow ** window = check_callback_args(L); + SET_CALLBACK( + L, *window, + glfwSetWindowMaximizeCallback, + h_maximize_cb, maximize_cb_ref + ); + return 1; +} + + +static void h_framebuffer_size_cb(GLFWwindow *window, int width, int height) +{ + RETRIEVE_CALLBACK(window, framebuffer_size_cb_ref); + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushinteger(L, width); + lua_pushinteger(L, height); + lua_call(L, 3, 0); +} +int glfwSetFramebufferSizeCallback_bind(lua_State *L) +{ + GLFWwindow ** window = check_callback_args(L); + SET_CALLBACK( + L, *window, + glfwSetFramebufferSizeCallback, + h_framebuffer_size_cb, framebuffer_size_cb_ref + ); + return 1; +} + + +static void h_content_scale_cb(GLFWwindow *window, float xscale, float yscale) +{ + RETRIEVE_CALLBACK(window, content_scale_cb_ref); + lua_rawgeti(L, LUA_REGISTRYINDEX, data->self_ref); + lua_pushnumber(L, xscale); + lua_pushnumber(L, yscale); + lua_call(L, 3, 0); +} +int glfwSetWindowContentScaleCallback_bind(lua_State *L) +{ + GLFWwindow ** window = check_callback_args(L); + SET_CALLBACK( + L, *window, + glfwSetWindowContentScaleCallback, + h_content_scale_cb, content_scale_cb_ref + ); + return 1; +} + + +int glfwPollEvents_bind(lua_State *L) +{ + glfwPollEvents(); + return 0; +} + + +int glfwWaitEvents_bind(lua_State *L) +{ + glfwWaitEvents(); + return 0; +} + + +int glfwWaitEventsTimeout_bind(lua_State *L) +{ + double timeout = luaL_checknumber(L, 1); + glfwWaitEventsTimeout(timeout); + return 0; +} + + +int glfwPostEmptyEvent_bind(lua_State *L) +{ + glfwPostEmptyEvent(); + return 0; +} + + +int glfwSwapBuffers_bind(lua_State *L) +{ + GLFWwindow ** window = luaL_checkudata(L, 1, glfw_window_tname); + glfwSwapBuffers(*window); + return 0; +} diff --git a/src/audio/CMakeLists.txt b/src/miniaudio/CMakeLists.txt index c4b333c..c4b333c 100644 --- a/src/audio/CMakeLists.txt +++ b/src/miniaudio/CMakeLists.txt diff --git a/src/audio/audio.h b/src/miniaudio/audio.h index 0ea02d0..0ea02d0 100644 --- a/src/audio/audio.h +++ b/src/miniaudio/audio.h diff --git a/src/audio/bind b/src/miniaudio/bind index 3a9befe..3a9befe 100644 --- a/src/audio/bind +++ b/src/miniaudio/bind diff --git a/src/audio/bind.bind b/src/miniaudio/bind.bind index 41fddd6..41fddd6 100644 --- a/src/audio/bind.bind +++ b/src/miniaudio/bind.bind diff --git a/src/audio/engine.c b/src/miniaudio/engine.c index ec43728..ec43728 100644 --- a/src/audio/engine.c +++ b/src/miniaudio/engine.c diff --git a/src/audio/impl.c b/src/miniaudio/impl.c index 5e8969a..5e8969a 100644 --- a/src/audio/impl.c +++ b/src/miniaudio/impl.c diff --git a/src/audio/setup.c b/src/miniaudio/setup.c index 774bf39..774bf39 100644 --- a/src/audio/setup.c +++ b/src/miniaudio/setup.c diff --git a/src/audio/sound.c b/src/miniaudio/sound.c index 334a08a..334a08a 100644 --- a/src/audio/sound.c +++ b/src/miniaudio/sound.c diff --git a/src/audio/sound_group.c b/src/miniaudio/sound_group.c index c52b3be..c52b3be 100644 --- a/src/audio/sound_group.c +++ b/src/miniaudio/sound_group.c diff --git a/src/modules.h b/src/modules.h index bfe1de5..29ab6b1 100644 --- a/src/modules.h +++ b/src/modules.h @@ -6,6 +6,7 @@ #define HONEY_MODULES \ X(audio) \ X(gl) \ + X(glfw) \ X(glm) \ X(image) \ X(import) \ diff --git a/src/gl/CMakeLists.txt b/src/opengl/CMakeLists.txt index 4328596..4328596 100644 --- a/src/gl/CMakeLists.txt +++ b/src/opengl/CMakeLists.txt diff --git a/src/opengl/bind.h b/src/opengl/bind.h new file mode 100644 index 0000000..7b0f265 --- /dev/null +++ b/src/opengl/bind.h @@ -0,0 +1,1818 @@ +#ifndef HONEY_GL_H +#define HONEY_GL_H + +#include <lua.h> + +#define GL_FUNCTIONS \ + X("ActiveShaderProgram", glActiveShaderProgram_bind) \ + X("ActiveTexture", glActiveTexture_bind) \ + X("AttachShader", glAttachShader_bind) \ + X("BeginConditionalRender", glBeginConditionalRender_bind) \ + X("BeginQuery", glBeginQuery_bind) \ + X("BeginQuery", glBeginQuery_bind) \ + X("BeginTransformFeedback", glBeginTransformFeedback_bind) \ + X("BindAttribLocation", glBindAttribLocation_bind) \ + X("BindBuffer", glBindBuffer_bind) \ + X("BindBufferBase", glBindBufferBase_bind) \ + X("BindBufferRange", glBindBufferRange_bind) \ + X("BindFragDataLocation", glBindFragDataLocation_bind) \ + X("BindFragDataLocationIndexed", glBindFragDataLocationIndexed_bind) \ + X("BindFramebuffer", glBindFramebuffer_bind) \ + X("BindImageTexture", glBindImageTexture_bind) \ + X("BindProgramPipeline", glBindProgramPipeline_bind) \ + X("BindRenderbuffer", glBindRenderbuffer_bind) \ + X("BindSampler", glBindSampler_bind) \ + X("BindTexture", glBindTexture_bind) \ + X("BindTextureUnit", glBindTextureUnit_bind) \ + X("BindTransformFeedback", glBindTransformFeedback_bind) \ + X("BindVertexArray", glBindVertexArray_bind) \ + X("BindVertexBuffer", glBindVertexBuffer_bind) \ + X("BlendColor", glBlendColor_bind) \ + X("BlendEquation", glBlendEquation_bind) \ + X("BlendEquationi", glBlendEquationi_bind) \ + X("BlendEquationSeparate", glBlendEquationSeparate_bind) \ + X("BlendEquationSeparatei", glBlendEquationSeparatei_bind) \ + X("BlendFunc", glBlendFunc_bind) \ + X("BlendFunci", glBlendFunci_bind) \ + X("BlendFuncSeparate", glBlendFuncSeparate_bind) \ + X("BlendFuncSeparatei", glBlendFuncSeparatei_bind) \ + X("BlitFramebuffer", glBlitFramebuffer_bind) \ + X("BlitNamedFramebuffer", glBlitNamedFramebuffer_bind) \ + X("BufferData", glBufferData_bind) \ + X("BufferStorage", glBufferStorage_bind) \ + X("BufferSubData", glBufferSubData_bind) \ + X("CheckFramebufferStatus", glCheckFramebufferStatus_bind) \ + X("CheckNamedFramebufferStatus", glCheckNamedFramebufferStatus_bind) \ + X("ClampColor", glClampColor_bind) \ + X("Clear", glClear_bind) \ + X("ClearBufferiv", glClearBufferiv_bind) \ + X("ClearBufferuiv", glClearBufferuiv_bind) \ + X("ClearBufferfv", glClearBufferfv_bind) \ + X("ClearBufferfi", glClearBufferfi_bind) \ + X("ClearStencil", glClearStencil_bind) \ + X("ClientWaitSync", glClientWaitSync_bind) \ + X("ColorMask", glColorMask_bind) \ + X("ColorMaski", glColorMaski_bind) \ + X("CompileShader", glCompileShader_bind) \ + X("CompressedTexImage1D", glCompressedTexImage1D_bind) \ + X("CompressedTexImage2D", glCompressedTexImage2D_bind) \ + X("CompressedTexImage3D", glCompressedTexImage3D_bind) \ + X("CompressedTexSubImage1D", glCompressedTexSubImage1D_bind) \ + X("CompressedTexSubImage2D", glCompressedTexSubImage2D_bind) \ + X("CompressedTexSubImage3D", glCompressedTexSubImage3D_bind) \ + X("CopyBufferSubData", glCopyBufferSubData_bind) \ + X("CopyBufferSubData", glCopyBufferSubData_bind) \ + X("CopyTexImage1D", glCopyTexImage1D_bind) \ + X("CopyTexImage2D", glCopyTexImage2D_bind) \ + X("CopyTexSubImage1D", glCopyTexSubImage1D_bind) \ + X("CopyTexSubImage2D", glCopyTexSubImage2D_bind) \ + X("CopyTexSubImage3D", glCopyTexSubImage3D_bind) \ + X("CreateProgram", glCreateProgram_bind) \ + X("CreateShader", glCreateShader_bind) \ + X("CreateShaderProgramv", glCreateShaderProgramv_bind) \ + X("CullFace", glCullFace_bind) \ + X("DeleteBuffers", glDeleteBuffers_bind) \ + X("DeleteFramebuffers", glDeleteFramebuffers_bind) \ + X("DeleteProgram", glDeleteProgram_bind) \ + X("DeleteProgramPipelines", glDeleteProgramPipelines_bind) \ + X("DeleteQueries", glDeleteQueries_bind) \ + X("DeleteRenderbuffers", glDeleteRenderbuffers_bind) \ + X("DeleteSamplers", glDeleteSamplers_bind) \ + X("DeleteShader", glDeleteShader_bind) \ + X("DeleteSync", glDeleteSync_bind) \ + X("DeleteTextures", glDeleteTextures_bind) \ + X("DeleteTransformFeedbacks", glDeleteTransformFeedbacks_bind) \ + X("DeleteVertexArrays", glDeleteVertexArrays_bind) \ + X("DepthFunc", glDepthFunc_bind) \ + X("DepthMask", glDepthMask_bind) \ + X("DepthRange", glDepthRange_bind) \ + X("DepthRangef", glDepthRangef_bind) \ + X("DepthRangeArrayv", glDepthRangeArrayv_bind) \ + X("DepthRangeIndexed", glDepthRangeIndexed_bind) \ + X("DetachShader", glDetachShader_bind) \ + X("Disable", glDisable_bind) \ + X("Disablei", glDisablei_bind) \ + X("DisableVertexAttribArray", glDisableVertexAttribArray_bind) \ + X("DrawArrays", glDrawArrays_bind) \ + X("DrawArraysIndirect", glDrawArraysIndirect_bind) \ + X("DrawArraysInstanced", glDrawArraysInstanced_bind) \ + X("DrawBuffer", glDrawBuffer_bind) \ + X("DrawBuffers", glDrawBuffers_bind) \ + X("DrawElements", glDrawElements_bind) \ + X("DrawElementsBaseVertex", glDrawElementsBaseVertex_bind) \ + X("DrawElementsIndirect", glDrawElementsIndirect_bind) \ + X("DrawElementsInstanced", glDrawElementsInstanced_bind) \ + X("DrawRangeElements", glDrawRangeElements_bind) \ + X("DrawRangeElementsBaseVertex", glDrawRangeElementsBaseVertex_bind) \ + X("DrawTransformFeedback", glDrawTransformFeedback_bind) \ + X("DrawTransformFeedbackStream", glDrawTransformFeedbackStream_bind) \ + X("Enable", glEnable_bind) \ + X("Enablei", glEnablei_bind) \ + X("EnableVertexAttribArray", glEnableVertexAttribArray_bind) \ + X("EndConditionalRender", glEndConditionalRender_bind) \ + X("EndQuery", glEndQuery_bind) \ + X("EndQueryIndexed", glEndQueryIndexed_bind) \ + X("EndTransformFeedback", glEndTransformFeedback_bind) \ + X("FenceSync", glFenceSync_bind) \ + X("Finish", glFinish_bind) \ + X("Flush", glFlush_bind) \ + X("FlushMappedBufferRange", glFlushMappedBufferRange_bind) \ + X("FramebufferRenderbuffer", glFramebufferRenderbuffer_bind) \ + X("FramebufferTexture", glFramebufferTexture_bind) \ + X("FramebufferTexture1D", glFramebufferTexture1D_bind) \ + X("FramebufferTexture2D", glFramebufferTexture2D_bind) \ + X("FramebufferTexture3D", glFramebufferTexture3D_bind) \ + X("FramebufferTextureLayer", glFramebufferTextureLayer_bind) \ + X("FrontFace", glFrontFace_bind) \ + X("GenBuffers", glGenBuffers_bind) \ + X("GenerateMipmap", glGenerateMipmap_bind) \ + X("GenFramebuffers", glGenFramebuffers_bind) \ + X("GenProgramPipelines", glGenProgramPipelines_bind) \ + X("GenQueries", glGenQueries_bind) \ + X("GenRenderbuffers", glGenRenderbuffers_bind) \ + X("GenSamplers", glGenSamplers_bind) \ + X("GenTextures", glGenTextures_bind) \ + X("GenTransformFeedbacks", glGenTransformFeedbacks_bind) \ + X("GenVertexArrays", glGenVertexArrays_bind) \ + X("GetBooleanv", glGetBooleanv_bind) \ + X("GetDoublev", glGetDoublev_bind) \ + X("GetFloatv", glGetFloatv_bind) \ + X("GetIntegerv", glGetIntegerv_bind) \ + X("GetInteger64v", glGetInteger64v_bind) \ + X("GetBooleani_v", glGetBooleani_v_bind) \ + X("GetIntegeri_v", glGetIntegeri_v_bind) \ + X("GetFloati_v", glGetFloati_v_bind) \ + X("GetDoublei_v", glGetDoublei_v_bind) \ + X("GetInteger64i_v", glGetInteger64i_v_bind) \ + X("GetActiveAttrib", glGetActiveAttrib_bind) \ + X("GetActiveSubroutineName", glGetActiveSubroutineName_bind) \ + X("GetActiveSubroutineUniformiv", glGetActiveSubroutineUniformiv_bind) \ + X("GetActiveSubroutineUniformName", glGetActiveSubroutineUniformName_bind) \ + X("GetActiveUniform", glGetActiveUniform_bind) \ + X("GetActiveUniformBlockiv", glGetActiveUniformBlockiv_bind) \ + X("GetActiveUniformBlockName", glGetActiveUniformBlockName_bind) \ + X("GetActiveUniformName", glGetActiveUniformName_bind) \ + X("GetActiveUniformsiv", glGetActiveUniformsiv_bind) \ + X("GetAttachedShaders", glGetAttachedShaders_bind) \ + X("GetAttribLocation", glGetAttribLocation_bind) \ + X("GetBufferParameteriv", glGetBufferParameteriv_bind) \ + X("GetBufferParameteri64v", glGetBufferParameteri64v_bind) \ + X("GetBufferPointerv", glGetBufferPointerv_bind) \ + X("GetBufferSubData", glGetBufferSubData_bind) \ + X("GetCompressedTexImage", glGetCompressedTexImage_bind) \ + X("GetError", glGetError_bind) \ + X("GetFragDataIndex", glGetFragDataIndex_bind) \ + X("GetFragDataLocation", glGetFragDataLocation_bind) \ + X("GetFramebufferAttachmentParameteriv", glGetFramebufferAttachmentParameteriv_bind) \ + X("GetMultisamplefv", glGetMultisamplefv_bind) \ + X("GetUniformfv", glGetUniformfv_bind) \ + X("GetUniformiv", glGetUniformiv_bind) \ + X("GetUniformuiv", glGetUniformuiv_bind) \ + X("GetUniformdv", glGetUniformdv_bind) \ + X("GetProgramiv", glGetProgramiv_bind) \ + X("GetProgramBinary", glGetProgramBinary_bind) \ + X("GetProgramInfoLog", glGetProgramInfoLog_bind) \ + X("GetProgramPipelineiv", glGetProgramPipelineiv_bind) \ + X("GetProgramPipelineInfoLog", glGetProgramPipelineInfoLog_bind) \ + X("GetProgramPipelineiv", glGetProgramPipelineiv_bind) \ + X("GetProgramStageiv", glGetProgramStageiv_bind) \ + X("GetQueryIndexediv", glGetQueryIndexediv_bind) \ + X("GetQueryiv", glGetQueryiv_bind) \ + X("GetRenderbufferParameteriv", glGetRenderbufferParameteriv_bind) \ + X("GetSamplerParameterfv", glGetSamplerParameterfv_bind) \ + X("GetSamplerParameteriv", glGetSamplerParameteriv_bind) \ + X("GetSamplerParameterIiv", glGetSamplerParameterIiv_bind) \ + X("GetSamplerParameterIuiv", glGetSamplerParameterIuiv_bind) \ + X("GetShaderiv", glGetShaderiv_bind) \ + X("GetShaderInfoLog", glGetShaderInfoLog_bind) \ + X("GetShaderiv", glGetShaderiv_bind) \ + X("GetShaderPrecisionFormat", glGetShaderPrecisionFormat_bind) \ + X("GetShaderSource", glGetShaderSource_bind) \ + X("GetString", glGetString_bind) \ + X("GetStringi", glGetStringi_bind) \ + X("GetSubroutineIndex", glGetSubroutineIndex_bind) \ + X("GetSubroutineUniformLocation", glGetSubroutineUniformLocation_bind) \ + X("GetSynciv", glGetSynciv_bind) \ + X("GetTexImage", glGetTexImage_bind) \ + X("GetTexLevelParameterfv", glGetTexLevelParameterfv_bind) \ + X("GetTexLevelParameteriv", glGetTexLevelParameteriv_bind) \ + X("GetTexParameterfv", glGetTexParameterfv_bind) \ + X("GetTexParameteriv", glGetTexParameteriv_bind) \ + X("GetTexParameterIiv", glGetTexParameterIiv_bind) \ + X("GetTexParameterIuiv", glGetTexParameterIuiv_bind) \ + X("GetTransformFeedbackVarying", glGetTransformFeedbackVarying_bind) \ + X("GetUniformBlockIndex", glGetUniformBlockIndex_bind) \ + X("GetUniformIndices", glGetUniformIndices_bind) \ + X("GetUniformLocation", glGetUniformLocation_bind) \ + X("GetUniformSubroutineuiv", glGetUniformSubroutineuiv_bind) \ + X("GetVertexAttribdv", glGetVertexAttribdv_bind) \ + X("GetVertexAttribfv", glGetVertexAttribfv_bind) \ + X("GetVertexAttribiv", glGetVertexAttribiv_bind) \ + X("GetVertexAttribIiv", glGetVertexAttribIiv_bind) \ + X("GetVertexAttribIuiv", glGetVertexAttribIuiv_bind) \ + X("GetVertexAttribLdv", glGetVertexAttribLdv_bind) \ + X("GetVertexAttribPointerv", glGetVertexAttribPointerv_bind) \ + X("Hint", glHint_bind) \ + X("IsBuffer", glIsBuffer_bind) \ + X("IsEnabled", glIsEnabled_bind) \ + X("IsEnabledi", glIsEnabledi_bind) \ + X("IsFramebuffer", glIsFramebuffer_bind) \ + X("IsProgram", glIsProgram_bind) \ + X("IsProgramPipeline", glIsProgramPipeline_bind) \ + X("IsQuery", glIsQuery_bind) \ + X("IsRenderbuffer", glIsRenderbuffer_bind) \ + X("IsSampler", glIsSampler_bind) \ + X("IsShader", glIsShader_bind) \ + X("IsSync", glIsSync_bind) \ + X("IsTexture", glIsTexture_bind) \ + X("IsTransformFeedback", glIsTransformFeedback_bind) \ + X("IsVertexArray", glIsVertexArray_bind) \ + X("LineWidth", glLineWidth_bind) \ + X("LinkProgram", glLinkProgram_bind) \ + X("LogicOp", glLogicOp_bind) \ + X("MapBuffer", glMapBuffer_bind) \ + X("MapBufferRange", glMapBufferRange_bind) \ + X("MinSampleShading", glMinSampleShading_bind) \ + X("MultiDrawArrays", glMultiDrawArrays_bind) \ + X("MultiDrawElements", glMultiDrawElements_bind) \ + X("MultiDrawElementsBaseVertex", glMultiDrawElementsBaseVertex_bind) \ + X("PatchParameteri", glPatchParameteri_bind) \ + X("PatchParameterfv", glPatchParameterfv_bind) \ + X("PauseTransformFeedback", glPauseTransformFeedback_bind) \ + X("PixelStoref", glPixelStoref_bind) \ + X("PixelStorei", glPixelStorei_bind) \ + X("PointParameterf", glPointParameterf_bind) \ + X("PointParameteri", glPointParameteri_bind) \ + X("PointParameterfv", glPointParameterfv_bind) \ + X("PointParameteriv", glPointParameteriv_bind) \ + X("PointSize", glPointSize_bind) \ + X("PolygonMode", glPolygonMode_bind) \ + X("PolygonOffset", glPolygonOffset_bind) \ + X("PrimitiveRestartIndex", glPrimitiveRestartIndex_bind) \ + X("ProgramBinary", glProgramBinary_bind) \ + X("ProgramParameteri", glProgramParameteri_bind) \ + X("ProgramUniform1f", glProgramUniform1f_bind) \ + X("ProgramUniform2f", glProgramUniform2f_bind) \ + X("ProgramUniform3f", glProgramUniform3f_bind) \ + X("ProgramUniform4f", glProgramUniform4f_bind) \ + X("ProgramUniform1i", glProgramUniform1i_bind) \ + X("ProgramUniform2i", glProgramUniform2i_bind) \ + X("ProgramUniform3i", glProgramUniform3i_bind) \ + X("ProgramUniform4i", glProgramUniform4i_bind) \ + X("ProgramUniform1ui", glProgramUniform1ui_bind) \ + X("ProgramUniform2ui", glProgramUniform2ui_bind) \ + X("ProgramUniform3ui", glProgramUniform3ui_bind) \ + X("ProgramUniform4ui", glProgramUniform4ui_bind) \ + X("ProgramUniform1fv", glProgramUniform1fv_bind) \ + X("ProgramUniform2fv", glProgramUniform2fv_bind) \ + X("ProgramUniform3fv", glProgramUniform3fv_bind) \ + X("ProgramUniform4fv", glProgramUniform4fv_bind) \ + X("ProgramUniform1iv", glProgramUniform1iv_bind) \ + X("ProgramUniform2iv", glProgramUniform2iv_bind) \ + X("ProgramUniform3iv", glProgramUniform3iv_bind) \ + X("ProgramUniform4iv", glProgramUniform4iv_bind) \ + X("ProgramUniform1uiv", glProgramUniform1uiv_bind) \ + X("ProgramUniform2uiv", glProgramUniform2uiv_bind) \ + X("ProgramUniform3uiv", glProgramUniform3uiv_bind) \ + X("ProgramUniform4uiv", glProgramUniform4uiv_bind) \ + X("ProgramUniformMatrix2fv", glProgramUniformMatrix2fv_bind) \ + X("ProgramUniformMatrix3fv", glProgramUniformMatrix3fv_bind) \ + X("ProgramUniformMatrix4fv", glProgramUniformMatrix4fv_bind) \ + X("ProgramUniformMatrix2x3fv", glProgramUniformMatrix2x3fv_bind) \ + X("ProgramUniformMatrix3x2fv", glProgramUniformMatrix3x2fv_bind) \ + X("ProgramUniformMatrix2x4fv", glProgramUniformMatrix2x4fv_bind) \ + X("ProgramUniformMatrix4x2fv", glProgramUniformMatrix4x2fv_bind) \ + X("ProgramUniformMatrix3x4fv", glProgramUniformMatrix3x4fv_bind) \ + X("ProgramUniformMatrix4x3fv", glProgramUniformMatrix4x3fv_bind) \ + X("ProvokingVertex", glProvokingVertex_bind) \ + X("QueryCounter", glQueryCounter_bind) \ + X("ReadBuffer", glReadBuffer_bind) \ + X("ReadPixels", glReadPixels_bind) \ + X("ReleaseShaderCompiler", glReleaseShaderCompiler_bind) \ + X("RenderbufferStorage", glRenderbufferStorage_bind) \ + X("RenderbufferStorageMultisample", glRenderbufferStorageMultisample_bind) \ + X("ResumeTransformFeedback", glResumeTransformFeedback_bind) \ + X("SampleCoverage", glSampleCoverage_bind) \ + X("SampleMaski", glSampleMaski_bind) \ + X("SamplerParameterf", glSamplerParameterf_bind) \ + X("SamplerParameteri", glSamplerParameteri_bind) \ + X("SamplerParameterfv", glSamplerParameterfv_bind) \ + X("SamplerParameteriv", glSamplerParameteriv_bind) \ + X("SamplerParameterIiv", glSamplerParameterIiv_bind) \ + X("SamplerParameterIuiv", glSamplerParameterIuiv_bind) \ + X("Scissor", glScissor_bind) \ + X("ScissorArrayv", glScissorArrayv_bind) \ + X("ScissorIndexed", glScissorIndexed_bind) \ + X("ScissorIndexedv", glScissorIndexedv_bind) \ + X("ShaderBinary", glShaderBinary_bind) \ + X("ShaderSource", glShaderSource_bind) \ + X("StencilFunc", glStencilFunc_bind) \ + X("StencilFuncSeparate", glStencilFuncSeparate_bind) \ + X("StencilMask", glStencilMask_bind) \ + X("StencilMaskSeparate", glStencilMaskSeparate_bind) \ + X("StencilOp", glStencilOp_bind) \ + X("StencilOpSeparate", glStencilOpSeparate_bind) \ + X("TexBuffer", glTexBuffer_bind) \ + X("TexImage1D", glTexImage1D_bind) \ + X("TexImage2D", glTexImage2D_bind) \ + X("TexImage2DMultisample", glTexImage2DMultisample_bind) \ + X("TexImage3D", glTexImage3D_bind) \ + X("TexImage3DMultisample", glTexImage3DMultisample_bind) \ + X("TexParameterf", glTexParameterf_bind) \ + X("TexParameteri", glTexParameteri_bind) \ + X("TexParameterfv", glTexParameterfv_bind) \ + X("TexParameteriv", glTexParameteriv_bind) \ + X("TexParameterIiv", glTexParameterIiv_bind) \ + X("TexParameterIuiv", glTexParameterIuiv_bind) \ + X("TexSubImage1D", glTexSubImage1D_bind) \ + X("TexSubImage2D", glTexSubImage2D_bind) \ + X("TexSubImage3D", glTexSubImage3D_bind) \ + X("TransformFeedbackVaryings", glTransformFeedbackVaryings_bind) \ + X("Uniform1f", glUniform1f_bind) \ + X("Uniform2f", glUniform2f_bind) \ + X("Uniform3f", glUniform3f_bind) \ + X("Uniform4f", glUniform4f_bind) \ + X("Uniform1i", glUniform1i_bind) \ + X("Uniform2i", glUniform2i_bind) \ + X("Uniform3i", glUniform3i_bind) \ + X("Uniform4i", glUniform4i_bind) \ + X("Uniform1ui", glUniform1ui_bind) \ + X("Uniform2ui", glUniform2ui_bind) \ + X("Uniform3ui", glUniform3ui_bind) \ + X("Uniform4ui", glUniform4ui_bind) \ + X("Uniform1fv", glUniform1fv_bind) \ + X("Uniform2fv", glUniform2fv_bind) \ + X("Uniform3fv", glUniform3fv_bind) \ + X("Uniform4fv", glUniform4fv_bind) \ + X("Uniform1iv", glUniform1iv_bind) \ + X("Uniform2iv", glUniform2iv_bind) \ + X("Uniform3iv", glUniform3iv_bind) \ + X("Uniform4iv", glUniform4iv_bind) \ + X("Uniform1uiv", glUniform1uiv_bind) \ + X("Uniform2uiv", glUniform2uiv_bind) \ + X("Uniform3uiv", glUniform3uiv_bind) \ + X("Uniform4uiv", glUniform4uiv_bind) \ + X("UniformMatrix2fv", glUniformMatrix2fv_bind) \ + X("UniformMatrix3fv", glUniformMatrix3fv_bind) \ + X("UniformMatrix4fv", glUniformMatrix4fv_bind) \ + X("UniformMatrix2x3fv", glUniformMatrix2x3fv_bind) \ + X("UniformMatrix3x2fv", glUniformMatrix3x2fv_bind) \ + X("UniformMatrix2x4fv", glUniformMatrix2x4fv_bind) \ + X("UniformMatrix4x2fv", glUniformMatrix4x2fv_bind) \ + X("UniformMatrix3x4fv", glUniformMatrix3x4fv_bind) \ + X("UniformMatrix4x3fv", glUniformMatrix4x3fv_bind) \ + X("UniformSubroutinesuiv", glUniformSubroutinesuiv_bind) \ + X("UnmapBuffer", glUnmapBuffer_bind) \ + X("UseProgram", glUseProgram_bind) \ + X("UseProgramStages", glUseProgramStages_bind) \ + X("ValidateProgram", glValidateProgram_bind) \ + X("ValidateProgramPipeline", glValidateProgramPipeline_bind) \ + X("VertexAttrib1f", glVertexAttrib1f_bind) \ + X("VertexAttrib1s", glVertexAttrib1s_bind) \ + X("VertexAttrib1d", glVertexAttrib1d_bind) \ + X("VertexAttribI1i", glVertexAttribI1i_bind) \ + X("VertexAttribI1ui", glVertexAttribI1ui_bind) \ + X("VertexAttrib2f", glVertexAttrib2f_bind) \ + X("VertexAttrib2s", glVertexAttrib2s_bind) \ + X("VertexAttrib2d", glVertexAttrib2d_bind) \ + X("VertexAttribI2i", glVertexAttribI2i_bind) \ + X("VertexAttribI2ui", glVertexAttribI2ui_bind) \ + X("VertexAttrib3f", glVertexAttrib3f_bind) \ + X("VertexAttrib3s", glVertexAttrib3s_bind) \ + X("VertexAttrib3d", glVertexAttrib3d_bind) \ + X("VertexAttribI3i", glVertexAttribI3i_bind) \ + X("VertexAttribI3ui", glVertexAttribI3ui_bind) \ + X("VertexAttrib4f", glVertexAttrib4f_bind) \ + X("VertexAttrib4s", glVertexAttrib4s_bind) \ + X("VertexAttrib4d", glVertexAttrib4d_bind) \ + X("VertexAttrib4Nub", glVertexAttrib4Nub_bind) \ + X("VertexAttribI4i", glVertexAttribI4i_bind) \ + X("VertexAttribI4ui", glVertexAttribI4ui_bind) \ + X("VertexAttribL1d", glVertexAttribL1d_bind) \ + X("VertexAttribL2d", glVertexAttribL2d_bind) \ + X("VertexAttribL3d", glVertexAttribL3d_bind) \ + X("VertexAttribL4d", glVertexAttribL4d_bind) \ + X("VertexAttrib1fv", glVertexAttrib1fv_bind) \ + X("VertexAttrib1sv", glVertexAttrib1sv_bind) \ + X("VertexAttrib1dv", glVertexAttrib1dv_bind) \ + X("VertexAttribI1iv", glVertexAttribI1iv_bind) \ + X("VertexAttribI1uiv", glVertexAttribI1uiv_bind) \ + X("VertexAttrib2fv", glVertexAttrib2fv_bind) \ + X("VertexAttrib2sv", glVertexAttrib2sv_bind) \ + X("VertexAttrib2dv", glVertexAttrib2dv_bind) \ + X("VertexAttribI2iv", glVertexAttribI2iv_bind) \ + X("VertexAttribI2uiv", glVertexAttribI2uiv_bind) \ + X("VertexAttrib3fv", glVertexAttrib3fv_bind) \ + X("VertexAttrib3sv", glVertexAttrib3sv_bind) \ + X("VertexAttrib3dv", glVertexAttrib3dv_bind) \ + X("VertexAttribI3iv", glVertexAttribI3iv_bind) \ + X("VertexAttribI3uiv", glVertexAttribI3uiv_bind) \ + X("VertexAttrib4fv", glVertexAttrib4fv_bind) \ + X("VertexAttrib4sv", glVertexAttrib4sv_bind) \ + X("VertexAttrib4dv", glVertexAttrib4dv_bind) \ + X("VertexAttrib4iv", glVertexAttrib4iv_bind) \ + X("VertexAttrib4bv", glVertexAttrib4bv_bind) \ + X("VertexAttrib4ubv", glVertexAttrib4ubv_bind) \ + X("VertexAttrib4usv", glVertexAttrib4usv_bind) \ + X("VertexAttrib4uiv", glVertexAttrib4uiv_bind) \ + X("VertexAttrib4Nbv", glVertexAttrib4Nbv_bind) \ + X("VertexAttrib4Nsv", glVertexAttrib4Nsv_bind) \ + X("VertexAttrib4Niv", glVertexAttrib4Niv_bind) \ + X("VertexAttrib4Nubv", glVertexAttrib4Nubv_bind) \ + X("VertexAttrib4Nusv", glVertexAttrib4Nusv_bind) \ + X("VertexAttrib4Nuiv", glVertexAttrib4Nuiv_bind) \ + X("VertexAttribI4bv", glVertexAttribI4bv_bind) \ + X("VertexAttribI4ubv", glVertexAttribI4ubv_bind) \ + X("VertexAttribI4sv", glVertexAttribI4sv_bind) \ + X("VertexAttribI4usv", glVertexAttribI4usv_bind) \ + X("VertexAttribI4iv", glVertexAttribI4iv_bind) \ + X("VertexAttribI4uiv", glVertexAttribI4uiv_bind) \ + X("VertexAttribL1dv", glVertexAttribL1dv_bind) \ + X("VertexAttribL2dv", glVertexAttribL2dv_bind) \ + X("VertexAttribL3dv", glVertexAttribL3dv_bind) \ + X("VertexAttribL4dv", glVertexAttribL4dv_bind) \ + X("VertexAttribP1ui", glVertexAttribP1ui_bind) \ + X("VertexAttribP2ui", glVertexAttribP2ui_bind) \ + X("VertexAttribP3ui", glVertexAttribP3ui_bind) \ + X("VertexAttribP4ui", glVertexAttribP4ui_bind) \ + X("VertexAttribPointer", glVertexAttribPointer_bind) \ + X("VertexAttribIPointer", glVertexAttribIPointer_bind) \ + X("Viewport", glViewport_bind) \ + X("ViewportArrayv", glViewportArrayv_bind) \ + X("ViewportIndexedf", glViewportIndexedf_bind) \ + X("ViewportIndexedfv", glViewportIndexedfv_bind) \ + X("WaitSync", glWaitSync_bind) \ + + +#define GL_ENUM \ + X("DEPTH_BUFFER_BIT", GL_DEPTH_BUFFER_BIT) \ + X("STENCIL_BUFFER_BIT", GL_STENCIL_BUFFER_BIT) \ + X("COLOR_BUFFER_BIT", GL_COLOR_BUFFER_BIT) \ + X("FALSE", GL_FALSE) \ + X("TRUE", GL_TRUE) \ + X("POINTS", GL_POINTS) \ + X("LINES", GL_LINES) \ + X("LINE_LOOP", GL_LINE_LOOP) \ + X("LINE_STRIP", GL_LINE_STRIP) \ + X("TRIANGLES", GL_TRIANGLES) \ + X("TRIANGLE_STRIP", GL_TRIANGLE_STRIP) \ + X("TRIANGLE_FAN", GL_TRIANGLE_FAN) \ + X("QUADS", GL_QUADS) \ + X("NEVER", GL_NEVER) \ + X("LESS", GL_LESS) \ + X("EQUAL", GL_EQUAL) \ + X("LEQUAL", GL_LEQUAL) \ + X("GREATER", GL_GREATER) \ + X("NOTEQUAL", GL_NOTEQUAL) \ + X("GEQUAL", GL_GEQUAL) \ + X("ALWAYS", GL_ALWAYS) \ + X("ZERO", GL_ZERO) \ + X("ONE", GL_ONE) \ + X("SRC_COLOR", GL_SRC_COLOR) \ + X("ONE_MINUS_SRC_COLOR", GL_ONE_MINUS_SRC_COLOR) \ + X("SRC_ALPHA", GL_SRC_ALPHA) \ + X("ONE_MINUS_SRC_ALPHA", GL_ONE_MINUS_SRC_ALPHA) \ + X("DST_ALPHA", GL_DST_ALPHA) \ + X("ONE_MINUS_DST_ALPHA", GL_ONE_MINUS_DST_ALPHA) \ + X("DST_COLOR", GL_DST_COLOR) \ + X("ONE_MINUS_DST_COLOR", GL_ONE_MINUS_DST_COLOR) \ + X("SRC_ALPHA_SATURATE", GL_SRC_ALPHA_SATURATE) \ + X("NONE", GL_NONE) \ + X("FRONT_LEFT", GL_FRONT_LEFT) \ + X("FRONT_RIGHT", GL_FRONT_RIGHT) \ + X("BACK_LEFT", GL_BACK_LEFT) \ + X("BACK_RIGHT", GL_BACK_RIGHT) \ + X("FRONT", GL_FRONT) \ + X("BACK", GL_BACK) \ + X("LEFT", GL_LEFT) \ + X("RIGHT", GL_RIGHT) \ + X("FRONT_AND_BACK", GL_FRONT_AND_BACK) \ + X("NO_ERROR", GL_NO_ERROR) \ + X("INVALID_ENUM", GL_INVALID_ENUM) \ + X("INVALID_VALUE", GL_INVALID_VALUE) \ + X("INVALID_OPERATION", GL_INVALID_OPERATION) \ + X("OUT_OF_MEMORY", GL_OUT_OF_MEMORY) \ + X("CW", GL_CW) \ + X("CCW", GL_CCW) \ + X("POINT_SIZE", GL_POINT_SIZE) \ + X("POINT_SIZE_RANGE", GL_POINT_SIZE_RANGE) \ + X("POINT_SIZE_GRANULARITY", GL_POINT_SIZE_GRANULARITY) \ + X("LINE_SMOOTH", GL_LINE_SMOOTH) \ + X("LINE_WIDTH", GL_LINE_WIDTH) \ + X("LINE_WIDTH_RANGE", GL_LINE_WIDTH_RANGE) \ + X("LINE_WIDTH_GRANULARITY", GL_LINE_WIDTH_GRANULARITY) \ + X("POLYGON_MODE", GL_POLYGON_MODE) \ + X("POLYGON_SMOOTH", GL_POLYGON_SMOOTH) \ + X("CULL_FACE", GL_CULL_FACE) \ + X("CULL_FACE_MODE", GL_CULL_FACE_MODE) \ + X("FRONT_FACE", GL_FRONT_FACE) \ + X("DEPTH_RANGE", GL_DEPTH_RANGE) \ + X("DEPTH_TEST", GL_DEPTH_TEST) \ + X("DEPTH_WRITEMASK", GL_DEPTH_WRITEMASK) \ + X("DEPTH_CLEAR_VALUE", GL_DEPTH_CLEAR_VALUE) \ + X("DEPTH_FUNC", GL_DEPTH_FUNC) \ + X("STENCIL_TEST", GL_STENCIL_TEST) \ + X("STENCIL_CLEAR_VALUE", GL_STENCIL_CLEAR_VALUE) \ + X("STENCIL_FUNC", GL_STENCIL_FUNC) \ + X("STENCIL_VALUE_MASK", GL_STENCIL_VALUE_MASK) \ + X("STENCIL_FAIL", GL_STENCIL_FAIL) \ + X("STENCIL_PASS_DEPTH_FAIL", GL_STENCIL_PASS_DEPTH_FAIL) \ + X("STENCIL_PASS_DEPTH_PASS", GL_STENCIL_PASS_DEPTH_PASS) \ + X("STENCIL_REF", GL_STENCIL_REF) \ + X("STENCIL_WRITEMASK", GL_STENCIL_WRITEMASK) \ + X("VIEWPORT", GL_VIEWPORT) \ + X("DITHER", GL_DITHER) \ + X("BLEND_DST", GL_BLEND_DST) \ + X("BLEND_SRC", GL_BLEND_SRC) \ + X("BLEND", GL_BLEND) \ + X("LOGIC_OP_MODE", GL_LOGIC_OP_MODE) \ + X("DRAW_BUFFER", GL_DRAW_BUFFER) \ + X("READ_BUFFER", GL_READ_BUFFER) \ + X("SCISSOR_BOX", GL_SCISSOR_BOX) \ + X("SCISSOR_TEST", GL_SCISSOR_TEST) \ + X("COLOR_CLEAR_VALUE", GL_COLOR_CLEAR_VALUE) \ + X("COLOR_WRITEMASK", GL_COLOR_WRITEMASK) \ + X("DOUBLEBUFFER", GL_DOUBLEBUFFER) \ + X("STEREO", GL_STEREO) \ + X("LINE_SMOOTH_HINT", GL_LINE_SMOOTH_HINT) \ + X("POLYGON_SMOOTH_HINT", GL_POLYGON_SMOOTH_HINT) \ + X("UNPACK_SWAP_BYTES", GL_UNPACK_SWAP_BYTES) \ + X("UNPACK_LSB_FIRST", GL_UNPACK_LSB_FIRST) \ + X("UNPACK_ROW_LENGTH", GL_UNPACK_ROW_LENGTH) \ + X("UNPACK_SKIP_ROWS", GL_UNPACK_SKIP_ROWS) \ + X("UNPACK_SKIP_PIXELS", GL_UNPACK_SKIP_PIXELS) \ + X("UNPACK_ALIGNMENT", GL_UNPACK_ALIGNMENT) \ + X("PACK_SWAP_BYTES", GL_PACK_SWAP_BYTES) \ + X("PACK_LSB_FIRST", GL_PACK_LSB_FIRST) \ + X("PACK_ROW_LENGTH", GL_PACK_ROW_LENGTH) \ + X("PACK_SKIP_ROWS", GL_PACK_SKIP_ROWS) \ + X("PACK_SKIP_PIXELS", GL_PACK_SKIP_PIXELS) \ + X("PACK_ALIGNMENT", GL_PACK_ALIGNMENT) \ + X("MAX_TEXTURE_SIZE", GL_MAX_TEXTURE_SIZE) \ + X("MAX_VIEWPORT_DIMS", GL_MAX_VIEWPORT_DIMS) \ + X("SUBPIXEL_BITS", GL_SUBPIXEL_BITS) \ + X("TEXTURE_1D", GL_TEXTURE_1D) \ + X("TEXTURE_2D", GL_TEXTURE_2D) \ + X("TEXTURE_WIDTH", GL_TEXTURE_WIDTH) \ + X("TEXTURE_HEIGHT", GL_TEXTURE_HEIGHT) \ + X("TEXTURE_BORDER_COLOR", GL_TEXTURE_BORDER_COLOR) \ + X("DONT_CARE", GL_DONT_CARE) \ + X("FASTEST", GL_FASTEST) \ + X("NICEST", GL_NICEST) \ + X("BYTE", GL_BYTE) \ + X("UNSIGNED_BYTE", GL_UNSIGNED_BYTE) \ + X("SHORT", GL_SHORT) \ + X("UNSIGNED_SHORT", GL_UNSIGNED_SHORT) \ + X("INT", GL_INT) \ + X("UNSIGNED_INT", GL_UNSIGNED_INT) \ + X("FLOAT", GL_FLOAT) \ + X("STACK_OVERFLOW", GL_STACK_OVERFLOW) \ + X("STACK_UNDERFLOW", GL_STACK_UNDERFLOW) \ + X("CLEAR", GL_CLEAR) \ + X("AND", GL_AND) \ + X("AND_REVERSE", GL_AND_REVERSE) \ + X("COPY", GL_COPY) \ + X("AND_INVERTED", GL_AND_INVERTED) \ + X("NOOP", GL_NOOP) \ + X("XOR", GL_XOR) \ + X("OR", GL_OR) \ + X("NOR", GL_NOR) \ + X("EQUIV", GL_EQUIV) \ + X("INVERT", GL_INVERT) \ + X("OR_REVERSE", GL_OR_REVERSE) \ + X("COPY_INVERTED", GL_COPY_INVERTED) \ + X("OR_INVERTED", GL_OR_INVERTED) \ + X("NAND", GL_NAND) \ + X("SET", GL_SET) \ + X("TEXTURE", GL_TEXTURE) \ + X("COLOR", GL_COLOR) \ + X("DEPTH", GL_DEPTH) \ + X("STENCIL", GL_STENCIL) \ + X("STENCIL_INDEX", GL_STENCIL_INDEX) \ + X("DEPTH_COMPONENT", GL_DEPTH_COMPONENT) \ + X("RED", GL_RED) \ + X("GREEN", GL_GREEN) \ + X("BLUE", GL_BLUE) \ + X("ALPHA", GL_ALPHA) \ + X("RGB", GL_RGB) \ + X("RGBA", GL_RGBA) \ + X("POINT", GL_POINT) \ + X("LINE", GL_LINE) \ + X("FILL", GL_FILL) \ + X("KEEP", GL_KEEP) \ + X("REPLACE", GL_REPLACE) \ + X("INCR", GL_INCR) \ + X("DECR", GL_DECR) \ + X("VENDOR", GL_VENDOR) \ + X("RENDERER", GL_RENDERER) \ + X("VERSION", GL_VERSION) \ + X("EXTENSIONS", GL_EXTENSIONS) \ + X("NEAREST", GL_NEAREST) \ + X("LINEAR", GL_LINEAR) \ + X("NEAREST_MIPMAP_NEAREST", GL_NEAREST_MIPMAP_NEAREST) \ + X("LINEAR_MIPMAP_NEAREST", GL_LINEAR_MIPMAP_NEAREST) \ + X("NEAREST_MIPMAP_LINEAR", GL_NEAREST_MIPMAP_LINEAR) \ + X("LINEAR_MIPMAP_LINEAR", GL_LINEAR_MIPMAP_LINEAR) \ + X("TEXTURE_MAG_FILTER", GL_TEXTURE_MAG_FILTER) \ + X("TEXTURE_MIN_FILTER", GL_TEXTURE_MIN_FILTER) \ + X("TEXTURE_WRAP_S", GL_TEXTURE_WRAP_S) \ + X("TEXTURE_WRAP_T", GL_TEXTURE_WRAP_T) \ + X("REPEAT", GL_REPEAT) \ + X("CURRENT_BIT", GL_CURRENT_BIT) \ + X("POINT_BIT", GL_POINT_BIT) \ + X("LINE_BIT", GL_LINE_BIT) \ + X("POLYGON_BIT", GL_POLYGON_BIT) \ + X("POLYGON_STIPPLE_BIT", GL_POLYGON_STIPPLE_BIT) \ + X("PIXEL_MODE_BIT", GL_PIXEL_MODE_BIT) \ + X("LIGHTING_BIT", GL_LIGHTING_BIT) \ + X("FOG_BIT", GL_FOG_BIT) \ + X("ACCUM_BUFFER_BIT", GL_ACCUM_BUFFER_BIT) \ + X("VIEWPORT_BIT", GL_VIEWPORT_BIT) \ + X("TRANSFORM_BIT", GL_TRANSFORM_BIT) \ + X("ENABLE_BIT", GL_ENABLE_BIT) \ + X("HINT_BIT", GL_HINT_BIT) \ + X("EVAL_BIT", GL_EVAL_BIT) \ + X("LIST_BIT", GL_LIST_BIT) \ + X("TEXTURE_BIT", GL_TEXTURE_BIT) \ + X("SCISSOR_BIT", GL_SCISSOR_BIT) \ + X("ALL_ATTRIB_BITS", GL_ALL_ATTRIB_BITS) \ + X("QUAD_STRIP", GL_QUAD_STRIP) \ + X("POLYGON", GL_POLYGON) \ + X("ACCUM", GL_ACCUM) \ + X("LOAD", GL_LOAD) \ + X("RETURN", GL_RETURN) \ + X("MULT", GL_MULT) \ + X("ADD", GL_ADD) \ + X("AUX0", GL_AUX0) \ + X("AUX1", GL_AUX1) \ + X("AUX2", GL_AUX2) \ + X("AUX3", GL_AUX3) \ + X("2D", GL_2D) \ + X("3D", GL_3D) \ + X("3D_COLOR", GL_3D_COLOR) \ + X("3D_COLOR_TEXTURE", GL_3D_COLOR_TEXTURE) \ + X("4D_COLOR_TEXTURE", GL_4D_COLOR_TEXTURE) \ + X("PASS_THROUGH_TOKEN", GL_PASS_THROUGH_TOKEN) \ + X("POINT_TOKEN", GL_POINT_TOKEN) \ + X("LINE_TOKEN", GL_LINE_TOKEN) \ + X("POLYGON_TOKEN", GL_POLYGON_TOKEN) \ + X("BITMAP_TOKEN", GL_BITMAP_TOKEN) \ + X("DRAW_PIXEL_TOKEN", GL_DRAW_PIXEL_TOKEN) \ + X("COPY_PIXEL_TOKEN", GL_COPY_PIXEL_TOKEN) \ + X("LINE_RESET_TOKEN", GL_LINE_RESET_TOKEN) \ + X("EXP", GL_EXP) \ + X("EXP2", GL_EXP2) \ + X("COEFF", GL_COEFF) \ + X("ORDER", GL_ORDER) \ + X("DOMAIN", GL_DOMAIN) \ + X("PIXEL_MAP_I_TO_I", GL_PIXEL_MAP_I_TO_I) \ + X("PIXEL_MAP_S_TO_S", GL_PIXEL_MAP_S_TO_S) \ + X("PIXEL_MAP_I_TO_R", GL_PIXEL_MAP_I_TO_R) \ + X("PIXEL_MAP_I_TO_G", GL_PIXEL_MAP_I_TO_G) \ + X("PIXEL_MAP_I_TO_B", GL_PIXEL_MAP_I_TO_B) \ + X("PIXEL_MAP_I_TO_A", GL_PIXEL_MAP_I_TO_A) \ + X("PIXEL_MAP_R_TO_R", GL_PIXEL_MAP_R_TO_R) \ + X("PIXEL_MAP_G_TO_G", GL_PIXEL_MAP_G_TO_G) \ + X("PIXEL_MAP_B_TO_B", GL_PIXEL_MAP_B_TO_B) \ + X("PIXEL_MAP_A_TO_A", GL_PIXEL_MAP_A_TO_A) \ + X("CURRENT_COLOR", GL_CURRENT_COLOR) \ + X("CURRENT_INDEX", GL_CURRENT_INDEX) \ + X("CURRENT_NORMAL", GL_CURRENT_NORMAL) \ + X("CURRENT_TEXTURE_COORDS", GL_CURRENT_TEXTURE_COORDS) \ + X("CURRENT_RASTER_COLOR", GL_CURRENT_RASTER_COLOR) \ + X("CURRENT_RASTER_INDEX", GL_CURRENT_RASTER_INDEX) \ + X("CURRENT_RASTER_TEXTURE_COORDS", GL_CURRENT_RASTER_TEXTURE_COORDS) \ + X("CURRENT_RASTER_POSITION", GL_CURRENT_RASTER_POSITION) \ + X("CURRENT_RASTER_POSITION_VALID", GL_CURRENT_RASTER_POSITION_VALID) \ + X("CURRENT_RASTER_DISTANCE", GL_CURRENT_RASTER_DISTANCE) \ + X("POINT_SMOOTH", GL_POINT_SMOOTH) \ + X("LINE_STIPPLE", GL_LINE_STIPPLE) \ + X("LINE_STIPPLE_PATTERN", GL_LINE_STIPPLE_PATTERN) \ + X("LINE_STIPPLE_REPEAT", GL_LINE_STIPPLE_REPEAT) \ + X("LIST_MODE", GL_LIST_MODE) \ + X("MAX_LIST_NESTING", GL_MAX_LIST_NESTING) \ + X("LIST_BASE", GL_LIST_BASE) \ + X("LIST_INDEX", GL_LIST_INDEX) \ + X("POLYGON_STIPPLE", GL_POLYGON_STIPPLE) \ + X("EDGE_FLAG", GL_EDGE_FLAG) \ + X("LIGHTING", GL_LIGHTING) \ + X("LIGHT_MODEL_LOCAL_VIEWER", GL_LIGHT_MODEL_LOCAL_VIEWER) \ + X("LIGHT_MODEL_TWO_SIDE", GL_LIGHT_MODEL_TWO_SIDE) \ + X("LIGHT_MODEL_AMBIENT", GL_LIGHT_MODEL_AMBIENT) \ + X("SHADE_MODEL", GL_SHADE_MODEL) \ + X("COLOR_MATERIAL_FACE", GL_COLOR_MATERIAL_FACE) \ + X("COLOR_MATERIAL_PARAMETER", GL_COLOR_MATERIAL_PARAMETER) \ + X("COLOR_MATERIAL", GL_COLOR_MATERIAL) \ + X("FOG", GL_FOG) \ + X("FOG_INDEX", GL_FOG_INDEX) \ + X("FOG_DENSITY", GL_FOG_DENSITY) \ + X("FOG_START", GL_FOG_START) \ + X("FOG_END", GL_FOG_END) \ + X("FOG_MODE", GL_FOG_MODE) \ + X("FOG_COLOR", GL_FOG_COLOR) \ + X("ACCUM_CLEAR_VALUE", GL_ACCUM_CLEAR_VALUE) \ + X("MATRIX_MODE", GL_MATRIX_MODE) \ + X("NORMALIZE", GL_NORMALIZE) \ + X("MODELVIEW_STACK_DEPTH", GL_MODELVIEW_STACK_DEPTH) \ + X("PROJECTION_STACK_DEPTH", GL_PROJECTION_STACK_DEPTH) \ + X("TEXTURE_STACK_DEPTH", GL_TEXTURE_STACK_DEPTH) \ + X("MODELVIEW_MATRIX", GL_MODELVIEW_MATRIX) \ + X("PROJECTION_MATRIX", GL_PROJECTION_MATRIX) \ + X("TEXTURE_MATRIX", GL_TEXTURE_MATRIX) \ + X("ATTRIB_STACK_DEPTH", GL_ATTRIB_STACK_DEPTH) \ + X("ALPHA_TEST", GL_ALPHA_TEST) \ + X("ALPHA_TEST_FUNC", GL_ALPHA_TEST_FUNC) \ + X("ALPHA_TEST_REF", GL_ALPHA_TEST_REF) \ + X("LOGIC_OP", GL_LOGIC_OP) \ + X("AUX_BUFFERS", GL_AUX_BUFFERS) \ + X("INDEX_CLEAR_VALUE", GL_INDEX_CLEAR_VALUE) \ + X("INDEX_WRITEMASK", GL_INDEX_WRITEMASK) \ + X("INDEX_MODE", GL_INDEX_MODE) \ + X("RGBA_MODE", GL_RGBA_MODE) \ + X("RENDER_MODE", GL_RENDER_MODE) \ + X("PERSPECTIVE_CORRECTION_HINT", GL_PERSPECTIVE_CORRECTION_HINT) \ + X("POINT_SMOOTH_HINT", GL_POINT_SMOOTH_HINT) \ + X("FOG_HINT", GL_FOG_HINT) \ + X("TEXTURE_GEN_S", GL_TEXTURE_GEN_S) \ + X("TEXTURE_GEN_T", GL_TEXTURE_GEN_T) \ + X("TEXTURE_GEN_R", GL_TEXTURE_GEN_R) \ + X("TEXTURE_GEN_Q", GL_TEXTURE_GEN_Q) \ + X("PIXEL_MAP_I_TO_I_SIZE", GL_PIXEL_MAP_I_TO_I_SIZE) \ + X("PIXEL_MAP_S_TO_S_SIZE", GL_PIXEL_MAP_S_TO_S_SIZE) \ + X("PIXEL_MAP_I_TO_R_SIZE", GL_PIXEL_MAP_I_TO_R_SIZE) \ + X("PIXEL_MAP_I_TO_G_SIZE", GL_PIXEL_MAP_I_TO_G_SIZE) \ + X("PIXEL_MAP_I_TO_B_SIZE", GL_PIXEL_MAP_I_TO_B_SIZE) \ + X("PIXEL_MAP_I_TO_A_SIZE", GL_PIXEL_MAP_I_TO_A_SIZE) \ + X("PIXEL_MAP_R_TO_R_SIZE", GL_PIXEL_MAP_R_TO_R_SIZE) \ + X("PIXEL_MAP_G_TO_G_SIZE", GL_PIXEL_MAP_G_TO_G_SIZE) \ + X("PIXEL_MAP_B_TO_B_SIZE", GL_PIXEL_MAP_B_TO_B_SIZE) \ + X("PIXEL_MAP_A_TO_A_SIZE", GL_PIXEL_MAP_A_TO_A_SIZE) \ + X("MAP_COLOR", GL_MAP_COLOR) \ + X("MAP_STENCIL", GL_MAP_STENCIL) \ + X("INDEX_SHIFT", GL_INDEX_SHIFT) \ + X("INDEX_OFFSET", GL_INDEX_OFFSET) \ + X("RED_SCALE", GL_RED_SCALE) \ + X("RED_BIAS", GL_RED_BIAS) \ + X("ZOOM_X", GL_ZOOM_X) \ + X("ZOOM_Y", GL_ZOOM_Y) \ + X("GREEN_SCALE", GL_GREEN_SCALE) \ + X("GREEN_BIAS", GL_GREEN_BIAS) \ + X("BLUE_SCALE", GL_BLUE_SCALE) \ + X("BLUE_BIAS", GL_BLUE_BIAS) \ + X("ALPHA_SCALE", GL_ALPHA_SCALE) \ + X("ALPHA_BIAS", GL_ALPHA_BIAS) \ + X("DEPTH_SCALE", GL_DEPTH_SCALE) \ + X("DEPTH_BIAS", GL_DEPTH_BIAS) \ + X("MAX_EVAL_ORDER", GL_MAX_EVAL_ORDER) \ + X("MAX_LIGHTS", GL_MAX_LIGHTS) \ + X("MAX_CLIP_PLANES", GL_MAX_CLIP_PLANES) \ + X("MAX_PIXEL_MAP_TABLE", GL_MAX_PIXEL_MAP_TABLE) \ + X("MAX_ATTRIB_STACK_DEPTH", GL_MAX_ATTRIB_STACK_DEPTH) \ + X("MAX_MODELVIEW_STACK_DEPTH", GL_MAX_MODELVIEW_STACK_DEPTH) \ + X("MAX_NAME_STACK_DEPTH", GL_MAX_NAME_STACK_DEPTH) \ + X("MAX_PROJECTION_STACK_DEPTH", GL_MAX_PROJECTION_STACK_DEPTH) \ + X("MAX_TEXTURE_STACK_DEPTH", GL_MAX_TEXTURE_STACK_DEPTH) \ + X("INDEX_BITS", GL_INDEX_BITS) \ + X("RED_BITS", GL_RED_BITS) \ + X("GREEN_BITS", GL_GREEN_BITS) \ + X("BLUE_BITS", GL_BLUE_BITS) \ + X("ALPHA_BITS", GL_ALPHA_BITS) \ + X("DEPTH_BITS", GL_DEPTH_BITS) \ + X("STENCIL_BITS", GL_STENCIL_BITS) \ + X("ACCUM_RED_BITS", GL_ACCUM_RED_BITS) \ + X("ACCUM_GREEN_BITS", GL_ACCUM_GREEN_BITS) \ + X("ACCUM_BLUE_BITS", GL_ACCUM_BLUE_BITS) \ + X("ACCUM_ALPHA_BITS", GL_ACCUM_ALPHA_BITS) \ + X("NAME_STACK_DEPTH", GL_NAME_STACK_DEPTH) \ + X("AUTO_NORMAL", GL_AUTO_NORMAL) \ + X("MAP1_COLOR_4", GL_MAP1_COLOR_4) \ + X("MAP1_INDEX", GL_MAP1_INDEX) \ + X("MAP1_NORMAL", GL_MAP1_NORMAL) \ + X("MAP1_TEXTURE_COORD_1", GL_MAP1_TEXTURE_COORD_1) \ + X("MAP1_TEXTURE_COORD_2", GL_MAP1_TEXTURE_COORD_2) \ + X("MAP1_TEXTURE_COORD_3", GL_MAP1_TEXTURE_COORD_3) \ + X("MAP1_TEXTURE_COORD_4", GL_MAP1_TEXTURE_COORD_4) \ + X("MAP1_VERTEX_3", GL_MAP1_VERTEX_3) \ + X("MAP1_VERTEX_4", GL_MAP1_VERTEX_4) \ + X("MAP2_COLOR_4", GL_MAP2_COLOR_4) \ + X("MAP2_INDEX", GL_MAP2_INDEX) \ + X("MAP2_NORMAL", GL_MAP2_NORMAL) \ + X("MAP2_TEXTURE_COORD_1", GL_MAP2_TEXTURE_COORD_1) \ + X("MAP2_TEXTURE_COORD_2", GL_MAP2_TEXTURE_COORD_2) \ + X("MAP2_TEXTURE_COORD_3", GL_MAP2_TEXTURE_COORD_3) \ + X("MAP2_TEXTURE_COORD_4", GL_MAP2_TEXTURE_COORD_4) \ + X("MAP2_VERTEX_3", GL_MAP2_VERTEX_3) \ + X("MAP2_VERTEX_4", GL_MAP2_VERTEX_4) \ + X("MAP1_GRID_DOMAIN", GL_MAP1_GRID_DOMAIN) \ + X("MAP1_GRID_SEGMENTS", GL_MAP1_GRID_SEGMENTS) \ + X("MAP2_GRID_DOMAIN", GL_MAP2_GRID_DOMAIN) \ + X("MAP2_GRID_SEGMENTS", GL_MAP2_GRID_SEGMENTS) \ + X("TEXTURE_COMPONENTS", GL_TEXTURE_COMPONENTS) \ + X("TEXTURE_BORDER", GL_TEXTURE_BORDER) \ + X("AMBIENT", GL_AMBIENT) \ + X("DIFFUSE", GL_DIFFUSE) \ + X("SPECULAR", GL_SPECULAR) \ + X("POSITION", GL_POSITION) \ + X("SPOT_DIRECTION", GL_SPOT_DIRECTION) \ + X("SPOT_EXPONENT", GL_SPOT_EXPONENT) \ + X("SPOT_CUTOFF", GL_SPOT_CUTOFF) \ + X("CONSTANT_ATTENUATION", GL_CONSTANT_ATTENUATION) \ + X("LINEAR_ATTENUATION", GL_LINEAR_ATTENUATION) \ + X("QUADRATIC_ATTENUATION", GL_QUADRATIC_ATTENUATION) \ + X("COMPILE", GL_COMPILE) \ + X("COMPILE_AND_EXECUTE", GL_COMPILE_AND_EXECUTE) \ + X("2_BYTES", GL_2_BYTES) \ + X("3_BYTES", GL_3_BYTES) \ + X("4_BYTES", GL_4_BYTES) \ + X("EMISSION", GL_EMISSION) \ + X("SHININESS", GL_SHININESS) \ + X("AMBIENT_AND_DIFFUSE", GL_AMBIENT_AND_DIFFUSE) \ + X("COLOR_INDEXES", GL_COLOR_INDEXES) \ + X("MODELVIEW", GL_MODELVIEW) \ + X("PROJECTION", GL_PROJECTION) \ + X("COLOR_INDEX", GL_COLOR_INDEX) \ + X("LUMINANCE", GL_LUMINANCE) \ + X("LUMINANCE_ALPHA", GL_LUMINANCE_ALPHA) \ + X("BITMAP", GL_BITMAP) \ + X("RENDER", GL_RENDER) \ + X("FEEDBACK", GL_FEEDBACK) \ + X("SELECT", GL_SELECT) \ + X("FLAT", GL_FLAT) \ + X("SMOOTH", GL_SMOOTH) \ + X("S", GL_S) \ + X("T", GL_T) \ + X("R", GL_R) \ + X("Q", GL_Q) \ + X("MODULATE", GL_MODULATE) \ + X("DECAL", GL_DECAL) \ + X("TEXTURE_ENV_MODE", GL_TEXTURE_ENV_MODE) \ + X("TEXTURE_ENV_COLOR", GL_TEXTURE_ENV_COLOR) \ + X("TEXTURE_ENV", GL_TEXTURE_ENV) \ + X("EYE_LINEAR", GL_EYE_LINEAR) \ + X("OBJECT_LINEAR", GL_OBJECT_LINEAR) \ + X("SPHERE_MAP", GL_SPHERE_MAP) \ + X("TEXTURE_GEN_MODE", GL_TEXTURE_GEN_MODE) \ + X("OBJECT_PLANE", GL_OBJECT_PLANE) \ + X("EYE_PLANE", GL_EYE_PLANE) \ + X("CLAMP", GL_CLAMP) \ + X("CLIP_PLANE0", GL_CLIP_PLANE0) \ + X("CLIP_PLANE1", GL_CLIP_PLANE1) \ + X("CLIP_PLANE2", GL_CLIP_PLANE2) \ + X("CLIP_PLANE3", GL_CLIP_PLANE3) \ + X("CLIP_PLANE4", GL_CLIP_PLANE4) \ + X("CLIP_PLANE5", GL_CLIP_PLANE5) \ + X("LIGHT0", GL_LIGHT0) \ + X("LIGHT1", GL_LIGHT1) \ + X("LIGHT2", GL_LIGHT2) \ + X("LIGHT3", GL_LIGHT3) \ + X("LIGHT4", GL_LIGHT4) \ + X("LIGHT5", GL_LIGHT5) \ + X("LIGHT6", GL_LIGHT6) \ + X("LIGHT7", GL_LIGHT7) \ + X("COLOR_LOGIC_OP", GL_COLOR_LOGIC_OP) \ + X("POLYGON_OFFSET_UNITS", GL_POLYGON_OFFSET_UNITS) \ + X("POLYGON_OFFSET_POINT", GL_POLYGON_OFFSET_POINT) \ + X("POLYGON_OFFSET_LINE", GL_POLYGON_OFFSET_LINE) \ + X("POLYGON_OFFSET_FILL", GL_POLYGON_OFFSET_FILL) \ + X("POLYGON_OFFSET_FACTOR", GL_POLYGON_OFFSET_FACTOR) \ + X("TEXTURE_BINDING_1D", GL_TEXTURE_BINDING_1D) \ + X("TEXTURE_BINDING_2D", GL_TEXTURE_BINDING_2D) \ + X("TEXTURE_INTERNAL_FORMAT", GL_TEXTURE_INTERNAL_FORMAT) \ + X("TEXTURE_RED_SIZE", GL_TEXTURE_RED_SIZE) \ + X("TEXTURE_GREEN_SIZE", GL_TEXTURE_GREEN_SIZE) \ + X("TEXTURE_BLUE_SIZE", GL_TEXTURE_BLUE_SIZE) \ + X("TEXTURE_ALPHA_SIZE", GL_TEXTURE_ALPHA_SIZE) \ + X("DOUBLE", GL_DOUBLE) \ + X("PROXY_TEXTURE_1D", GL_PROXY_TEXTURE_1D) \ + X("PROXY_TEXTURE_2D", GL_PROXY_TEXTURE_2D) \ + X("R3_G3_B2", GL_R3_G3_B2) \ + X("RGB4", GL_RGB4) \ + X("RGB5", GL_RGB5) \ + X("RGB8", GL_RGB8) \ + X("RGB10", GL_RGB10) \ + X("RGB12", GL_RGB12) \ + X("RGB16", GL_RGB16) \ + X("RGBA2", GL_RGBA2) \ + X("RGBA4", GL_RGBA4) \ + X("RGB5_A1", GL_RGB5_A1) \ + X("RGBA8", GL_RGBA8) \ + X("RGB10_A2", GL_RGB10_A2) \ + X("RGBA12", GL_RGBA12) \ + X("RGBA16", GL_RGBA16) \ + X("CLIENT_PIXEL_STORE_BIT", GL_CLIENT_PIXEL_STORE_BIT) \ + X("CLIENT_VERTEX_ARRAY_BIT", GL_CLIENT_VERTEX_ARRAY_BIT) \ + X("CLIENT_ALL_ATTRIB_BITS", GL_CLIENT_ALL_ATTRIB_BITS) \ + X("VERTEX_ARRAY_POINTER", GL_VERTEX_ARRAY_POINTER) \ + X("NORMAL_ARRAY_POINTER", GL_NORMAL_ARRAY_POINTER) \ + X("COLOR_ARRAY_POINTER", GL_COLOR_ARRAY_POINTER) \ + X("INDEX_ARRAY_POINTER", GL_INDEX_ARRAY_POINTER) \ + X("TEXTURE_COORD_ARRAY_POINTER", GL_TEXTURE_COORD_ARRAY_POINTER) \ + X("EDGE_FLAG_ARRAY_POINTER", GL_EDGE_FLAG_ARRAY_POINTER) \ + X("FEEDBACK_BUFFER_POINTER", GL_FEEDBACK_BUFFER_POINTER) \ + X("SELECTION_BUFFER_POINTER", GL_SELECTION_BUFFER_POINTER) \ + X("CLIENT_ATTRIB_STACK_DEPTH", GL_CLIENT_ATTRIB_STACK_DEPTH) \ + X("INDEX_LOGIC_OP", GL_INDEX_LOGIC_OP) \ + X("MAX_CLIENT_ATTRIB_STACK_DEPTH", GL_MAX_CLIENT_ATTRIB_STACK_DEPTH) \ + X("FEEDBACK_BUFFER_SIZE", GL_FEEDBACK_BUFFER_SIZE) \ + X("FEEDBACK_BUFFER_TYPE", GL_FEEDBACK_BUFFER_TYPE) \ + X("SELECTION_BUFFER_SIZE", GL_SELECTION_BUFFER_SIZE) \ + X("VERTEX_ARRAY", GL_VERTEX_ARRAY) \ + X("NORMAL_ARRAY", GL_NORMAL_ARRAY) \ + X("COLOR_ARRAY", GL_COLOR_ARRAY) \ + X("INDEX_ARRAY", GL_INDEX_ARRAY) \ + X("TEXTURE_COORD_ARRAY", GL_TEXTURE_COORD_ARRAY) \ + X("EDGE_FLAG_ARRAY", GL_EDGE_FLAG_ARRAY) \ + X("VERTEX_ARRAY_SIZE", GL_VERTEX_ARRAY_SIZE) \ + X("VERTEX_ARRAY_TYPE", GL_VERTEX_ARRAY_TYPE) \ + X("VERTEX_ARRAY_STRIDE", GL_VERTEX_ARRAY_STRIDE) \ + X("NORMAL_ARRAY_TYPE", GL_NORMAL_ARRAY_TYPE) \ + X("NORMAL_ARRAY_STRIDE", GL_NORMAL_ARRAY_STRIDE) \ + X("COLOR_ARRAY_SIZE", GL_COLOR_ARRAY_SIZE) \ + X("COLOR_ARRAY_TYPE", GL_COLOR_ARRAY_TYPE) \ + X("COLOR_ARRAY_STRIDE", GL_COLOR_ARRAY_STRIDE) \ + X("INDEX_ARRAY_TYPE", GL_INDEX_ARRAY_TYPE) \ + X("INDEX_ARRAY_STRIDE", GL_INDEX_ARRAY_STRIDE) \ + X("TEXTURE_COORD_ARRAY_SIZE", GL_TEXTURE_COORD_ARRAY_SIZE) \ + X("TEXTURE_COORD_ARRAY_TYPE", GL_TEXTURE_COORD_ARRAY_TYPE) \ + X("TEXTURE_COORD_ARRAY_STRIDE", GL_TEXTURE_COORD_ARRAY_STRIDE) \ + X("EDGE_FLAG_ARRAY_STRIDE", GL_EDGE_FLAG_ARRAY_STRIDE) \ + X("TEXTURE_LUMINANCE_SIZE", GL_TEXTURE_LUMINANCE_SIZE) \ + X("TEXTURE_INTENSITY_SIZE", GL_TEXTURE_INTENSITY_SIZE) \ + X("TEXTURE_PRIORITY", GL_TEXTURE_PRIORITY) \ + X("TEXTURE_RESIDENT", GL_TEXTURE_RESIDENT) \ + X("ALPHA4", GL_ALPHA4) \ + X("ALPHA8", GL_ALPHA8) \ + X("ALPHA12", GL_ALPHA12) \ + X("ALPHA16", GL_ALPHA16) \ + X("LUMINANCE4", GL_LUMINANCE4) \ + X("LUMINANCE8", GL_LUMINANCE8) \ + X("LUMINANCE12", GL_LUMINANCE12) \ + X("LUMINANCE16", GL_LUMINANCE16) \ + X("LUMINANCE4_ALPHA4", GL_LUMINANCE4_ALPHA4) \ + X("LUMINANCE6_ALPHA2", GL_LUMINANCE6_ALPHA2) \ + X("LUMINANCE8_ALPHA8", GL_LUMINANCE8_ALPHA8) \ + X("LUMINANCE12_ALPHA4", GL_LUMINANCE12_ALPHA4) \ + X("LUMINANCE12_ALPHA12", GL_LUMINANCE12_ALPHA12) \ + X("LUMINANCE16_ALPHA16", GL_LUMINANCE16_ALPHA16) \ + X("INTENSITY", GL_INTENSITY) \ + X("INTENSITY4", GL_INTENSITY4) \ + X("INTENSITY8", GL_INTENSITY8) \ + X("INTENSITY12", GL_INTENSITY12) \ + X("INTENSITY16", GL_INTENSITY16) \ + X("V2F", GL_V2F) \ + X("V3F", GL_V3F) \ + X("C4UB_V2F", GL_C4UB_V2F) \ + X("C4UB_V3F", GL_C4UB_V3F) \ + X("C3F_V3F", GL_C3F_V3F) \ + X("N3F_V3F", GL_N3F_V3F) \ + X("C4F_N3F_V3F", GL_C4F_N3F_V3F) \ + X("T2F_V3F", GL_T2F_V3F) \ + X("T4F_V4F", GL_T4F_V4F) \ + X("T2F_C4UB_V3F", GL_T2F_C4UB_V3F) \ + X("T2F_C3F_V3F", GL_T2F_C3F_V3F) \ + X("T2F_N3F_V3F", GL_T2F_N3F_V3F) \ + X("T2F_C4F_N3F_V3F", GL_T2F_C4F_N3F_V3F) \ + X("T4F_C4F_N3F_V4F", GL_T4F_C4F_N3F_V4F) \ + X("UNSIGNED_BYTE_3_3_2", GL_UNSIGNED_BYTE_3_3_2) \ + X("UNSIGNED_SHORT_4_4_4_4", GL_UNSIGNED_SHORT_4_4_4_4) \ + X("UNSIGNED_SHORT_5_5_5_1", GL_UNSIGNED_SHORT_5_5_5_1) \ + X("UNSIGNED_INT_8_8_8_8", GL_UNSIGNED_INT_8_8_8_8) \ + X("UNSIGNED_INT_10_10_10_2", GL_UNSIGNED_INT_10_10_10_2) \ + X("TEXTURE_BINDING_3D", GL_TEXTURE_BINDING_3D) \ + X("PACK_SKIP_IMAGES", GL_PACK_SKIP_IMAGES) \ + X("PACK_IMAGE_HEIGHT", GL_PACK_IMAGE_HEIGHT) \ + X("UNPACK_SKIP_IMAGES", GL_UNPACK_SKIP_IMAGES) \ + X("UNPACK_IMAGE_HEIGHT", GL_UNPACK_IMAGE_HEIGHT) \ + X("TEXTURE_3D", GL_TEXTURE_3D) \ + X("PROXY_TEXTURE_3D", GL_PROXY_TEXTURE_3D) \ + X("TEXTURE_DEPTH", GL_TEXTURE_DEPTH) \ + X("TEXTURE_WRAP_R", GL_TEXTURE_WRAP_R) \ + X("MAX_3D_TEXTURE_SIZE", GL_MAX_3D_TEXTURE_SIZE) \ + X("UNSIGNED_BYTE_2_3_3_REV", GL_UNSIGNED_BYTE_2_3_3_REV) \ + X("UNSIGNED_SHORT_5_6_5", GL_UNSIGNED_SHORT_5_6_5) \ + X("UNSIGNED_SHORT_5_6_5_REV", GL_UNSIGNED_SHORT_5_6_5_REV) \ + X("UNSIGNED_SHORT_4_4_4_4_REV", GL_UNSIGNED_SHORT_4_4_4_4_REV) \ + X("UNSIGNED_SHORT_1_5_5_5_REV", GL_UNSIGNED_SHORT_1_5_5_5_REV) \ + X("UNSIGNED_INT_8_8_8_8_REV", GL_UNSIGNED_INT_8_8_8_8_REV) \ + X("UNSIGNED_INT_2_10_10_10_REV", GL_UNSIGNED_INT_2_10_10_10_REV) \ + X("BGR", GL_BGR) \ + X("BGRA", GL_BGRA) \ + X("MAX_ELEMENTS_VERTICES", GL_MAX_ELEMENTS_VERTICES) \ + X("MAX_ELEMENTS_INDICES", GL_MAX_ELEMENTS_INDICES) \ + X("CLAMP_TO_EDGE", GL_CLAMP_TO_EDGE) \ + X("TEXTURE_MIN_LOD", GL_TEXTURE_MIN_LOD) \ + X("TEXTURE_MAX_LOD", GL_TEXTURE_MAX_LOD) \ + X("TEXTURE_BASE_LEVEL", GL_TEXTURE_BASE_LEVEL) \ + X("TEXTURE_MAX_LEVEL", GL_TEXTURE_MAX_LEVEL) \ + X("SMOOTH_POINT_SIZE_RANGE", GL_SMOOTH_POINT_SIZE_RANGE) \ + X("SMOOTH_POINT_SIZE_GRANULARITY", GL_SMOOTH_POINT_SIZE_GRANULARITY) \ + X("SMOOTH_LINE_WIDTH_RANGE", GL_SMOOTH_LINE_WIDTH_RANGE) \ + X("SMOOTH_LINE_WIDTH_GRANULARITY", GL_SMOOTH_LINE_WIDTH_GRANULARITY) \ + X("ALIASED_LINE_WIDTH_RANGE", GL_ALIASED_LINE_WIDTH_RANGE) \ + X("RESCALE_NORMAL", GL_RESCALE_NORMAL) \ + X("LIGHT_MODEL_COLOR_CONTROL", GL_LIGHT_MODEL_COLOR_CONTROL) \ + X("SINGLE_COLOR", GL_SINGLE_COLOR) \ + X("SEPARATE_SPECULAR_COLOR", GL_SEPARATE_SPECULAR_COLOR) \ + X("ALIASED_POINT_SIZE_RANGE", GL_ALIASED_POINT_SIZE_RANGE) \ + X("TEXTURE0", GL_TEXTURE0) \ + X("TEXTURE1", GL_TEXTURE1) \ + X("TEXTURE2", GL_TEXTURE2) \ + X("TEXTURE3", GL_TEXTURE3) \ + X("TEXTURE4", GL_TEXTURE4) \ + X("TEXTURE5", GL_TEXTURE5) \ + X("TEXTURE6", GL_TEXTURE6) \ + X("TEXTURE7", GL_TEXTURE7) \ + X("TEXTURE8", GL_TEXTURE8) \ + X("TEXTURE9", GL_TEXTURE9) \ + X("TEXTURE10", GL_TEXTURE10) \ + X("TEXTURE11", GL_TEXTURE11) \ + X("TEXTURE12", GL_TEXTURE12) \ + X("TEXTURE13", GL_TEXTURE13) \ + X("TEXTURE14", GL_TEXTURE14) \ + X("TEXTURE15", GL_TEXTURE15) \ + X("TEXTURE16", GL_TEXTURE16) \ + X("TEXTURE17", GL_TEXTURE17) \ + X("TEXTURE18", GL_TEXTURE18) \ + X("TEXTURE19", GL_TEXTURE19) \ + X("TEXTURE20", GL_TEXTURE20) \ + X("TEXTURE21", GL_TEXTURE21) \ + X("TEXTURE22", GL_TEXTURE22) \ + X("TEXTURE23", GL_TEXTURE23) \ + X("TEXTURE24", GL_TEXTURE24) \ + X("TEXTURE25", GL_TEXTURE25) \ + X("TEXTURE26", GL_TEXTURE26) \ + X("TEXTURE27", GL_TEXTURE27) \ + X("TEXTURE28", GL_TEXTURE28) \ + X("TEXTURE29", GL_TEXTURE29) \ + X("TEXTURE30", GL_TEXTURE30) \ + X("TEXTURE31", GL_TEXTURE31) \ + X("ACTIVE_TEXTURE", GL_ACTIVE_TEXTURE) \ + X("MULTISAMPLE", GL_MULTISAMPLE) \ + X("SAMPLE_ALPHA_TO_COVERAGE", GL_SAMPLE_ALPHA_TO_COVERAGE) \ + X("SAMPLE_ALPHA_TO_ONE", GL_SAMPLE_ALPHA_TO_ONE) \ + X("SAMPLE_COVERAGE", GL_SAMPLE_COVERAGE) \ + X("SAMPLE_BUFFERS", GL_SAMPLE_BUFFERS) \ + X("SAMPLES", GL_SAMPLES) \ + X("SAMPLE_COVERAGE_VALUE", GL_SAMPLE_COVERAGE_VALUE) \ + X("SAMPLE_COVERAGE_INVERT", GL_SAMPLE_COVERAGE_INVERT) \ + X("TEXTURE_CUBE_MAP", GL_TEXTURE_CUBE_MAP) \ + X("TEXTURE_BINDING_CUBE_MAP", GL_TEXTURE_BINDING_CUBE_MAP) \ + X("TEXTURE_CUBE_MAP_POSITIVE_X", GL_TEXTURE_CUBE_MAP_POSITIVE_X) \ + X("TEXTURE_CUBE_MAP_NEGATIVE_X", GL_TEXTURE_CUBE_MAP_NEGATIVE_X) \ + X("TEXTURE_CUBE_MAP_POSITIVE_Y", GL_TEXTURE_CUBE_MAP_POSITIVE_Y) \ + X("TEXTURE_CUBE_MAP_NEGATIVE_Y", GL_TEXTURE_CUBE_MAP_NEGATIVE_Y) \ + X("TEXTURE_CUBE_MAP_POSITIVE_Z", GL_TEXTURE_CUBE_MAP_POSITIVE_Z) \ + X("TEXTURE_CUBE_MAP_NEGATIVE_Z", GL_TEXTURE_CUBE_MAP_NEGATIVE_Z) \ + X("PROXY_TEXTURE_CUBE_MAP", GL_PROXY_TEXTURE_CUBE_MAP) \ + X("MAX_CUBE_MAP_TEXTURE_SIZE", GL_MAX_CUBE_MAP_TEXTURE_SIZE) \ + X("COMPRESSED_RGB", GL_COMPRESSED_RGB) \ + X("COMPRESSED_RGBA", GL_COMPRESSED_RGBA) \ + X("TEXTURE_COMPRESSION_HINT", GL_TEXTURE_COMPRESSION_HINT) \ + X("TEXTURE_COMPRESSED_IMAGE_SIZE", GL_TEXTURE_COMPRESSED_IMAGE_SIZE) \ + X("TEXTURE_COMPRESSED", GL_TEXTURE_COMPRESSED) \ + X("NUM_COMPRESSED_TEXTURE_FORMATS", GL_NUM_COMPRESSED_TEXTURE_FORMATS) \ + X("COMPRESSED_TEXTURE_FORMATS", GL_COMPRESSED_TEXTURE_FORMATS) \ + X("CLAMP_TO_BORDER", GL_CLAMP_TO_BORDER) \ + X("CLIENT_ACTIVE_TEXTURE", GL_CLIENT_ACTIVE_TEXTURE) \ + X("MAX_TEXTURE_UNITS", GL_MAX_TEXTURE_UNITS) \ + X("TRANSPOSE_MODELVIEW_MATRIX", GL_TRANSPOSE_MODELVIEW_MATRIX) \ + X("TRANSPOSE_PROJECTION_MATRIX", GL_TRANSPOSE_PROJECTION_MATRIX) \ + X("TRANSPOSE_TEXTURE_MATRIX", GL_TRANSPOSE_TEXTURE_MATRIX) \ + X("TRANSPOSE_COLOR_MATRIX", GL_TRANSPOSE_COLOR_MATRIX) \ + X("MULTISAMPLE_BIT", GL_MULTISAMPLE_BIT) \ + X("NORMAL_MAP", GL_NORMAL_MAP) \ + X("REFLECTION_MAP", GL_REFLECTION_MAP) \ + X("COMPRESSED_ALPHA", GL_COMPRESSED_ALPHA) \ + X("COMPRESSED_LUMINANCE", GL_COMPRESSED_LUMINANCE) \ + X("COMPRESSED_LUMINANCE_ALPHA", GL_COMPRESSED_LUMINANCE_ALPHA) \ + X("COMPRESSED_INTENSITY", GL_COMPRESSED_INTENSITY) \ + X("COMBINE", GL_COMBINE) \ + X("COMBINE_RGB", GL_COMBINE_RGB) \ + X("COMBINE_ALPHA", GL_COMBINE_ALPHA) \ + X("SOURCE0_RGB", GL_SOURCE0_RGB) \ + X("SOURCE1_RGB", GL_SOURCE1_RGB) \ + X("SOURCE2_RGB", GL_SOURCE2_RGB) \ + X("SOURCE0_ALPHA", GL_SOURCE0_ALPHA) \ + X("SOURCE1_ALPHA", GL_SOURCE1_ALPHA) \ + X("SOURCE2_ALPHA", GL_SOURCE2_ALPHA) \ + X("OPERAND0_RGB", GL_OPERAND0_RGB) \ + X("OPERAND1_RGB", GL_OPERAND1_RGB) \ + X("OPERAND2_RGB", GL_OPERAND2_RGB) \ + X("OPERAND0_ALPHA", GL_OPERAND0_ALPHA) \ + X("OPERAND1_ALPHA", GL_OPERAND1_ALPHA) \ + X("OPERAND2_ALPHA", GL_OPERAND2_ALPHA) \ + X("RGB_SCALE", GL_RGB_SCALE) \ + X("ADD_SIGNED", GL_ADD_SIGNED) \ + X("INTERPOLATE", GL_INTERPOLATE) \ + X("SUBTRACT", GL_SUBTRACT) \ + X("CONSTANT", GL_CONSTANT) \ + X("PRIMARY_COLOR", GL_PRIMARY_COLOR) \ + X("PREVIOUS", GL_PREVIOUS) \ + X("DOT3_RGB", GL_DOT3_RGB) \ + X("DOT3_RGBA", GL_DOT3_RGBA) \ + X("BLEND_DST_RGB", GL_BLEND_DST_RGB) \ + X("BLEND_SRC_RGB", GL_BLEND_SRC_RGB) \ + X("BLEND_DST_ALPHA", GL_BLEND_DST_ALPHA) \ + X("BLEND_SRC_ALPHA", GL_BLEND_SRC_ALPHA) \ + X("POINT_FADE_THRESHOLD_SIZE", GL_POINT_FADE_THRESHOLD_SIZE) \ + X("DEPTH_COMPONENT16", GL_DEPTH_COMPONENT16) \ + X("DEPTH_COMPONENT24", GL_DEPTH_COMPONENT24) \ + X("DEPTH_COMPONENT32", GL_DEPTH_COMPONENT32) \ + X("MIRRORED_REPEAT", GL_MIRRORED_REPEAT) \ + X("MAX_TEXTURE_LOD_BIAS", GL_MAX_TEXTURE_LOD_BIAS) \ + X("TEXTURE_LOD_BIAS", GL_TEXTURE_LOD_BIAS) \ + X("INCR_WRAP", GL_INCR_WRAP) \ + X("DECR_WRAP", GL_DECR_WRAP) \ + X("TEXTURE_DEPTH_SIZE", GL_TEXTURE_DEPTH_SIZE) \ + X("TEXTURE_COMPARE_MODE", GL_TEXTURE_COMPARE_MODE) \ + X("TEXTURE_COMPARE_FUNC", GL_TEXTURE_COMPARE_FUNC) \ + X("POINT_SIZE_MIN", GL_POINT_SIZE_MIN) \ + X("POINT_SIZE_MAX", GL_POINT_SIZE_MAX) \ + X("POINT_DISTANCE_ATTENUATION", GL_POINT_DISTANCE_ATTENUATION) \ + X("GENERATE_MIPMAP", GL_GENERATE_MIPMAP) \ + X("GENERATE_MIPMAP_HINT", GL_GENERATE_MIPMAP_HINT) \ + X("FOG_COORDINATE_SOURCE", GL_FOG_COORDINATE_SOURCE) \ + X("FOG_COORDINATE", GL_FOG_COORDINATE) \ + X("FRAGMENT_DEPTH", GL_FRAGMENT_DEPTH) \ + X("CURRENT_FOG_COORDINATE", GL_CURRENT_FOG_COORDINATE) \ + X("FOG_COORDINATE_ARRAY_TYPE", GL_FOG_COORDINATE_ARRAY_TYPE) \ + X("FOG_COORDINATE_ARRAY_STRIDE", GL_FOG_COORDINATE_ARRAY_STRIDE) \ + X("FOG_COORDINATE_ARRAY_POINTER", GL_FOG_COORDINATE_ARRAY_POINTER) \ + X("FOG_COORDINATE_ARRAY", GL_FOG_COORDINATE_ARRAY) \ + X("COLOR_SUM", GL_COLOR_SUM) \ + X("CURRENT_SECONDARY_COLOR", GL_CURRENT_SECONDARY_COLOR) \ + X("SECONDARY_COLOR_ARRAY_SIZE", GL_SECONDARY_COLOR_ARRAY_SIZE) \ + X("SECONDARY_COLOR_ARRAY_TYPE", GL_SECONDARY_COLOR_ARRAY_TYPE) \ + X("SECONDARY_COLOR_ARRAY_STRIDE", GL_SECONDARY_COLOR_ARRAY_STRIDE) \ + X("SECONDARY_COLOR_ARRAY_POINTER", GL_SECONDARY_COLOR_ARRAY_POINTER) \ + X("SECONDARY_COLOR_ARRAY", GL_SECONDARY_COLOR_ARRAY) \ + X("TEXTURE_FILTER_CONTROL", GL_TEXTURE_FILTER_CONTROL) \ + X("DEPTH_TEXTURE_MODE", GL_DEPTH_TEXTURE_MODE) \ + X("COMPARE_R_TO_TEXTURE", GL_COMPARE_R_TO_TEXTURE) \ + X("BLEND_COLOR", GL_BLEND_COLOR) \ + X("BLEND_EQUATION", GL_BLEND_EQUATION) \ + X("CONSTANT_COLOR", GL_CONSTANT_COLOR) \ + X("ONE_MINUS_CONSTANT_COLOR", GL_ONE_MINUS_CONSTANT_COLOR) \ + X("CONSTANT_ALPHA", GL_CONSTANT_ALPHA) \ + X("ONE_MINUS_CONSTANT_ALPHA", GL_ONE_MINUS_CONSTANT_ALPHA) \ + X("FUNC_ADD", GL_FUNC_ADD) \ + X("FUNC_REVERSE_SUBTRACT", GL_FUNC_REVERSE_SUBTRACT) \ + X("FUNC_SUBTRACT", GL_FUNC_SUBTRACT) \ + X("MIN", GL_MIN) \ + X("MAX", GL_MAX) \ + X("BUFFER_SIZE", GL_BUFFER_SIZE) \ + X("BUFFER_USAGE", GL_BUFFER_USAGE) \ + X("QUERY_COUNTER_BITS", GL_QUERY_COUNTER_BITS) \ + X("CURRENT_QUERY", GL_CURRENT_QUERY) \ + X("QUERY_RESULT", GL_QUERY_RESULT) \ + X("QUERY_RESULT_AVAILABLE", GL_QUERY_RESULT_AVAILABLE) \ + X("ARRAY_BUFFER", GL_ARRAY_BUFFER) \ + X("ELEMENT_ARRAY_BUFFER", GL_ELEMENT_ARRAY_BUFFER) \ + X("ARRAY_BUFFER_BINDING", GL_ARRAY_BUFFER_BINDING) \ + X("ELEMENT_ARRAY_BUFFER_BINDING", GL_ELEMENT_ARRAY_BUFFER_BINDING) \ + X("VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) \ + X("READ_ONLY", GL_READ_ONLY) \ + X("WRITE_ONLY", GL_WRITE_ONLY) \ + X("READ_WRITE", GL_READ_WRITE) \ + X("BUFFER_ACCESS", GL_BUFFER_ACCESS) \ + X("BUFFER_MAPPED", GL_BUFFER_MAPPED) \ + X("BUFFER_MAP_POINTER", GL_BUFFER_MAP_POINTER) \ + X("STREAM_DRAW", GL_STREAM_DRAW) \ + X("STREAM_READ", GL_STREAM_READ) \ + X("STREAM_COPY", GL_STREAM_COPY) \ + X("STATIC_DRAW", GL_STATIC_DRAW) \ + X("STATIC_READ", GL_STATIC_READ) \ + X("STATIC_COPY", GL_STATIC_COPY) \ + X("DYNAMIC_DRAW", GL_DYNAMIC_DRAW) \ + X("DYNAMIC_READ", GL_DYNAMIC_READ) \ + X("DYNAMIC_COPY", GL_DYNAMIC_COPY) \ + X("SAMPLES_PASSED", GL_SAMPLES_PASSED) \ + X("SRC1_ALPHA", GL_SRC1_ALPHA) \ + X("VERTEX_ARRAY_BUFFER_BINDING", GL_VERTEX_ARRAY_BUFFER_BINDING) \ + X("NORMAL_ARRAY_BUFFER_BINDING", GL_NORMAL_ARRAY_BUFFER_BINDING) \ + X("COLOR_ARRAY_BUFFER_BINDING", GL_COLOR_ARRAY_BUFFER_BINDING) \ + X("INDEX_ARRAY_BUFFER_BINDING", GL_INDEX_ARRAY_BUFFER_BINDING) \ + X("TEXTURE_COORD_ARRAY_BUFFER_BINDING", GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING) \ + X("EDGE_FLAG_ARRAY_BUFFER_BINDING", GL_EDGE_FLAG_ARRAY_BUFFER_BINDING) \ + X("SECONDARY_COLOR_ARRAY_BUFFER_BINDING", GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING) \ + X("FOG_COORDINATE_ARRAY_BUFFER_BINDING", GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING) \ + X("WEIGHT_ARRAY_BUFFER_BINDING", GL_WEIGHT_ARRAY_BUFFER_BINDING) \ + X("FOG_COORD_SRC", GL_FOG_COORD_SRC) \ + X("FOG_COORD", GL_FOG_COORD) \ + X("CURRENT_FOG_COORD", GL_CURRENT_FOG_COORD) \ + X("FOG_COORD_ARRAY_TYPE", GL_FOG_COORD_ARRAY_TYPE) \ + X("FOG_COORD_ARRAY_STRIDE", GL_FOG_COORD_ARRAY_STRIDE) \ + X("FOG_COORD_ARRAY_POINTER", GL_FOG_COORD_ARRAY_POINTER) \ + X("FOG_COORD_ARRAY", GL_FOG_COORD_ARRAY) \ + X("FOG_COORD_ARRAY_BUFFER_BINDING", GL_FOG_COORD_ARRAY_BUFFER_BINDING) \ + X("SRC0_RGB", GL_SRC0_RGB) \ + X("SRC1_RGB", GL_SRC1_RGB) \ + X("SRC2_RGB", GL_SRC2_RGB) \ + X("SRC0_ALPHA", GL_SRC0_ALPHA) \ + X("SRC2_ALPHA", GL_SRC2_ALPHA) \ + X("BLEND_EQUATION_RGB", GL_BLEND_EQUATION_RGB) \ + X("VERTEX_ATTRIB_ARRAY_ENABLED", GL_VERTEX_ATTRIB_ARRAY_ENABLED) \ + X("VERTEX_ATTRIB_ARRAY_SIZE", GL_VERTEX_ATTRIB_ARRAY_SIZE) \ + X("VERTEX_ATTRIB_ARRAY_STRIDE", GL_VERTEX_ATTRIB_ARRAY_STRIDE) \ + X("VERTEX_ATTRIB_ARRAY_TYPE", GL_VERTEX_ATTRIB_ARRAY_TYPE) \ + X("CURRENT_VERTEX_ATTRIB", GL_CURRENT_VERTEX_ATTRIB) \ + X("VERTEX_PROGRAM_POINT_SIZE", GL_VERTEX_PROGRAM_POINT_SIZE) \ + X("VERTEX_ATTRIB_ARRAY_POINTER", GL_VERTEX_ATTRIB_ARRAY_POINTER) \ + X("STENCIL_BACK_FUNC", GL_STENCIL_BACK_FUNC) \ + X("STENCIL_BACK_FAIL", GL_STENCIL_BACK_FAIL) \ + X("STENCIL_BACK_PASS_DEPTH_FAIL", GL_STENCIL_BACK_PASS_DEPTH_FAIL) \ + X("STENCIL_BACK_PASS_DEPTH_PASS", GL_STENCIL_BACK_PASS_DEPTH_PASS) \ + X("MAX_DRAW_BUFFERS", GL_MAX_DRAW_BUFFERS) \ + X("DRAW_BUFFER0", GL_DRAW_BUFFER0) \ + X("DRAW_BUFFER1", GL_DRAW_BUFFER1) \ + X("DRAW_BUFFER2", GL_DRAW_BUFFER2) \ + X("DRAW_BUFFER3", GL_DRAW_BUFFER3) \ + X("DRAW_BUFFER4", GL_DRAW_BUFFER4) \ + X("DRAW_BUFFER5", GL_DRAW_BUFFER5) \ + X("DRAW_BUFFER6", GL_DRAW_BUFFER6) \ + X("DRAW_BUFFER7", GL_DRAW_BUFFER7) \ + X("DRAW_BUFFER8", GL_DRAW_BUFFER8) \ + X("DRAW_BUFFER9", GL_DRAW_BUFFER9) \ + X("DRAW_BUFFER10", GL_DRAW_BUFFER10) \ + X("DRAW_BUFFER11", GL_DRAW_BUFFER11) \ + X("DRAW_BUFFER12", GL_DRAW_BUFFER12) \ + X("DRAW_BUFFER13", GL_DRAW_BUFFER13) \ + X("DRAW_BUFFER14", GL_DRAW_BUFFER14) \ + X("DRAW_BUFFER15", GL_DRAW_BUFFER15) \ + X("BLEND_EQUATION_ALPHA", GL_BLEND_EQUATION_ALPHA) \ + X("MAX_VERTEX_ATTRIBS", GL_MAX_VERTEX_ATTRIBS) \ + X("VERTEX_ATTRIB_ARRAY_NORMALIZED", GL_VERTEX_ATTRIB_ARRAY_NORMALIZED) \ + X("MAX_TEXTURE_IMAGE_UNITS", GL_MAX_TEXTURE_IMAGE_UNITS) \ + X("FRAGMENT_SHADER", GL_FRAGMENT_SHADER) \ + X("VERTEX_SHADER", GL_VERTEX_SHADER) \ + X("MAX_FRAGMENT_UNIFORM_COMPONENTS", GL_MAX_FRAGMENT_UNIFORM_COMPONENTS) \ + X("MAX_VERTEX_UNIFORM_COMPONENTS", GL_MAX_VERTEX_UNIFORM_COMPONENTS) \ + X("MAX_VARYING_FLOATS", GL_MAX_VARYING_FLOATS) \ + X("MAX_VERTEX_TEXTURE_IMAGE_UNITS", GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS) \ + X("MAX_COMBINED_TEXTURE_IMAGE_UNITS", GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS) \ + X("SHADER_TYPE", GL_SHADER_TYPE) \ + X("FLOAT_VEC2", GL_FLOAT_VEC2) \ + X("FLOAT_VEC3", GL_FLOAT_VEC3) \ + X("FLOAT_VEC4", GL_FLOAT_VEC4) \ + X("INT_VEC2", GL_INT_VEC2) \ + X("INT_VEC3", GL_INT_VEC3) \ + X("INT_VEC4", GL_INT_VEC4) \ + X("BOOL", GL_BOOL) \ + X("BOOL_VEC2", GL_BOOL_VEC2) \ + X("BOOL_VEC3", GL_BOOL_VEC3) \ + X("BOOL_VEC4", GL_BOOL_VEC4) \ + X("FLOAT_MAT2", GL_FLOAT_MAT2) \ + X("FLOAT_MAT3", GL_FLOAT_MAT3) \ + X("FLOAT_MAT4", GL_FLOAT_MAT4) \ + X("SAMPLER_1D", GL_SAMPLER_1D) \ + X("SAMPLER_2D", GL_SAMPLER_2D) \ + X("SAMPLER_3D", GL_SAMPLER_3D) \ + X("SAMPLER_CUBE", GL_SAMPLER_CUBE) \ + X("SAMPLER_1D_SHADOW", GL_SAMPLER_1D_SHADOW) \ + X("SAMPLER_2D_SHADOW", GL_SAMPLER_2D_SHADOW) \ + X("DELETE_STATUS", GL_DELETE_STATUS) \ + X("COMPILE_STATUS", GL_COMPILE_STATUS) \ + X("LINK_STATUS", GL_LINK_STATUS) \ + X("VALIDATE_STATUS", GL_VALIDATE_STATUS) \ + X("INFO_LOG_LENGTH", GL_INFO_LOG_LENGTH) \ + X("ATTACHED_SHADERS", GL_ATTACHED_SHADERS) \ + X("ACTIVE_UNIFORMS", GL_ACTIVE_UNIFORMS) \ + X("ACTIVE_UNIFORM_MAX_LENGTH", GL_ACTIVE_UNIFORM_MAX_LENGTH) \ + X("SHADER_SOURCE_LENGTH", GL_SHADER_SOURCE_LENGTH) \ + X("ACTIVE_ATTRIBUTES", GL_ACTIVE_ATTRIBUTES) \ + X("ACTIVE_ATTRIBUTE_MAX_LENGTH", GL_ACTIVE_ATTRIBUTE_MAX_LENGTH) \ + X("FRAGMENT_SHADER_DERIVATIVE_HINT", GL_FRAGMENT_SHADER_DERIVATIVE_HINT) \ + X("SHADING_LANGUAGE_VERSION", GL_SHADING_LANGUAGE_VERSION) \ + X("CURRENT_PROGRAM", GL_CURRENT_PROGRAM) \ + X("POINT_SPRITE_COORD_ORIGIN", GL_POINT_SPRITE_COORD_ORIGIN) \ + X("LOWER_LEFT", GL_LOWER_LEFT) \ + X("UPPER_LEFT", GL_UPPER_LEFT) \ + X("STENCIL_BACK_REF", GL_STENCIL_BACK_REF) \ + X("STENCIL_BACK_VALUE_MASK", GL_STENCIL_BACK_VALUE_MASK) \ + X("STENCIL_BACK_WRITEMASK", GL_STENCIL_BACK_WRITEMASK) \ + X("VERTEX_PROGRAM_TWO_SIDE", GL_VERTEX_PROGRAM_TWO_SIDE) \ + X("POINT_SPRITE", GL_POINT_SPRITE) \ + X("COORD_REPLACE", GL_COORD_REPLACE) \ + X("MAX_TEXTURE_COORDS", GL_MAX_TEXTURE_COORDS) \ + X("PIXEL_PACK_BUFFER", GL_PIXEL_PACK_BUFFER) \ + X("PIXEL_UNPACK_BUFFER", GL_PIXEL_UNPACK_BUFFER) \ + X("PIXEL_PACK_BUFFER_BINDING", GL_PIXEL_PACK_BUFFER_BINDING) \ + X("PIXEL_UNPACK_BUFFER_BINDING", GL_PIXEL_UNPACK_BUFFER_BINDING) \ + X("FLOAT_MAT2x3", GL_FLOAT_MAT2x3) \ + X("FLOAT_MAT2x4", GL_FLOAT_MAT2x4) \ + X("FLOAT_MAT3x2", GL_FLOAT_MAT3x2) \ + X("FLOAT_MAT3x4", GL_FLOAT_MAT3x4) \ + X("FLOAT_MAT4x2", GL_FLOAT_MAT4x2) \ + X("FLOAT_MAT4x3", GL_FLOAT_MAT4x3) \ + X("SRGB", GL_SRGB) \ + X("SRGB8", GL_SRGB8) \ + X("SRGB_ALPHA", GL_SRGB_ALPHA) \ + X("SRGB8_ALPHA8", GL_SRGB8_ALPHA8) \ + X("COMPRESSED_SRGB", GL_COMPRESSED_SRGB) \ + X("COMPRESSED_SRGB_ALPHA", GL_COMPRESSED_SRGB_ALPHA) \ + X("CURRENT_RASTER_SECONDARY_COLOR", GL_CURRENT_RASTER_SECONDARY_COLOR) \ + X("SLUMINANCE_ALPHA", GL_SLUMINANCE_ALPHA) \ + X("SLUMINANCE8_ALPHA8", GL_SLUMINANCE8_ALPHA8) \ + X("SLUMINANCE", GL_SLUMINANCE) \ + X("SLUMINANCE8", GL_SLUMINANCE8) \ + X("COMPRESSED_SLUMINANCE", GL_COMPRESSED_SLUMINANCE) \ + X("COMPRESSED_SLUMINANCE_ALPHA", GL_COMPRESSED_SLUMINANCE_ALPHA) \ + X("COMPARE_REF_TO_TEXTURE", GL_COMPARE_REF_TO_TEXTURE) \ + X("CLIP_DISTANCE0", GL_CLIP_DISTANCE0) \ + X("CLIP_DISTANCE1", GL_CLIP_DISTANCE1) \ + X("CLIP_DISTANCE2", GL_CLIP_DISTANCE2) \ + X("CLIP_DISTANCE3", GL_CLIP_DISTANCE3) \ + X("CLIP_DISTANCE4", GL_CLIP_DISTANCE4) \ + X("CLIP_DISTANCE5", GL_CLIP_DISTANCE5) \ + X("CLIP_DISTANCE6", GL_CLIP_DISTANCE6) \ + X("CLIP_DISTANCE7", GL_CLIP_DISTANCE7) \ + X("MAX_CLIP_DISTANCES", GL_MAX_CLIP_DISTANCES) \ + X("MAJOR_VERSION", GL_MAJOR_VERSION) \ + X("MINOR_VERSION", GL_MINOR_VERSION) \ + X("NUM_EXTENSIONS", GL_NUM_EXTENSIONS) \ + X("CONTEXT_FLAGS", GL_CONTEXT_FLAGS) \ + X("COMPRESSED_RED", GL_COMPRESSED_RED) \ + X("COMPRESSED_RG", GL_COMPRESSED_RG) \ + X("CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT", GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT) \ + X("RGBA32F", GL_RGBA32F) \ + X("RGB32F", GL_RGB32F) \ + X("RGBA16F", GL_RGBA16F) \ + X("RGB16F", GL_RGB16F) \ + X("VERTEX_ATTRIB_ARRAY_INTEGER", GL_VERTEX_ATTRIB_ARRAY_INTEGER) \ + X("MAX_ARRAY_TEXTURE_LAYERS", GL_MAX_ARRAY_TEXTURE_LAYERS) \ + X("MIN_PROGRAM_TEXEL_OFFSET", GL_MIN_PROGRAM_TEXEL_OFFSET) \ + X("MAX_PROGRAM_TEXEL_OFFSET", GL_MAX_PROGRAM_TEXEL_OFFSET) \ + X("CLAMP_READ_COLOR", GL_CLAMP_READ_COLOR) \ + X("FIXED_ONLY", GL_FIXED_ONLY) \ + X("MAX_VARYING_COMPONENTS", GL_MAX_VARYING_COMPONENTS) \ + X("TEXTURE_1D_ARRAY", GL_TEXTURE_1D_ARRAY) \ + X("PROXY_TEXTURE_1D_ARRAY", GL_PROXY_TEXTURE_1D_ARRAY) \ + X("TEXTURE_2D_ARRAY", GL_TEXTURE_2D_ARRAY) \ + X("PROXY_TEXTURE_2D_ARRAY", GL_PROXY_TEXTURE_2D_ARRAY) \ + X("TEXTURE_BINDING_1D_ARRAY", GL_TEXTURE_BINDING_1D_ARRAY) \ + X("TEXTURE_BINDING_2D_ARRAY", GL_TEXTURE_BINDING_2D_ARRAY) \ + X("R11F_G11F_B10F", GL_R11F_G11F_B10F) \ + X("UNSIGNED_INT_10F_11F_11F_REV", GL_UNSIGNED_INT_10F_11F_11F_REV) \ + X("RGB9_E5", GL_RGB9_E5) \ + X("UNSIGNED_INT_5_9_9_9_REV", GL_UNSIGNED_INT_5_9_9_9_REV) \ + X("TEXTURE_SHARED_SIZE", GL_TEXTURE_SHARED_SIZE) \ + X("TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH", GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH) \ + X("TRANSFORM_FEEDBACK_BUFFER_MODE", GL_TRANSFORM_FEEDBACK_BUFFER_MODE) \ + X("MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS", GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS) \ + X("TRANSFORM_FEEDBACK_VARYINGS", GL_TRANSFORM_FEEDBACK_VARYINGS) \ + X("TRANSFORM_FEEDBACK_BUFFER_START", GL_TRANSFORM_FEEDBACK_BUFFER_START) \ + X("TRANSFORM_FEEDBACK_BUFFER_SIZE", GL_TRANSFORM_FEEDBACK_BUFFER_SIZE) \ + X("PRIMITIVES_GENERATED", GL_PRIMITIVES_GENERATED) \ + X("TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN", GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN) \ + X("RASTERIZER_DISCARD", GL_RASTERIZER_DISCARD) \ + X("MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS", GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS) \ + X("MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS", GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS) \ + X("INTERLEAVED_ATTRIBS", GL_INTERLEAVED_ATTRIBS) \ + X("SEPARATE_ATTRIBS", GL_SEPARATE_ATTRIBS) \ + X("TRANSFORM_FEEDBACK_BUFFER", GL_TRANSFORM_FEEDBACK_BUFFER) \ + X("TRANSFORM_FEEDBACK_BUFFER_BINDING", GL_TRANSFORM_FEEDBACK_BUFFER_BINDING) \ + X("RGBA32UI", GL_RGBA32UI) \ + X("RGB32UI", GL_RGB32UI) \ + X("RGBA16UI", GL_RGBA16UI) \ + X("RGB16UI", GL_RGB16UI) \ + X("RGBA8UI", GL_RGBA8UI) \ + X("RGB8UI", GL_RGB8UI) \ + X("RGBA32I", GL_RGBA32I) \ + X("RGB32I", GL_RGB32I) \ + X("RGBA16I", GL_RGBA16I) \ + X("RGB16I", GL_RGB16I) \ + X("RGBA8I", GL_RGBA8I) \ + X("RGB8I", GL_RGB8I) \ + X("RED_INTEGER", GL_RED_INTEGER) \ + X("GREEN_INTEGER", GL_GREEN_INTEGER) \ + X("BLUE_INTEGER", GL_BLUE_INTEGER) \ + X("RGB_INTEGER", GL_RGB_INTEGER) \ + X("RGBA_INTEGER", GL_RGBA_INTEGER) \ + X("BGR_INTEGER", GL_BGR_INTEGER) \ + X("BGRA_INTEGER", GL_BGRA_INTEGER) \ + X("SAMPLER_1D_ARRAY", GL_SAMPLER_1D_ARRAY) \ + X("SAMPLER_2D_ARRAY", GL_SAMPLER_2D_ARRAY) \ + X("SAMPLER_1D_ARRAY_SHADOW", GL_SAMPLER_1D_ARRAY_SHADOW) \ + X("SAMPLER_2D_ARRAY_SHADOW", GL_SAMPLER_2D_ARRAY_SHADOW) \ + X("SAMPLER_CUBE_SHADOW", GL_SAMPLER_CUBE_SHADOW) \ + X("UNSIGNED_INT_VEC2", GL_UNSIGNED_INT_VEC2) \ + X("UNSIGNED_INT_VEC3", GL_UNSIGNED_INT_VEC3) \ + X("UNSIGNED_INT_VEC4", GL_UNSIGNED_INT_VEC4) \ + X("INT_SAMPLER_1D", GL_INT_SAMPLER_1D) \ + X("INT_SAMPLER_2D", GL_INT_SAMPLER_2D) \ + X("INT_SAMPLER_3D", GL_INT_SAMPLER_3D) \ + X("INT_SAMPLER_CUBE", GL_INT_SAMPLER_CUBE) \ + X("INT_SAMPLER_1D_ARRAY", GL_INT_SAMPLER_1D_ARRAY) \ + X("INT_SAMPLER_2D_ARRAY", GL_INT_SAMPLER_2D_ARRAY) \ + X("UNSIGNED_INT_SAMPLER_1D", GL_UNSIGNED_INT_SAMPLER_1D) \ + X("UNSIGNED_INT_SAMPLER_2D", GL_UNSIGNED_INT_SAMPLER_2D) \ + X("UNSIGNED_INT_SAMPLER_3D", GL_UNSIGNED_INT_SAMPLER_3D) \ + X("UNSIGNED_INT_SAMPLER_CUBE", GL_UNSIGNED_INT_SAMPLER_CUBE) \ + X("UNSIGNED_INT_SAMPLER_1D_ARRAY", GL_UNSIGNED_INT_SAMPLER_1D_ARRAY) \ + X("UNSIGNED_INT_SAMPLER_2D_ARRAY", GL_UNSIGNED_INT_SAMPLER_2D_ARRAY) \ + X("QUERY_WAIT", GL_QUERY_WAIT) \ + X("QUERY_NO_WAIT", GL_QUERY_NO_WAIT) \ + X("QUERY_BY_REGION_WAIT", GL_QUERY_BY_REGION_WAIT) \ + X("QUERY_BY_REGION_NO_WAIT", GL_QUERY_BY_REGION_NO_WAIT) \ + X("BUFFER_ACCESS_FLAGS", GL_BUFFER_ACCESS_FLAGS) \ + X("BUFFER_MAP_LENGTH", GL_BUFFER_MAP_LENGTH) \ + X("BUFFER_MAP_OFFSET", GL_BUFFER_MAP_OFFSET) \ + X("DEPTH_COMPONENT32F", GL_DEPTH_COMPONENT32F) \ + X("DEPTH32F_STENCIL8", GL_DEPTH32F_STENCIL8) \ + X("FLOAT_32_UNSIGNED_INT_24_8_REV", GL_FLOAT_32_UNSIGNED_INT_24_8_REV) \ + X("INVALID_FRAMEBUFFER_OPERATION", GL_INVALID_FRAMEBUFFER_OPERATION) \ + X("FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING", GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) \ + X("FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE", GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE) \ + X("FRAMEBUFFER_ATTACHMENT_RED_SIZE", GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE) \ + X("FRAMEBUFFER_ATTACHMENT_GREEN_SIZE", GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE) \ + X("FRAMEBUFFER_ATTACHMENT_BLUE_SIZE", GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE) \ + X("FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE", GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE) \ + X("FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE", GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE) \ + X("FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE", GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE) \ + X("FRAMEBUFFER_DEFAULT", GL_FRAMEBUFFER_DEFAULT) \ + X("FRAMEBUFFER_UNDEFINED", GL_FRAMEBUFFER_UNDEFINED) \ + X("DEPTH_STENCIL_ATTACHMENT", GL_DEPTH_STENCIL_ATTACHMENT) \ + X("MAX_RENDERBUFFER_SIZE", GL_MAX_RENDERBUFFER_SIZE) \ + X("DEPTH_STENCIL", GL_DEPTH_STENCIL) \ + X("UNSIGNED_INT_24_8", GL_UNSIGNED_INT_24_8) \ + X("DEPTH24_STENCIL8", GL_DEPTH24_STENCIL8) \ + X("TEXTURE_STENCIL_SIZE", GL_TEXTURE_STENCIL_SIZE) \ + X("TEXTURE_RED_TYPE", GL_TEXTURE_RED_TYPE) \ + X("TEXTURE_GREEN_TYPE", GL_TEXTURE_GREEN_TYPE) \ + X("TEXTURE_BLUE_TYPE", GL_TEXTURE_BLUE_TYPE) \ + X("TEXTURE_ALPHA_TYPE", GL_TEXTURE_ALPHA_TYPE) \ + X("TEXTURE_DEPTH_TYPE", GL_TEXTURE_DEPTH_TYPE) \ + X("UNSIGNED_NORMALIZED", GL_UNSIGNED_NORMALIZED) \ + X("FRAMEBUFFER_BINDING", GL_FRAMEBUFFER_BINDING) \ + X("DRAW_FRAMEBUFFER_BINDING", GL_DRAW_FRAMEBUFFER_BINDING) \ + X("RENDERBUFFER_BINDING", GL_RENDERBUFFER_BINDING) \ + X("READ_FRAMEBUFFER", GL_READ_FRAMEBUFFER) \ + X("DRAW_FRAMEBUFFER", GL_DRAW_FRAMEBUFFER) \ + X("READ_FRAMEBUFFER_BINDING", GL_READ_FRAMEBUFFER_BINDING) \ + X("RENDERBUFFER_SAMPLES", GL_RENDERBUFFER_SAMPLES) \ + X("FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) \ + X("FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) \ + X("FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL) \ + X("FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE) \ + X("FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER", GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER) \ + X("FRAMEBUFFER_COMPLETE", GL_FRAMEBUFFER_COMPLETE) \ + X("FRAMEBUFFER_INCOMPLETE_ATTACHMENT", GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT) \ + X("FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT) \ + X("FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER", GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER) \ + X("FRAMEBUFFER_INCOMPLETE_READ_BUFFER", GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER) \ + X("FRAMEBUFFER_UNSUPPORTED", GL_FRAMEBUFFER_UNSUPPORTED) \ + X("MAX_COLOR_ATTACHMENTS", GL_MAX_COLOR_ATTACHMENTS) \ + X("COLOR_ATTACHMENT0", GL_COLOR_ATTACHMENT0) \ + X("COLOR_ATTACHMENT1", GL_COLOR_ATTACHMENT1) \ + X("COLOR_ATTACHMENT2", GL_COLOR_ATTACHMENT2) \ + X("COLOR_ATTACHMENT3", GL_COLOR_ATTACHMENT3) \ + X("COLOR_ATTACHMENT4", GL_COLOR_ATTACHMENT4) \ + X("COLOR_ATTACHMENT5", GL_COLOR_ATTACHMENT5) \ + X("COLOR_ATTACHMENT6", GL_COLOR_ATTACHMENT6) \ + X("COLOR_ATTACHMENT7", GL_COLOR_ATTACHMENT7) \ + X("COLOR_ATTACHMENT8", GL_COLOR_ATTACHMENT8) \ + X("COLOR_ATTACHMENT9", GL_COLOR_ATTACHMENT9) \ + X("COLOR_ATTACHMENT10", GL_COLOR_ATTACHMENT10) \ + X("COLOR_ATTACHMENT11", GL_COLOR_ATTACHMENT11) \ + X("COLOR_ATTACHMENT12", GL_COLOR_ATTACHMENT12) \ + X("COLOR_ATTACHMENT13", GL_COLOR_ATTACHMENT13) \ + X("COLOR_ATTACHMENT14", GL_COLOR_ATTACHMENT14) \ + X("COLOR_ATTACHMENT15", GL_COLOR_ATTACHMENT15) \ + X("COLOR_ATTACHMENT16", GL_COLOR_ATTACHMENT16) \ + X("COLOR_ATTACHMENT17", GL_COLOR_ATTACHMENT17) \ + X("COLOR_ATTACHMENT18", GL_COLOR_ATTACHMENT18) \ + X("COLOR_ATTACHMENT19", GL_COLOR_ATTACHMENT19) \ + X("COLOR_ATTACHMENT20", GL_COLOR_ATTACHMENT20) \ + X("COLOR_ATTACHMENT21", GL_COLOR_ATTACHMENT21) \ + X("COLOR_ATTACHMENT22", GL_COLOR_ATTACHMENT22) \ + X("COLOR_ATTACHMENT23", GL_COLOR_ATTACHMENT23) \ + X("COLOR_ATTACHMENT24", GL_COLOR_ATTACHMENT24) \ + X("COLOR_ATTACHMENT25", GL_COLOR_ATTACHMENT25) \ + X("COLOR_ATTACHMENT26", GL_COLOR_ATTACHMENT26) \ + X("COLOR_ATTACHMENT27", GL_COLOR_ATTACHMENT27) \ + X("COLOR_ATTACHMENT28", GL_COLOR_ATTACHMENT28) \ + X("COLOR_ATTACHMENT29", GL_COLOR_ATTACHMENT29) \ + X("COLOR_ATTACHMENT30", GL_COLOR_ATTACHMENT30) \ + X("COLOR_ATTACHMENT31", GL_COLOR_ATTACHMENT31) \ + X("DEPTH_ATTACHMENT", GL_DEPTH_ATTACHMENT) \ + X("STENCIL_ATTACHMENT", GL_STENCIL_ATTACHMENT) \ + X("FRAMEBUFFER", GL_FRAMEBUFFER) \ + X("RENDERBUFFER", GL_RENDERBUFFER) \ + X("RENDERBUFFER_WIDTH", GL_RENDERBUFFER_WIDTH) \ + X("RENDERBUFFER_HEIGHT", GL_RENDERBUFFER_HEIGHT) \ + X("RENDERBUFFER_INTERNAL_FORMAT", GL_RENDERBUFFER_INTERNAL_FORMAT) \ + X("STENCIL_INDEX1", GL_STENCIL_INDEX1) \ + X("STENCIL_INDEX4", GL_STENCIL_INDEX4) \ + X("STENCIL_INDEX8", GL_STENCIL_INDEX8) \ + X("STENCIL_INDEX16", GL_STENCIL_INDEX16) \ + X("RENDERBUFFER_RED_SIZE", GL_RENDERBUFFER_RED_SIZE) \ + X("RENDERBUFFER_GREEN_SIZE", GL_RENDERBUFFER_GREEN_SIZE) \ + X("RENDERBUFFER_BLUE_SIZE", GL_RENDERBUFFER_BLUE_SIZE) \ + X("RENDERBUFFER_ALPHA_SIZE", GL_RENDERBUFFER_ALPHA_SIZE) \ + X("RENDERBUFFER_DEPTH_SIZE", GL_RENDERBUFFER_DEPTH_SIZE) \ + X("RENDERBUFFER_STENCIL_SIZE", GL_RENDERBUFFER_STENCIL_SIZE) \ + X("FRAMEBUFFER_INCOMPLETE_MULTISAMPLE", GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE) \ + X("MAX_SAMPLES", GL_MAX_SAMPLES) \ + X("INDEX", GL_INDEX) \ + X("TEXTURE_LUMINANCE_TYPE", GL_TEXTURE_LUMINANCE_TYPE) \ + X("TEXTURE_INTENSITY_TYPE", GL_TEXTURE_INTENSITY_TYPE) \ + X("FRAMEBUFFER_SRGB", GL_FRAMEBUFFER_SRGB) \ + X("HALF_FLOAT", GL_HALF_FLOAT) \ + X("MAP_READ_BIT", GL_MAP_READ_BIT) \ + X("MAP_WRITE_BIT", GL_MAP_WRITE_BIT) \ + X("MAP_INVALIDATE_RANGE_BIT", GL_MAP_INVALIDATE_RANGE_BIT) \ + X("MAP_INVALIDATE_BUFFER_BIT", GL_MAP_INVALIDATE_BUFFER_BIT) \ + X("MAP_FLUSH_EXPLICIT_BIT", GL_MAP_FLUSH_EXPLICIT_BIT) \ + X("MAP_UNSYNCHRONIZED_BIT", GL_MAP_UNSYNCHRONIZED_BIT) \ + X("COMPRESSED_RED_RGTC1", GL_COMPRESSED_RED_RGTC1) \ + X("COMPRESSED_SIGNED_RED_RGTC1", GL_COMPRESSED_SIGNED_RED_RGTC1) \ + X("COMPRESSED_RG_RGTC2", GL_COMPRESSED_RG_RGTC2) \ + X("COMPRESSED_SIGNED_RG_RGTC2", GL_COMPRESSED_SIGNED_RG_RGTC2) \ + X("RG", GL_RG) \ + X("RG_INTEGER", GL_RG_INTEGER) \ + X("R8", GL_R8) \ + X("R16", GL_R16) \ + X("RG8", GL_RG8) \ + X("RG16", GL_RG16) \ + X("R16F", GL_R16F) \ + X("R32F", GL_R32F) \ + X("RG16F", GL_RG16F) \ + X("RG32F", GL_RG32F) \ + X("R8I", GL_R8I) \ + X("R8UI", GL_R8UI) \ + X("R16I", GL_R16I) \ + X("R16UI", GL_R16UI) \ + X("R32I", GL_R32I) \ + X("R32UI", GL_R32UI) \ + X("RG8I", GL_RG8I) \ + X("RG8UI", GL_RG8UI) \ + X("RG16I", GL_RG16I) \ + X("RG16UI", GL_RG16UI) \ + X("RG32I", GL_RG32I) \ + X("RG32UI", GL_RG32UI) \ + X("VERTEX_ARRAY_BINDING", GL_VERTEX_ARRAY_BINDING) \ + X("CLAMP_VERTEX_COLOR", GL_CLAMP_VERTEX_COLOR) \ + X("CLAMP_FRAGMENT_COLOR", GL_CLAMP_FRAGMENT_COLOR) \ + X("ALPHA_INTEGER", GL_ALPHA_INTEGER) \ + X("SAMPLER_2D_RECT", GL_SAMPLER_2D_RECT) \ + X("SAMPLER_2D_RECT_SHADOW", GL_SAMPLER_2D_RECT_SHADOW) \ + X("SAMPLER_BUFFER", GL_SAMPLER_BUFFER) \ + X("INT_SAMPLER_2D_RECT", GL_INT_SAMPLER_2D_RECT) \ + X("INT_SAMPLER_BUFFER", GL_INT_SAMPLER_BUFFER) \ + X("UNSIGNED_INT_SAMPLER_2D_RECT", GL_UNSIGNED_INT_SAMPLER_2D_RECT) \ + X("UNSIGNED_INT_SAMPLER_BUFFER", GL_UNSIGNED_INT_SAMPLER_BUFFER) \ + X("TEXTURE_BUFFER", GL_TEXTURE_BUFFER) \ + X("MAX_TEXTURE_BUFFER_SIZE", GL_MAX_TEXTURE_BUFFER_SIZE) \ + X("TEXTURE_BINDING_BUFFER", GL_TEXTURE_BINDING_BUFFER) \ + X("TEXTURE_BUFFER_DATA_STORE_BINDING", GL_TEXTURE_BUFFER_DATA_STORE_BINDING) \ + X("TEXTURE_RECTANGLE", GL_TEXTURE_RECTANGLE) \ + X("TEXTURE_BINDING_RECTANGLE", GL_TEXTURE_BINDING_RECTANGLE) \ + X("PROXY_TEXTURE_RECTANGLE", GL_PROXY_TEXTURE_RECTANGLE) \ + X("MAX_RECTANGLE_TEXTURE_SIZE", GL_MAX_RECTANGLE_TEXTURE_SIZE) \ + X("R8_SNORM", GL_R8_SNORM) \ + X("RG8_SNORM", GL_RG8_SNORM) \ + X("RGB8_SNORM", GL_RGB8_SNORM) \ + X("RGBA8_SNORM", GL_RGBA8_SNORM) \ + X("R16_SNORM", GL_R16_SNORM) \ + X("RG16_SNORM", GL_RG16_SNORM) \ + X("RGB16_SNORM", GL_RGB16_SNORM) \ + X("RGBA16_SNORM", GL_RGBA16_SNORM) \ + X("SIGNED_NORMALIZED", GL_SIGNED_NORMALIZED) \ + X("PRIMITIVE_RESTART", GL_PRIMITIVE_RESTART) \ + X("PRIMITIVE_RESTART_INDEX", GL_PRIMITIVE_RESTART_INDEX) \ + X("COPY_READ_BUFFER", GL_COPY_READ_BUFFER) \ + X("COPY_WRITE_BUFFER", GL_COPY_WRITE_BUFFER) \ + X("UNIFORM_BUFFER", GL_UNIFORM_BUFFER) \ + X("UNIFORM_BUFFER_BINDING", GL_UNIFORM_BUFFER_BINDING) \ + X("UNIFORM_BUFFER_START", GL_UNIFORM_BUFFER_START) \ + X("UNIFORM_BUFFER_SIZE", GL_UNIFORM_BUFFER_SIZE) \ + X("MAX_VERTEX_UNIFORM_BLOCKS", GL_MAX_VERTEX_UNIFORM_BLOCKS) \ + X("MAX_GEOMETRY_UNIFORM_BLOCKS", GL_MAX_GEOMETRY_UNIFORM_BLOCKS) \ + X("MAX_FRAGMENT_UNIFORM_BLOCKS", GL_MAX_FRAGMENT_UNIFORM_BLOCKS) \ + X("MAX_COMBINED_UNIFORM_BLOCKS", GL_MAX_COMBINED_UNIFORM_BLOCKS) \ + X("MAX_UNIFORM_BUFFER_BINDINGS", GL_MAX_UNIFORM_BUFFER_BINDINGS) \ + X("MAX_UNIFORM_BLOCK_SIZE", GL_MAX_UNIFORM_BLOCK_SIZE) \ + X("MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS", GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS) \ + X("MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS", GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS) \ + X("MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS", GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS) \ + X("UNIFORM_BUFFER_OFFSET_ALIGNMENT", GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT) \ + X("ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH", GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH) \ + X("ACTIVE_UNIFORM_BLOCKS", GL_ACTIVE_UNIFORM_BLOCKS) \ + X("UNIFORM_TYPE", GL_UNIFORM_TYPE) \ + X("UNIFORM_SIZE", GL_UNIFORM_SIZE) \ + X("UNIFORM_NAME_LENGTH", GL_UNIFORM_NAME_LENGTH) \ + X("UNIFORM_BLOCK_INDEX", GL_UNIFORM_BLOCK_INDEX) \ + X("UNIFORM_OFFSET", GL_UNIFORM_OFFSET) \ + X("UNIFORM_ARRAY_STRIDE", GL_UNIFORM_ARRAY_STRIDE) \ + X("UNIFORM_MATRIX_STRIDE", GL_UNIFORM_MATRIX_STRIDE) \ + X("UNIFORM_IS_ROW_MAJOR", GL_UNIFORM_IS_ROW_MAJOR) \ + X("UNIFORM_BLOCK_BINDING", GL_UNIFORM_BLOCK_BINDING) \ + X("UNIFORM_BLOCK_DATA_SIZE", GL_UNIFORM_BLOCK_DATA_SIZE) \ + X("UNIFORM_BLOCK_NAME_LENGTH", GL_UNIFORM_BLOCK_NAME_LENGTH) \ + X("UNIFORM_BLOCK_ACTIVE_UNIFORMS", GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS) \ + X("UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES", GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES) \ + X("UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER", GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER) \ + X("UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER", GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER) \ + X("UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER", GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER) \ + X("INVALID_INDEX", GL_INVALID_INDEX) \ + X("CONTEXT_CORE_PROFILE_BIT", GL_CONTEXT_CORE_PROFILE_BIT) \ + X("CONTEXT_COMPATIBILITY_PROFILE_BIT", GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) \ + X("LINES_ADJACENCY", GL_LINES_ADJACENCY) \ + X("LINE_STRIP_ADJACENCY", GL_LINE_STRIP_ADJACENCY) \ + X("TRIANGLES_ADJACENCY", GL_TRIANGLES_ADJACENCY) \ + X("TRIANGLE_STRIP_ADJACENCY", GL_TRIANGLE_STRIP_ADJACENCY) \ + X("PROGRAM_POINT_SIZE", GL_PROGRAM_POINT_SIZE) \ + X("MAX_GEOMETRY_TEXTURE_IMAGE_UNITS", GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS) \ + X("FRAMEBUFFER_ATTACHMENT_LAYERED", GL_FRAMEBUFFER_ATTACHMENT_LAYERED) \ + X("FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS", GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS) \ + X("GEOMETRY_SHADER", GL_GEOMETRY_SHADER) \ + X("GEOMETRY_VERTICES_OUT", GL_GEOMETRY_VERTICES_OUT) \ + X("GEOMETRY_INPUT_TYPE", GL_GEOMETRY_INPUT_TYPE) \ + X("GEOMETRY_OUTPUT_TYPE", GL_GEOMETRY_OUTPUT_TYPE) \ + X("MAX_GEOMETRY_UNIFORM_COMPONENTS", GL_MAX_GEOMETRY_UNIFORM_COMPONENTS) \ + X("MAX_GEOMETRY_OUTPUT_VERTICES", GL_MAX_GEOMETRY_OUTPUT_VERTICES) \ + X("MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS", GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS) \ + X("MAX_VERTEX_OUTPUT_COMPONENTS", GL_MAX_VERTEX_OUTPUT_COMPONENTS) \ + X("MAX_GEOMETRY_INPUT_COMPONENTS", GL_MAX_GEOMETRY_INPUT_COMPONENTS) \ + X("MAX_GEOMETRY_OUTPUT_COMPONENTS", GL_MAX_GEOMETRY_OUTPUT_COMPONENTS) \ + X("MAX_FRAGMENT_INPUT_COMPONENTS", GL_MAX_FRAGMENT_INPUT_COMPONENTS) \ + X("CONTEXT_PROFILE_MASK", GL_CONTEXT_PROFILE_MASK) \ + X("DEPTH_CLAMP", GL_DEPTH_CLAMP) \ + X("QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION", GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION) \ + X("FIRST_VERTEX_CONVENTION", GL_FIRST_VERTEX_CONVENTION) \ + X("LAST_VERTEX_CONVENTION", GL_LAST_VERTEX_CONVENTION) \ + X("PROVOKING_VERTEX", GL_PROVOKING_VERTEX) \ + X("TEXTURE_CUBE_MAP_SEAMLESS", GL_TEXTURE_CUBE_MAP_SEAMLESS) \ + X("MAX_SERVER_WAIT_TIMEOUT", GL_MAX_SERVER_WAIT_TIMEOUT) \ + X("OBJECT_TYPE", GL_OBJECT_TYPE) \ + X("SYNC_CONDITION", GL_SYNC_CONDITION) \ + X("SYNC_STATUS", GL_SYNC_STATUS) \ + X("SYNC_FLAGS", GL_SYNC_FLAGS) \ + X("SYNC_FENCE", GL_SYNC_FENCE) \ + X("SYNC_GPU_COMMANDS_COMPLETE", GL_SYNC_GPU_COMMANDS_COMPLETE) \ + X("UNSIGNALED", GL_UNSIGNALED) \ + X("SIGNALED", GL_SIGNALED) \ + X("ALREADY_SIGNALED", GL_ALREADY_SIGNALED) \ + X("TIMEOUT_EXPIRED", GL_TIMEOUT_EXPIRED) \ + X("CONDITION_SATISFIED", GL_CONDITION_SATISFIED) \ + X("WAIT_FAILED", GL_WAIT_FAILED) \ + X("TIMEOUT_IGNORED", GL_TIMEOUT_IGNORED) \ + X("SYNC_FLUSH_COMMANDS_BIT", GL_SYNC_FLUSH_COMMANDS_BIT) \ + X("SAMPLE_POSITION", GL_SAMPLE_POSITION) \ + X("SAMPLE_MASK", GL_SAMPLE_MASK) \ + X("SAMPLE_MASK_VALUE", GL_SAMPLE_MASK_VALUE) \ + X("MAX_SAMPLE_MASK_WORDS", GL_MAX_SAMPLE_MASK_WORDS) \ + X("TEXTURE_2D_MULTISAMPLE", GL_TEXTURE_2D_MULTISAMPLE) \ + X("PROXY_TEXTURE_2D_MULTISAMPLE", GL_PROXY_TEXTURE_2D_MULTISAMPLE) \ + X("TEXTURE_2D_MULTISAMPLE_ARRAY", GL_TEXTURE_2D_MULTISAMPLE_ARRAY) \ + X("PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY", GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY) \ + X("TEXTURE_BINDING_2D_MULTISAMPLE", GL_TEXTURE_BINDING_2D_MULTISAMPLE) \ + X("TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY", GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY) \ + X("TEXTURE_SAMPLES", GL_TEXTURE_SAMPLES) \ + X("TEXTURE_FIXED_SAMPLE_LOCATIONS", GL_TEXTURE_FIXED_SAMPLE_LOCATIONS) \ + X("SAMPLER_2D_MULTISAMPLE", GL_SAMPLER_2D_MULTISAMPLE) \ + X("INT_SAMPLER_2D_MULTISAMPLE", GL_INT_SAMPLER_2D_MULTISAMPLE) \ + X("UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE", GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE) \ + X("SAMPLER_2D_MULTISAMPLE_ARRAY", GL_SAMPLER_2D_MULTISAMPLE_ARRAY) \ + X("INT_SAMPLER_2D_MULTISAMPLE_ARRAY", GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY) \ + X("UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY", GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY) \ + X("MAX_COLOR_TEXTURE_SAMPLES", GL_MAX_COLOR_TEXTURE_SAMPLES) \ + X("MAX_DEPTH_TEXTURE_SAMPLES", GL_MAX_DEPTH_TEXTURE_SAMPLES) \ + X("MAX_INTEGER_SAMPLES", GL_MAX_INTEGER_SAMPLES) \ + X("VERTEX_ATTRIB_ARRAY_DIVISOR", GL_VERTEX_ATTRIB_ARRAY_DIVISOR) \ + X("SRC1_COLOR", GL_SRC1_COLOR) \ + X("ONE_MINUS_SRC1_COLOR", GL_ONE_MINUS_SRC1_COLOR) \ + X("ONE_MINUS_SRC1_ALPHA", GL_ONE_MINUS_SRC1_ALPHA) \ + X("MAX_DUAL_SOURCE_DRAW_BUFFERS", GL_MAX_DUAL_SOURCE_DRAW_BUFFERS) \ + X("ANY_SAMPLES_PASSED", GL_ANY_SAMPLES_PASSED) \ + X("SAMPLER_BINDING", GL_SAMPLER_BINDING) \ + X("RGB10_A2UI", GL_RGB10_A2UI) \ + X("TEXTURE_SWIZZLE_R", GL_TEXTURE_SWIZZLE_R) \ + X("TEXTURE_SWIZZLE_G", GL_TEXTURE_SWIZZLE_G) \ + X("TEXTURE_SWIZZLE_B", GL_TEXTURE_SWIZZLE_B) \ + X("TEXTURE_SWIZZLE_A", GL_TEXTURE_SWIZZLE_A) \ + X("TEXTURE_SWIZZLE_RGBA", GL_TEXTURE_SWIZZLE_RGBA) \ + X("TIME_ELAPSED", GL_TIME_ELAPSED) \ + X("TIMESTAMP", GL_TIMESTAMP) \ + X("INT_2_10_10_10_REV", GL_INT_2_10_10_10_REV) \ + X("SAMPLE_SHADING", GL_SAMPLE_SHADING) \ + X("MIN_SAMPLE_SHADING_VALUE", GL_MIN_SAMPLE_SHADING_VALUE) \ + X("MIN_PROGRAM_TEXTURE_GATHER_OFFSET", GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET) \ + X("MAX_PROGRAM_TEXTURE_GATHER_OFFSET", GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET) \ + X("TEXTURE_CUBE_MAP_ARRAY", GL_TEXTURE_CUBE_MAP_ARRAY) \ + X("TEXTURE_BINDING_CUBE_MAP_ARRAY", GL_TEXTURE_BINDING_CUBE_MAP_ARRAY) \ + X("PROXY_TEXTURE_CUBE_MAP_ARRAY", GL_PROXY_TEXTURE_CUBE_MAP_ARRAY) \ + X("SAMPLER_CUBE_MAP_ARRAY", GL_SAMPLER_CUBE_MAP_ARRAY) \ + X("SAMPLER_CUBE_MAP_ARRAY_SHADOW", GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW) \ + X("INT_SAMPLER_CUBE_MAP_ARRAY", GL_INT_SAMPLER_CUBE_MAP_ARRAY) \ + X("UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY", GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY) \ + X("DRAW_INDIRECT_BUFFER", GL_DRAW_INDIRECT_BUFFER) \ + X("DRAW_INDIRECT_BUFFER_BINDING", GL_DRAW_INDIRECT_BUFFER_BINDING) \ + X("GEOMETRY_SHADER_INVOCATIONS", GL_GEOMETRY_SHADER_INVOCATIONS) \ + X("MAX_GEOMETRY_SHADER_INVOCATIONS", GL_MAX_GEOMETRY_SHADER_INVOCATIONS) \ + X("MIN_FRAGMENT_INTERPOLATION_OFFSET", GL_MIN_FRAGMENT_INTERPOLATION_OFFSET) \ + X("MAX_FRAGMENT_INTERPOLATION_OFFSET", GL_MAX_FRAGMENT_INTERPOLATION_OFFSET) \ + X("FRAGMENT_INTERPOLATION_OFFSET_BITS", GL_FRAGMENT_INTERPOLATION_OFFSET_BITS) \ + X("MAX_VERTEX_STREAMS", GL_MAX_VERTEX_STREAMS) \ + X("DOUBLE_VEC2", GL_DOUBLE_VEC2) \ + X("DOUBLE_VEC3", GL_DOUBLE_VEC3) \ + X("DOUBLE_VEC4", GL_DOUBLE_VEC4) \ + X("DOUBLE_MAT2", GL_DOUBLE_MAT2) \ + X("DOUBLE_MAT3", GL_DOUBLE_MAT3) \ + X("DOUBLE_MAT4", GL_DOUBLE_MAT4) \ + X("DOUBLE_MAT2x3", GL_DOUBLE_MAT2x3) \ + X("DOUBLE_MAT2x4", GL_DOUBLE_MAT2x4) \ + X("DOUBLE_MAT3x2", GL_DOUBLE_MAT3x2) \ + X("DOUBLE_MAT3x4", GL_DOUBLE_MAT3x4) \ + X("DOUBLE_MAT4x2", GL_DOUBLE_MAT4x2) \ + X("DOUBLE_MAT4x3", GL_DOUBLE_MAT4x3) \ + X("ACTIVE_SUBROUTINES", GL_ACTIVE_SUBROUTINES) \ + X("ACTIVE_SUBROUTINE_UNIFORMS", GL_ACTIVE_SUBROUTINE_UNIFORMS) \ + X("ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS", GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS) \ + X("ACTIVE_SUBROUTINE_MAX_LENGTH", GL_ACTIVE_SUBROUTINE_MAX_LENGTH) \ + X("ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH", GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH) \ + X("MAX_SUBROUTINES", GL_MAX_SUBROUTINES) \ + X("MAX_SUBROUTINE_UNIFORM_LOCATIONS", GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS) \ + X("NUM_COMPATIBLE_SUBROUTINES", GL_NUM_COMPATIBLE_SUBROUTINES) \ + X("COMPATIBLE_SUBROUTINES", GL_COMPATIBLE_SUBROUTINES) \ + X("PATCHES", GL_PATCHES) \ + X("PATCH_VERTICES", GL_PATCH_VERTICES) \ + X("PATCH_DEFAULT_INNER_LEVEL", GL_PATCH_DEFAULT_INNER_LEVEL) \ + X("PATCH_DEFAULT_OUTER_LEVEL", GL_PATCH_DEFAULT_OUTER_LEVEL) \ + X("TESS_CONTROL_OUTPUT_VERTICES", GL_TESS_CONTROL_OUTPUT_VERTICES) \ + X("TESS_GEN_MODE", GL_TESS_GEN_MODE) \ + X("TESS_GEN_SPACING", GL_TESS_GEN_SPACING) \ + X("TESS_GEN_VERTEX_ORDER", GL_TESS_GEN_VERTEX_ORDER) \ + X("TESS_GEN_POINT_MODE", GL_TESS_GEN_POINT_MODE) \ + X("ISOLINES", GL_ISOLINES) \ + X("FRACTIONAL_ODD", GL_FRACTIONAL_ODD) \ + X("FRACTIONAL_EVEN", GL_FRACTIONAL_EVEN) \ + X("MAX_PATCH_VERTICES", GL_MAX_PATCH_VERTICES) \ + X("MAX_TESS_GEN_LEVEL", GL_MAX_TESS_GEN_LEVEL) \ + X("MAX_TESS_CONTROL_UNIFORM_COMPONENTS", GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS) \ + X("MAX_TESS_EVALUATION_UNIFORM_COMPONENTS", GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS) \ + X("MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS", GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS) \ + X("MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS", GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS) \ + X("MAX_TESS_CONTROL_OUTPUT_COMPONENTS", GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS) \ + X("MAX_TESS_PATCH_COMPONENTS", GL_MAX_TESS_PATCH_COMPONENTS) \ + X("MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS", GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS) \ + X("MAX_TESS_EVALUATION_OUTPUT_COMPONENTS", GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS) \ + X("MAX_TESS_CONTROL_UNIFORM_BLOCKS", GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS) \ + X("MAX_TESS_EVALUATION_UNIFORM_BLOCKS", GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS) \ + X("MAX_TESS_CONTROL_INPUT_COMPONENTS", GL_MAX_TESS_CONTROL_INPUT_COMPONENTS) \ + X("MAX_TESS_EVALUATION_INPUT_COMPONENTS", GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS) \ + X("MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS", GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS) \ + X("MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS", GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS) \ + X("UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER", GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER) \ + X("UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER", GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER) \ + X("TESS_EVALUATION_SHADER", GL_TESS_EVALUATION_SHADER) \ + X("TESS_CONTROL_SHADER", GL_TESS_CONTROL_SHADER) \ + X("TRANSFORM_FEEDBACK", GL_TRANSFORM_FEEDBACK) \ + X("TRANSFORM_FEEDBACK_BUFFER_PAUSED", GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED) \ + X("TRANSFORM_FEEDBACK_BUFFER_ACTIVE", GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE) \ + X("TRANSFORM_FEEDBACK_BINDING", GL_TRANSFORM_FEEDBACK_BINDING) \ + X("MAX_TRANSFORM_FEEDBACK_BUFFERS", GL_MAX_TRANSFORM_FEEDBACK_BUFFERS) \ + X("FIXED", GL_FIXED) \ + X("IMPLEMENTATION_COLOR_READ_TYPE", GL_IMPLEMENTATION_COLOR_READ_TYPE) \ + X("IMPLEMENTATION_COLOR_READ_FORMAT", GL_IMPLEMENTATION_COLOR_READ_FORMAT) \ + X("LOW_FLOAT", GL_LOW_FLOAT) \ + X("MEDIUM_FLOAT", GL_MEDIUM_FLOAT) \ + X("HIGH_FLOAT", GL_HIGH_FLOAT) \ + X("LOW_INT", GL_LOW_INT) \ + X("MEDIUM_INT", GL_MEDIUM_INT) \ + X("HIGH_INT", GL_HIGH_INT) \ + X("SHADER_COMPILER", GL_SHADER_COMPILER) \ + X("SHADER_BINARY_FORMATS", GL_SHADER_BINARY_FORMATS) \ + X("NUM_SHADER_BINARY_FORMATS", GL_NUM_SHADER_BINARY_FORMATS) \ + X("MAX_VERTEX_UNIFORM_VECTORS", GL_MAX_VERTEX_UNIFORM_VECTORS) \ + X("MAX_VARYING_VECTORS", GL_MAX_VARYING_VECTORS) \ + X("MAX_FRAGMENT_UNIFORM_VECTORS", GL_MAX_FRAGMENT_UNIFORM_VECTORS) \ + X("RGB565", GL_RGB565) \ + X("PROGRAM_BINARY_RETRIEVABLE_HINT", GL_PROGRAM_BINARY_RETRIEVABLE_HINT) \ + X("PROGRAM_BINARY_LENGTH", GL_PROGRAM_BINARY_LENGTH) \ + X("NUM_PROGRAM_BINARY_FORMATS", GL_NUM_PROGRAM_BINARY_FORMATS) \ + X("PROGRAM_BINARY_FORMATS", GL_PROGRAM_BINARY_FORMATS) \ + X("VERTEX_SHADER_BIT", GL_VERTEX_SHADER_BIT) \ + X("FRAGMENT_SHADER_BIT", GL_FRAGMENT_SHADER_BIT) \ + X("GEOMETRY_SHADER_BIT", GL_GEOMETRY_SHADER_BIT) \ + X("TESS_CONTROL_SHADER_BIT", GL_TESS_CONTROL_SHADER_BIT) \ + X("TESS_EVALUATION_SHADER_BIT", GL_TESS_EVALUATION_SHADER_BIT) \ + X("ALL_SHADER_BITS", GL_ALL_SHADER_BITS) \ + X("PROGRAM_SEPARABLE", GL_PROGRAM_SEPARABLE) \ + X("ACTIVE_PROGRAM", GL_ACTIVE_PROGRAM) \ + X("PROGRAM_PIPELINE_BINDING", GL_PROGRAM_PIPELINE_BINDING) \ + X("MAX_VIEWPORTS", GL_MAX_VIEWPORTS) \ + X("VIEWPORT_SUBPIXEL_BITS", GL_VIEWPORT_SUBPIXEL_BITS) \ + X("VIEWPORT_BOUNDS_RANGE", GL_VIEWPORT_BOUNDS_RANGE) \ + X("LAYER_PROVOKING_VERTEX", GL_LAYER_PROVOKING_VERTEX) \ + X("VIEWPORT_INDEX_PROVOKING_VERTEX", GL_VIEWPORT_INDEX_PROVOKING_VERTEX) \ + X("UNDEFINED_VERTEX", GL_UNDEFINED_VERTEX) \ + X("VERSION_1_0", GL_VERSION_1_0) \ + + + +#define X(name, func) int func(lua_State *L); +GL_FUNCTIONS +#undef X + +#endif diff --git a/src/opengl/bind/a b/src/opengl/bind/a new file mode 100644 index 0000000..b414962 --- /dev/null +++ b/src/opengl/bind/a @@ -0,0 +1,3 @@ +void glActiveShaderProgram( GLuint pipeline, GLuint program); +void glActiveTexture( GLenum texture); +void glAttachShader( GLuint program, GLuint shader); diff --git a/src/opengl/bind/a.bind b/src/opengl/bind/a.bind new file mode 100644 index 0000000..41eef56 --- /dev/null +++ b/src/opengl/bind/a.bind @@ -0,0 +1,26 @@ +int glActiveShaderProgram_bind(lua_State *L) +{ + GLuint pipeline = luaL_checkinteger(L, 1); + GLuint program = luaL_checkinteger(L, 2); + glActiveShaderProgram(pipeline, program); + return 0; +} + + +int glActiveTexture_bind(lua_State *L) +{ + GLenum texture = luaL_checkinteger(L, 1); + glActiveTexture(texture); + return 0; +} + + +int glAttachShader_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLuint shader = luaL_checkinteger(L, 2); + glAttachShader(program, shader); + return 0; +} + + diff --git a/src/opengl/bind/b b/src/opengl/bind/b new file mode 100644 index 0000000..e95cea1 --- /dev/null +++ b/src/opengl/bind/b @@ -0,0 +1,35 @@ +void glBeginConditionalRender( GLuint id, GLenum mode); +void glBeginQuery( GLenum target, GLuint id); +void glBeginQuery( GLenum target, GLuint id); +void glBeginTransformFeedback( GLenum primitiveMode); +void glBindAttribLocation( GLuint program, GLuint index, const GLchar *name); +void glBindBuffer( GLenum target, GLuint buffer); +void glBindBufferBase( GLenum target, GLuint index, GLuint buffer); +void glBindBufferRange( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +void glBindFragDataLocation( GLuint program, GLuint colorNumber, const char * name); +void glBindFragDataLocationIndexed( GLuint program, GLuint colorNumber, GLuint index, const char *name); +void glBindFramebuffer( GLenum target, GLuint framebuffer); +void glBindImageTexture( GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +void glBindProgramPipeline( GLuint pipeline); +void glBindRenderbuffer( GLenum target, GLuint renderbuffer); +void glBindSampler( GLuint unit, GLuint sampler); +void glBindTexture( GLenum target, GLuint texture); +void glBindTextureUnit( GLuint unit, GLuint texture); +void glBindTransformFeedback( GLenum target, GLuint id); +void glBindVertexArray( GLuint array); +void glBindVertexBuffer( GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +void glBlendColor( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +void glBlendEquation( GLenum mode); + +void glBlendEquationi( GLuint buf, GLenum mode); +void glBlendEquationSeparate( GLenum modeRGB, GLenum modeAlpha); +void glBlendEquationSeparatei( GLuint buf, GLenum modeRGB, GLenum modeAlpha); +void glBlendFunc( GLenum sfactor, GLenum dfactor); +void glBlendFunci( GLuint buf, GLenum sfactor, GLenum dfactor); +void glBlendFuncSeparate( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +void glBlendFuncSeparatei( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +void glBlitFramebuffer( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +void glBlitNamedFramebuffer( GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +void glBufferData( GLenum target, GLsizeiptr size, const void * data, GLenum usage); +void glBufferStorage( GLenum target, GLsizeiptr size, const void * data, GLbitfield flags); +void glBufferSubData( GLenum target, GLintptr offset, GLsizeiptr size, const void * data); diff --git a/src/opengl/bind/b.bind b/src/opengl/bind/b.bind new file mode 100644 index 0000000..ee2cfa0 --- /dev/null +++ b/src/opengl/bind/b.bind @@ -0,0 +1,350 @@ +int glBeginConditionalRender_bind(lua_State *L) +{ + GLuint id = luaL_checkinteger(L, 1); + GLenum mode = luaL_checkinteger(L, 2); + glBeginConditionalRender(id, mode); + return 0; +} + + +int glBeginQuery_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint id = luaL_checkinteger(L, 2); + glBeginQuery(target, id); + return 0; +} + + +int glBeginQuery_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint id = luaL_checkinteger(L, 2); + glBeginQuery(target, id); + return 0; +} + + +int glBeginTransformFeedback_bind(lua_State *L) +{ + GLenum primitiveMode = luaL_checkinteger(L, 1); + glBeginTransformFeedback(primitiveMode); + return 0; +} + + +int glBindAttribLocation_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + const GLchar * name = luaL_checkstring(L, 3); + glBindAttribLocation(program, index, name); + return 0; +} + + +int glBindBuffer_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint buffer = luaL_checkinteger(L, 2); + glBindBuffer(target, buffer); + return 0; +} + + +int glBindBufferBase_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + GLuint buffer = luaL_checkinteger(L, 3); + glBindBufferBase(target, index, buffer); + return 0; +} + + +int glBindBufferRange_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + GLuint buffer = luaL_checkinteger(L, 3); + GLintptr offset = luaL_checkinteger(L, 4); + GLsizeiptr size = luaL_checkinteger(L, 5); + glBindBufferRange(target, index, buffer, offset, size); + return 0; +} + + +int glBindFragDataLocation_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLuint colorNumber = luaL_checkinteger(L, 2); + const char * name = luaL_checkstring(L, 3); + glBindFragDataLocation(program, colorNumber, name); + return 0; +} + + +int glBindFragDataLocationIndexed_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLuint colorNumber = luaL_checkinteger(L, 2); + GLuint index = luaL_checkinteger(L, 3); + const char * name = luaL_checkstring(L, 4); + glBindFragDataLocationIndexed(program, colorNumber, index, name); + return 0; +} + + +int glBindFramebuffer_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint framebuffer = luaL_checkinteger(L, 2); + glBindFramebuffer(target, framebuffer); + return 0; +} + + +int glBindImageTexture_bind(lua_State *L) +{ + GLuint unit = luaL_checkinteger(L, 1); + GLuint texture = luaL_checkinteger(L, 2); + GLint level = luaL_checkinteger(L, 3); + GLboolean layered = get: GLboolean + GLint layer = luaL_checkinteger(L, 5); + GLenum access = luaL_checkinteger(L, 6); + GLenum format = luaL_checkinteger(L, 7); + glBindImageTexture(unit, texture, level, layered, layer, access, format); + return 0; +} + + +int glBindProgramPipeline_bind(lua_State *L) +{ + GLuint pipeline = luaL_checkinteger(L, 1); + glBindProgramPipeline(pipeline); + return 0; +} + + +int glBindRenderbuffer_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint renderbuffer = luaL_checkinteger(L, 2); + glBindRenderbuffer(target, renderbuffer); + return 0; +} + + +int glBindSampler_bind(lua_State *L) +{ + GLuint unit = luaL_checkinteger(L, 1); + GLuint sampler = luaL_checkinteger(L, 2); + glBindSampler(unit, sampler); + return 0; +} + + +int glBindTexture_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint texture = luaL_checkinteger(L, 2); + glBindTexture(target, texture); + return 0; +} + + +int glBindTextureUnit_bind(lua_State *L) +{ + GLuint unit = luaL_checkinteger(L, 1); + GLuint texture = luaL_checkinteger(L, 2); + glBindTextureUnit(unit, texture); + return 0; +} + + +int glBindTransformFeedback_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint id = luaL_checkinteger(L, 2); + glBindTransformFeedback(target, id); + return 0; +} + + +int glBindVertexArray_bind(lua_State *L) +{ + GLuint array = luaL_checkinteger(L, 1); + glBindVertexArray(array); + return 0; +} + + +int glBindVertexBuffer_bind(lua_State *L) +{ + GLuint bindingindex = luaL_checkinteger(L, 1); + GLuint buffer = luaL_checkinteger(L, 2); + GLintptr offset = luaL_checkinteger(L, 3); + GLsizei stride = luaL_checkinteger(L, 4); + glBindVertexBuffer(bindingindex, buffer, offset, stride); + return 0; +} + + +int glBlendColor_bind(lua_State *L) +{ + GLfloat red = luaL_checknumber(L, 1); + GLfloat green = luaL_checknumber(L, 2); + GLfloat blue = luaL_checknumber(L, 3); + GLfloat alpha = luaL_checknumber(L, 4); + glBlendColor(red, green, blue, alpha); + return 0; +} + + +int glBlendEquation_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + glBlendEquation(mode); + return 0; +} + + +int glBlendEquationi_bind(lua_State *L) +{ + GLuint buf = luaL_checkinteger(L, 1); + GLenum mode = luaL_checkinteger(L, 2); + glBlendEquationi(buf, mode); + return 0; +} + + +int glBlendEquationSeparate_bind(lua_State *L) +{ + GLenum modeRGB = luaL_checkinteger(L, 1); + GLenum modeAlpha = luaL_checkinteger(L, 2); + glBlendEquationSeparate(modeRGB, modeAlpha); + return 0; +} + + +int glBlendEquationSeparatei_bind(lua_State *L) +{ + GLuint buf = luaL_checkinteger(L, 1); + GLenum modeRGB = luaL_checkinteger(L, 2); + GLenum modeAlpha = luaL_checkinteger(L, 3); + glBlendEquationSeparatei(buf, modeRGB, modeAlpha); + return 0; +} + + +int glBlendFunc_bind(lua_State *L) +{ + GLenum sfactor = luaL_checkinteger(L, 1); + GLenum dfactor = luaL_checkinteger(L, 2); + glBlendFunc(sfactor, dfactor); + return 0; +} + + +int glBlendFunci_bind(lua_State *L) +{ + GLuint buf = luaL_checkinteger(L, 1); + GLenum sfactor = luaL_checkinteger(L, 2); + GLenum dfactor = luaL_checkinteger(L, 3); + glBlendFunci(buf, sfactor, dfactor); + return 0; +} + + +int glBlendFuncSeparate_bind(lua_State *L) +{ + GLenum srcRGB = luaL_checkinteger(L, 1); + GLenum dstRGB = luaL_checkinteger(L, 2); + GLenum srcAlpha = luaL_checkinteger(L, 3); + GLenum dstAlpha = luaL_checkinteger(L, 4); + glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); + return 0; +} + + +int glBlendFuncSeparatei_bind(lua_State *L) +{ + GLuint buf = luaL_checkinteger(L, 1); + GLenum srcRGB = luaL_checkinteger(L, 2); + GLenum dstRGB = luaL_checkinteger(L, 3); + GLenum srcAlpha = luaL_checkinteger(L, 4); + GLenum dstAlpha = luaL_checkinteger(L, 5); + glBlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); + return 0; +} + + +int glBlitFramebuffer_bind(lua_State *L) +{ + GLint srcX0 = luaL_checkinteger(L, 1); + GLint srcY0 = luaL_checkinteger(L, 2); + GLint srcX1 = luaL_checkinteger(L, 3); + GLint srcY1 = luaL_checkinteger(L, 4); + GLint dstX0 = luaL_checkinteger(L, 5); + GLint dstY0 = luaL_checkinteger(L, 6); + GLint dstX1 = luaL_checkinteger(L, 7); + GLint dstY1 = luaL_checkinteger(L, 8); + GLbitfield mask = luaL_checkinteger(L, 9); + GLenum filter = luaL_checkinteger(L, 10); + glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + return 0; +} + + +int glBlitNamedFramebuffer_bind(lua_State *L) +{ + GLuint readFramebuffer = luaL_checkinteger(L, 1); + GLuint drawFramebuffer = luaL_checkinteger(L, 2); + GLint srcX0 = luaL_checkinteger(L, 3); + GLint srcY0 = luaL_checkinteger(L, 4); + GLint srcX1 = luaL_checkinteger(L, 5); + GLint srcY1 = luaL_checkinteger(L, 6); + GLint dstX0 = luaL_checkinteger(L, 7); + GLint dstY0 = luaL_checkinteger(L, 8); + GLint dstX1 = luaL_checkinteger(L, 9); + GLint dstY1 = luaL_checkinteger(L, 10); + GLbitfield mask = luaL_checkinteger(L, 11); + GLenum filter = luaL_checkinteger(L, 12); + glBlitNamedFramebuffer(readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + return 0; +} + + +int glBufferData_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLsizeiptr size = luaL_checkinteger(L, 2); + const void * data = get: const void * + GLenum usage = luaL_checkinteger(L, 4); + glBufferData(target, size, data, usage); + return 0; +} + + +int glBufferStorage_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLsizeiptr size = luaL_checkinteger(L, 2); + const void * data = get: const void * + GLbitfield flags = luaL_checkinteger(L, 4); + glBufferStorage(target, size, data, flags); + return 0; +} + + +int glBufferSubData_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLintptr offset = luaL_checkinteger(L, 2); + GLsizeiptr size = luaL_checkinteger(L, 3); + const void * data = get: const void * + glBufferSubData(target, offset, size, data); + return 0; +} + + diff --git a/src/opengl/bind/c b/src/opengl/bind/c new file mode 100644 index 0000000..a53aa8f --- /dev/null +++ b/src/opengl/bind/c @@ -0,0 +1,31 @@ +GLenum glCheckFramebufferStatus( GLenum target); +GLenum glCheckNamedFramebufferStatus( GLuint framebuffer, GLenum target); +void glClampColor( GLenum target, GLenum clamp); +void glClear( GLbitfield mask); +void glClearBufferiv( GLenum buffer, GLint drawbuffer, const GLint * value); +void glClearBufferuiv( GLenum buffer, GLint drawbuffer, const GLuint * value); +void glClearBufferfv( GLenum buffer, GLint drawbuffer, const GLfloat * value); +void glClearBufferfi( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +void glClearStencil( GLint s); +GLenum glClientWaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout); +void glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +void glColorMaski( GLuint buf, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +void glCompileShader( GLuint shader); +void glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void * data); +void glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data); +void glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data); +void glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * data); +void glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data); +void glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data); +void glCopyBufferSubData( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +void glCopyBufferSubData( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +void glCopyTexImage1D( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +void glCopyTexImage2D( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +void glCopyTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +void glCopyTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +void glCopyTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLuint glCreateProgram( void); +GLuint glCreateShader( GLenum shaderType); +GLuint glCreateShaderProgramv( GLenum type, GLsizei count, const char **strings); +void glCullFace( GLenum mode); + diff --git a/src/opengl/bind/c.bind b/src/opengl/bind/c.bind new file mode 100644 index 0000000..1cf6e80 --- /dev/null +++ b/src/opengl/bind/c.bind @@ -0,0 +1,354 @@ +int glCheckFramebufferStatus_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum bind_result = glCheckFramebufferStatus(target); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glCheckNamedFramebufferStatus_bind(lua_State *L) +{ + GLuint framebuffer = luaL_checkinteger(L, 1); + GLenum target = luaL_checkinteger(L, 2); + GLenum bind_result = glCheckNamedFramebufferStatus(framebuffer, target); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glClampColor_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum clamp = luaL_checkinteger(L, 2); + glClampColor(target, clamp); + return 0; +} + + +int glClear_bind(lua_State *L) +{ + GLbitfield mask = luaL_checkinteger(L, 1); + glClear(mask); + return 0; +} + + +int glClearBufferiv_bind(lua_State *L) +{ + GLenum buffer = luaL_checkinteger(L, 1); + GLint drawbuffer = luaL_checkinteger(L, 2); + const GLint * value = get: const GLint * + glClearBufferiv(buffer, drawbuffer, value); + return 0; +} + + +int glClearBufferuiv_bind(lua_State *L) +{ + GLenum buffer = luaL_checkinteger(L, 1); + GLint drawbuffer = luaL_checkinteger(L, 2); + const GLuint * value = get: const GLuint * + glClearBufferuiv(buffer, drawbuffer, value); + return 0; +} + + +int glClearBufferfv_bind(lua_State *L) +{ + GLenum buffer = luaL_checkinteger(L, 1); + GLint drawbuffer = luaL_checkinteger(L, 2); + const GLfloat * value = get: const GLfloat * + glClearBufferfv(buffer, drawbuffer, value); + return 0; +} + + +int glClearBufferfi_bind(lua_State *L) +{ + GLenum buffer = luaL_checkinteger(L, 1); + GLint drawbuffer = luaL_checkinteger(L, 2); + GLfloat depth = luaL_checknumber(L, 3); + GLint stencil = luaL_checkinteger(L, 4); + glClearBufferfi(buffer, drawbuffer, depth, stencil); + return 0; +} + + +int glClearStencil_bind(lua_State *L) +{ + GLint s = luaL_checkinteger(L, 1); + glClearStencil(s); + return 0; +} + + +int glClientWaitSync_bind(lua_State *L) +{ + GLsync sync = luaL_checkinteger(L, 1); + GLbitfield flags = luaL_checkinteger(L, 2); + GLuint64 timeout = luaL_checkinteger(L, 3); + GLenum bind_result = glClientWaitSync(sync, flags, timeout); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glColorMask_bind(lua_State *L) +{ + GLboolean red = get: GLboolean + GLboolean green = get: GLboolean + GLboolean blue = get: GLboolean + GLboolean alpha = get: GLboolean + glColorMask(red, green, blue, alpha); + return 0; +} + + +int glColorMaski_bind(lua_State *L) +{ + GLuint buf = luaL_checkinteger(L, 1); + GLboolean red = get: GLboolean + GLboolean green = get: GLboolean + GLboolean blue = get: GLboolean + GLboolean alpha = get: GLboolean + glColorMaski(buf, red, green, blue, alpha); + return 0; +} + + +int glCompileShader_bind(lua_State *L) +{ + GLuint shader = luaL_checkinteger(L, 1); + glCompileShader(shader); + return 0; +} + + +int glCompressedTexImage1D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLenum internalformat = luaL_checkinteger(L, 3); + GLsizei width = luaL_checkinteger(L, 4); + GLint border = luaL_checkinteger(L, 5); + GLsizei imageSize = luaL_checkinteger(L, 6); + const void * data = get: const void * + glCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data); + return 0; +} + + +int glCompressedTexImage2D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLenum internalformat = luaL_checkinteger(L, 3); + GLsizei width = luaL_checkinteger(L, 4); + GLsizei height = luaL_checkinteger(L, 5); + GLint border = luaL_checkinteger(L, 6); + GLsizei imageSize = luaL_checkinteger(L, 7); + const void * data = get: const void * + glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); + return 0; +} + + +int glCompressedTexImage3D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLenum internalformat = luaL_checkinteger(L, 3); + GLsizei width = luaL_checkinteger(L, 4); + GLsizei height = luaL_checkinteger(L, 5); + GLsizei depth = luaL_checkinteger(L, 6); + GLint border = luaL_checkinteger(L, 7); + GLsizei imageSize = luaL_checkinteger(L, 8); + const void * data = get: const void * + glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data); + return 0; +} + + +int glCompressedTexSubImage1D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLint xoffset = luaL_checkinteger(L, 3); + GLsizei width = luaL_checkinteger(L, 4); + GLenum format = luaL_checkinteger(L, 5); + GLsizei imageSize = luaL_checkinteger(L, 6); + const void * data = get: const void * + glCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data); + return 0; +} + + +int glCompressedTexSubImage2D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLint xoffset = luaL_checkinteger(L, 3); + GLint yoffset = luaL_checkinteger(L, 4); + GLsizei width = luaL_checkinteger(L, 5); + GLsizei height = luaL_checkinteger(L, 6); + GLenum format = luaL_checkinteger(L, 7); + GLsizei imageSize = luaL_checkinteger(L, 8); + const void * data = get: const void * + glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); + return 0; +} + + +int glCompressedTexSubImage3D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLint xoffset = luaL_checkinteger(L, 3); + GLint yoffset = luaL_checkinteger(L, 4); + GLint zoffset = luaL_checkinteger(L, 5); + GLsizei width = luaL_checkinteger(L, 6); + GLsizei height = luaL_checkinteger(L, 7); + GLsizei depth = luaL_checkinteger(L, 8); + GLenum format = luaL_checkinteger(L, 9); + GLsizei imageSize = luaL_checkinteger(L, 10); + const void * data = get: const void * + glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); + return 0; +} + + +int glCopyBufferSubData_bind(lua_State *L) +{ + GLenum readTarget = luaL_checkinteger(L, 1); + GLenum writeTarget = luaL_checkinteger(L, 2); + GLintptr readOffset = luaL_checkinteger(L, 3); + GLintptr writeOffset = luaL_checkinteger(L, 4); + GLsizeiptr size = luaL_checkinteger(L, 5); + glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); + return 0; +} + + +int glCopyBufferSubData_bind(lua_State *L) +{ + GLenum readTarget = luaL_checkinteger(L, 1); + GLenum writeTarget = luaL_checkinteger(L, 2); + GLintptr readOffset = luaL_checkinteger(L, 3); + GLintptr writeOffset = luaL_checkinteger(L, 4); + GLsizeiptr size = luaL_checkinteger(L, 5); + glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); + return 0; +} + + +int glCopyTexImage1D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLenum internalformat = luaL_checkinteger(L, 3); + GLint x = luaL_checkinteger(L, 4); + GLint y = luaL_checkinteger(L, 5); + GLsizei width = luaL_checkinteger(L, 6); + GLint border = luaL_checkinteger(L, 7); + glCopyTexImage1D(target, level, internalformat, x, y, width, border); + return 0; +} + + +int glCopyTexImage2D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLenum internalformat = luaL_checkinteger(L, 3); + GLint x = luaL_checkinteger(L, 4); + GLint y = luaL_checkinteger(L, 5); + GLsizei width = luaL_checkinteger(L, 6); + GLsizei height = luaL_checkinteger(L, 7); + GLint border = luaL_checkinteger(L, 8); + glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); + return 0; +} + + +int glCopyTexSubImage1D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLint xoffset = luaL_checkinteger(L, 3); + GLint x = luaL_checkinteger(L, 4); + GLint y = luaL_checkinteger(L, 5); + GLsizei width = luaL_checkinteger(L, 6); + glCopyTexSubImage1D(target, level, xoffset, x, y, width); + return 0; +} + + +int glCopyTexSubImage2D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLint xoffset = luaL_checkinteger(L, 3); + GLint yoffset = luaL_checkinteger(L, 4); + GLint x = luaL_checkinteger(L, 5); + GLint y = luaL_checkinteger(L, 6); + GLsizei width = luaL_checkinteger(L, 7); + GLsizei height = luaL_checkinteger(L, 8); + glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); + return 0; +} + + +int glCopyTexSubImage3D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLint xoffset = luaL_checkinteger(L, 3); + GLint yoffset = luaL_checkinteger(L, 4); + GLint zoffset = luaL_checkinteger(L, 5); + GLint x = luaL_checkinteger(L, 6); + GLint y = luaL_checkinteger(L, 7); + GLsizei width = luaL_checkinteger(L, 8); + GLsizei height = luaL_checkinteger(L, 9); + glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); + return 0; +} + + +int glCreateProgram_bind(lua_State *L) +{ + void = get: + GLuint bind_result = glCreateProgram(void); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glCreateShader_bind(lua_State *L) +{ + GLenum shaderType = luaL_checkinteger(L, 1); + GLuint bind_result = glCreateShader(shaderType); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glCreateShaderProgramv_bind(lua_State *L) +{ + GLenum type = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const char ** strings = get: const char ** + GLuint bind_result = glCreateShaderProgramv(type, count, strings); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glCullFace_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + glCullFace(mode); + return 0; +} + + diff --git a/src/opengl/bind/d b/src/opengl/bind/d new file mode 100644 index 0000000..1437c2e --- /dev/null +++ b/src/opengl/bind/d @@ -0,0 +1,36 @@ +void glDeleteBuffers( GLsizei n, const GLuint * buffers); +void glDeleteFramebuffers( GLsizei n, GLuint *framebuffers); +void glDeleteProgram( GLuint program); +void glDeleteProgramPipelines( GLsizei n, const GLuint *pipelines); +void glDeleteQueries( GLsizei n, const GLuint * ids); +void glDeleteRenderbuffers( GLsizei n, GLuint *renderbuffers); +void glDeleteSamplers( GLsizei n, const GLuint * samplers); +void glDeleteShader( GLuint shader); +void glDeleteSync( GLsync sync); +void glDeleteTextures( GLsizei n, const GLuint * textures); +void glDeleteTransformFeedbacks( GLsizei n, const GLuint *ids); +void glDeleteVertexArrays( GLsizei n, const GLuint *arrays); +void glDepthFunc( GLenum func); +void glDepthMask( GLboolean flag); +void glDepthRange( GLdouble nearVal, GLdouble farVal); +void glDepthRangef( GLfloat nearVal, GLfloat farVal); +void glDepthRangeArrayv( GLuint first, GLsizei count, const GLdouble *v); +void glDepthRangeIndexed( GLuint index, GLdouble nearVal, GLdouble farVal); +void glDetachShader( GLuint program, GLuint shader); +void glDisable( GLenum cap); +void glDisablei( GLenum cap, GLuint index); +void glDisableVertexAttribArray( GLuint index); +void glDrawArrays( GLenum mode, GLint first, GLsizei count); +void glDrawArraysIndirect( GLenum mode, const void *indirect); +void glDrawArraysInstanced( GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +void glDrawBuffer( GLenum buf); +void glDrawBuffers( GLsizei n, const GLenum *bufs); +void glDrawElements( GLenum mode, GLsizei count, GLenum type, const void * indices); +void glDrawElementsBaseVertex( GLenum mode, GLsizei count, GLenum type, void *indices, GLint basevertex); +void glDrawElementsIndirect( GLenum mode, GLenum type, const void *indirect); +void glDrawElementsInstanced( GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount); +void glDrawRangeElements( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices); +void glDrawRangeElementsBaseVertex( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, void *indices, GLint basevertex); +void glDrawTransformFeedback( GLenum mode, GLuint id); +void glDrawTransformFeedbackStream( GLenum mode, GLuint id, GLuint stream); + diff --git a/src/opengl/bind/d.bind b/src/opengl/bind/d.bind new file mode 100644 index 0000000..b307029 --- /dev/null +++ b/src/opengl/bind/d.bind @@ -0,0 +1,331 @@ +int glDeleteBuffers_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + const GLuint * buffers = get: const GLuint * + glDeleteBuffers(n, buffers); + return 0; +} + + +int glDeleteFramebuffers_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + GLuint * framebuffers = get: GLuint * + glDeleteFramebuffers(n, framebuffers); + return 0; +} + + +int glDeleteProgram_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + glDeleteProgram(program); + return 0; +} + + +int glDeleteProgramPipelines_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + const GLuint * pipelines = get: const GLuint * + glDeleteProgramPipelines(n, pipelines); + return 0; +} + + +int glDeleteQueries_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + const GLuint * ids = get: const GLuint * + glDeleteQueries(n, ids); + return 0; +} + + +int glDeleteRenderbuffers_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + GLuint * renderbuffers = get: GLuint * + glDeleteRenderbuffers(n, renderbuffers); + return 0; +} + + +int glDeleteSamplers_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + const GLuint * samplers = get: const GLuint * + glDeleteSamplers(n, samplers); + return 0; +} + + +int glDeleteShader_bind(lua_State *L) +{ + GLuint shader = luaL_checkinteger(L, 1); + glDeleteShader(shader); + return 0; +} + + +int glDeleteSync_bind(lua_State *L) +{ + GLsync sync = luaL_checkinteger(L, 1); + glDeleteSync(sync); + return 0; +} + + +int glDeleteTextures_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + const GLuint * textures = get: const GLuint * + glDeleteTextures(n, textures); + return 0; +} + + +int glDeleteTransformFeedbacks_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + const GLuint * ids = get: const GLuint * + glDeleteTransformFeedbacks(n, ids); + return 0; +} + + +int glDeleteVertexArrays_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + const GLuint * arrays = get: const GLuint * + glDeleteVertexArrays(n, arrays); + return 0; +} + + +int glDepthFunc_bind(lua_State *L) +{ + GLenum func = luaL_checkinteger(L, 1); + glDepthFunc(func); + return 0; +} + + +int glDepthMask_bind(lua_State *L) +{ + GLboolean flag = get: GLboolean + glDepthMask(flag); + return 0; +} + + +int glDepthRange_bind(lua_State *L) +{ + GLdouble nearVal = luaL_checknumber(L, 1); + GLdouble farVal = luaL_checknumber(L, 2); + glDepthRange(nearVal, farVal); + return 0; +} + + +int glDepthRangef_bind(lua_State *L) +{ + GLfloat nearVal = luaL_checknumber(L, 1); + GLfloat farVal = luaL_checknumber(L, 2); + glDepthRangef(nearVal, farVal); + return 0; +} + + +int glDepthRangeArrayv_bind(lua_State *L) +{ + GLuint first = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLdouble * v = get: const GLdouble * + glDepthRangeArrayv(first, count, v); + return 0; +} + + +int glDepthRangeIndexed_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLdouble nearVal = luaL_checknumber(L, 2); + GLdouble farVal = luaL_checknumber(L, 3); + glDepthRangeIndexed(index, nearVal, farVal); + return 0; +} + + +int glDetachShader_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLuint shader = luaL_checkinteger(L, 2); + glDetachShader(program, shader); + return 0; +} + + +int glDisable_bind(lua_State *L) +{ + GLenum cap = luaL_checkinteger(L, 1); + glDisable(cap); + return 0; +} + + +int glDisablei_bind(lua_State *L) +{ + GLenum cap = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + glDisablei(cap, index); + return 0; +} + + +int glDisableVertexAttribArray_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + glDisableVertexAttribArray(index); + return 0; +} + + +int glDrawArrays_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + GLint first = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + glDrawArrays(mode, first, count); + return 0; +} + + +int glDrawArraysIndirect_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + const void * indirect = get: const void * + glDrawArraysIndirect(mode, indirect); + return 0; +} + + +int glDrawArraysInstanced_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + GLint first = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + GLsizei instancecount = luaL_checkinteger(L, 4); + glDrawArraysInstanced(mode, first, count, instancecount); + return 0; +} + + +int glDrawBuffer_bind(lua_State *L) +{ + GLenum buf = luaL_checkinteger(L, 1); + glDrawBuffer(buf); + return 0; +} + + +int glDrawBuffers_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + const GLenum * bufs = get: const GLenum * + glDrawBuffers(n, bufs); + return 0; +} + + +int glDrawElements_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + GLenum type = luaL_checkinteger(L, 3); + const void * indices = get: const void * + glDrawElements(mode, count, type, indices); + return 0; +} + + +int glDrawElementsBaseVertex_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + GLenum type = luaL_checkinteger(L, 3); + void * indices = get: void * + GLint basevertex = luaL_checkinteger(L, 5); + glDrawElementsBaseVertex(mode, count, type, indices, basevertex); + return 0; +} + + +int glDrawElementsIndirect_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + GLenum type = luaL_checkinteger(L, 2); + const void * indirect = get: const void * + glDrawElementsIndirect(mode, type, indirect); + return 0; +} + + +int glDrawElementsInstanced_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + GLenum type = luaL_checkinteger(L, 3); + const void * indices = get: const void * + GLsizei instancecount = luaL_checkinteger(L, 5); + glDrawElementsInstanced(mode, count, type, indices, instancecount); + return 0; +} + + +int glDrawRangeElements_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + GLuint start = luaL_checkinteger(L, 2); + GLuint end = luaL_checkinteger(L, 3); + GLsizei count = luaL_checkinteger(L, 4); + GLenum type = luaL_checkinteger(L, 5); + const void * indices = get: const void * + glDrawRangeElements(mode, start, end, count, type, indices); + return 0; +} + + +int glDrawRangeElementsBaseVertex_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + GLuint start = luaL_checkinteger(L, 2); + GLuint end = luaL_checkinteger(L, 3); + GLsizei count = luaL_checkinteger(L, 4); + GLenum type = luaL_checkinteger(L, 5); + void * indices = get: void * + GLint basevertex = luaL_checkinteger(L, 7); + glDrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex); + return 0; +} + + +int glDrawTransformFeedback_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + GLuint id = luaL_checkinteger(L, 2); + glDrawTransformFeedback(mode, id); + return 0; +} + + +int glDrawTransformFeedbackStream_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + GLuint id = luaL_checkinteger(L, 2); + GLuint stream = luaL_checkinteger(L, 3); + glDrawTransformFeedbackStream(mode, id, stream); + return 0; +} + + diff --git a/src/opengl/bind/e b/src/opengl/bind/e new file mode 100644 index 0000000..4502836 --- /dev/null +++ b/src/opengl/bind/e @@ -0,0 +1,7 @@ +void glEnable( GLenum cap); +void glEnablei( GLenum cap, GLuint index); +void glEnableVertexAttribArray( GLuint index); +void glEndConditionalRender( void); +void glEndQuery( GLenum target); +void glEndQueryIndexed( GLenum target, GLuint index); +void glEndTransformFeedback(); diff --git a/src/opengl/bind/e.bind b/src/opengl/bind/e.bind new file mode 100644 index 0000000..50332d5 --- /dev/null +++ b/src/opengl/bind/e.bind @@ -0,0 +1,57 @@ +int glEnable_bind(lua_State *L) +{ + GLenum cap = luaL_checkinteger(L, 1); + glEnable(cap); + return 0; +} + + +int glEnablei_bind(lua_State *L) +{ + GLenum cap = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + glEnablei(cap, index); + return 0; +} + + +int glEnableVertexAttribArray_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + glEnableVertexAttribArray(index); + return 0; +} + + +int glEndConditionalRender_bind(lua_State *L) +{ + void = get: + glEndConditionalRender(void); + return 0; +} + + +int glEndQuery_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + glEndQuery(target); + return 0; +} + + +int glEndQueryIndexed_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + glEndQueryIndexed(target, index); + return 0; +} + + +int glEndTransformFeedback_bind(lua_State *L) +{ + glEndTransformFeedback(); + return 0; +} + + diff --git a/src/opengl/bind/f b/src/opengl/bind/f new file mode 100644 index 0000000..63b8140 --- /dev/null +++ b/src/opengl/bind/f @@ -0,0 +1,11 @@ +GLsync glFenceSync( GLenum condition, GLbitfield flags); +void glFinish( void); +void glFlush( void); +void glFlushMappedBufferRange( GLenum target, GLintptr offset, GLsizeiptr length); +void glFramebufferRenderbuffer( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +void glFramebufferTexture( GLenum target, GLenum attachment, GLuint texture, GLint level); +void glFramebufferTexture1D( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +void glFramebufferTexture2D( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +void glFramebufferTexture3D( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint layer); +void glFramebufferTextureLayer( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +void glFrontFace( GLenum mode); diff --git a/src/opengl/bind/f.bind b/src/opengl/bind/f.bind new file mode 100644 index 0000000..de6a297 --- /dev/null +++ b/src/opengl/bind/f.bind @@ -0,0 +1,115 @@ +int glFenceSync_bind(lua_State *L) +{ + GLenum condition = luaL_checkinteger(L, 1); + GLbitfield flags = luaL_checkinteger(L, 2); + GLsync bind_result = glFenceSync(condition, flags); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glFinish_bind(lua_State *L) +{ + void = get: + glFinish(void); + return 0; +} + + +int glFlush_bind(lua_State *L) +{ + void = get: + glFlush(void); + return 0; +} + + +int glFlushMappedBufferRange_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLintptr offset = luaL_checkinteger(L, 2); + GLsizeiptr length = luaL_checkinteger(L, 3); + glFlushMappedBufferRange(target, offset, length); + return 0; +} + + +int glFramebufferRenderbuffer_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum attachment = luaL_checkinteger(L, 2); + GLenum renderbuffertarget = luaL_checkinteger(L, 3); + GLuint renderbuffer = luaL_checkinteger(L, 4); + glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); + return 0; +} + + +int glFramebufferTexture_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum attachment = luaL_checkinteger(L, 2); + GLuint texture = luaL_checkinteger(L, 3); + GLint level = luaL_checkinteger(L, 4); + glFramebufferTexture(target, attachment, texture, level); + return 0; +} + + +int glFramebufferTexture1D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum attachment = luaL_checkinteger(L, 2); + GLenum textarget = luaL_checkinteger(L, 3); + GLuint texture = luaL_checkinteger(L, 4); + GLint level = luaL_checkinteger(L, 5); + glFramebufferTexture1D(target, attachment, textarget, texture, level); + return 0; +} + + +int glFramebufferTexture2D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum attachment = luaL_checkinteger(L, 2); + GLenum textarget = luaL_checkinteger(L, 3); + GLuint texture = luaL_checkinteger(L, 4); + GLint level = luaL_checkinteger(L, 5); + glFramebufferTexture2D(target, attachment, textarget, texture, level); + return 0; +} + + +int glFramebufferTexture3D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum attachment = luaL_checkinteger(L, 2); + GLenum textarget = luaL_checkinteger(L, 3); + GLuint texture = luaL_checkinteger(L, 4); + GLint level = luaL_checkinteger(L, 5); + GLint layer = luaL_checkinteger(L, 6); + glFramebufferTexture3D(target, attachment, textarget, texture, level, layer); + return 0; +} + + +int glFramebufferTextureLayer_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum attachment = luaL_checkinteger(L, 2); + GLuint texture = luaL_checkinteger(L, 3); + GLint level = luaL_checkinteger(L, 4); + GLint layer = luaL_checkinteger(L, 5); + glFramebufferTextureLayer(target, attachment, texture, level, layer); + return 0; +} + + +int glFrontFace_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + glFrontFace(mode); + return 0; +} + + diff --git a/src/opengl/bind/g b/src/opengl/bind/g new file mode 100644 index 0000000..bc61f25 --- /dev/null +++ b/src/opengl/bind/g @@ -0,0 +1,88 @@ +void glGenBuffers( GLsizei n, GLuint * buffers); +void glGenerateMipmap( GLenum target); +void glGenFramebuffers( GLsizei n, GLuint *ids); +void glGenProgramPipelines( GLsizei n, GLuint *pipelines); +void glGenQueries( GLsizei n, GLuint * ids); +void glGenRenderbuffers( GLsizei n, GLuint *renderbuffers); +void glGenSamplers( GLsizei n, GLuint *samplers); +void glGenTextures( GLsizei n, GLuint * textures); +void glGenTransformFeedbacks( GLsizei n, GLuint *ids); +void glGenVertexArrays( GLsizei n, GLuint *arrays); +void glGetBooleanv( GLenum pname, GLboolean * data); +void glGetDoublev( GLenum pname, GLdouble * data); +void glGetFloatv( GLenum pname, GLfloat * data); +void glGetIntegerv( GLenum pname, GLint * data); +void glGetInteger64v( GLenum pname, GLint64 * data); +void glGetBooleani_v( GLenum target, GLuint index, GLboolean * data); +void glGetIntegeri_v( GLenum target, GLuint index, GLint * data); +void glGetFloati_v( GLenum target, GLuint index, GLfloat * data); +void glGetDoublei_v( GLenum target, GLuint index, GLdouble * data); +void glGetInteger64i_v( GLenum target, GLuint index, GLint64 * data); +void glGetActiveAttrib( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +void glGetActiveSubroutineName( GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +void glGetActiveSubroutineUniformiv( GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +void glGetActiveSubroutineUniformName( GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +void glGetActiveUniform( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +void glGetActiveUniformBlockiv( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +void glGetActiveUniformBlockName( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +void glGetActiveUniformName( GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +void glGetActiveUniformsiv( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +void glGetAttachedShaders( GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +GLint glGetAttribLocation( GLuint program, const GLchar *name); +void glGetBufferParameteriv( GLenum target, GLenum value, GLint * data); +void glGetBufferParameteri64v( GLenum target, GLenum value, GLint64 * data); +void glGetBufferPointerv( GLenum target, GLenum pname, void ** params); +void glGetBufferSubData( GLenum target, GLintptr offset, GLsizeiptr size, void * data); +void glGetCompressedTexImage( GLenum target, GLint level, void * pixels); +GLenum glGetError( void); +GLint glGetFragDataIndex( GLuint program, const char * name); +GLint glGetFragDataLocation( GLuint program, const char * name); +void glGetFramebufferAttachmentParameteriv( GLenum target, GLenum attachment, GLenum pname, GLint *params); +void glGetMultisamplefv( GLenum pname, GLuint index, GLfloat *val); +void glGetUniformfv( GLuint program, GLint location, GLfloat *params); +void glGetUniformiv( GLuint program, GLint location, GLint *params); +void glGetUniformuiv( GLuint program, GLint location, GLuint *params); +void glGetUniformdv( GLuint program, GLint location, GLdouble *params); +void glGetProgramiv( GLuint program, GLenum pname, GLint *params); +void glGetProgramBinary( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +void glGetProgramInfoLog( GLuint program, GLsizei maxLength, GLsizei *length, GLchar *infoLog); +void glGetProgramPipelineiv( GLuint pipeline, GLenum pname, GLint *params); +void glGetProgramPipelineInfoLog( GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +void glGetProgramPipelineiv( GLuint pipeline, GLenum pname, GLint *params); +void glGetProgramStageiv( GLuint program, GLenum shadertype, GLenum pname, GLint *values); +void glGetQueryIndexediv( GLenum target, GLuint index, GLenum pname, GLint * params); +void glGetQueryiv( GLenum target, GLenum pname, GLint * params); +void glGetRenderbufferParameteriv( GLenum target, GLenum pname, GLint *params); +void glGetSamplerParameterfv( GLuint sampler, GLenum pname, GLfloat * params); +void glGetSamplerParameteriv( GLuint sampler, GLenum pname, GLint * params); +void glGetSamplerParameterIiv( GLuint sampler, GLenum pname, GLint * params); +void glGetSamplerParameterIuiv( GLuint sampler, GLenum pname, GLuint * params); +void glGetShaderiv( GLuint shader, GLenum pname, GLint *params); +void glGetShaderInfoLog( GLuint shader, GLsizei maxLength, GLsizei *length, GLchar *infoLog); +void glGetShaderiv( GLuint shader, GLenum pname, GLint *params); +void glGetShaderPrecisionFormat( GLenum shaderType, GLenum precisionType, GLint *range, GLint *precision); +void glGetShaderSource( GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +const GLubyte * glGetString(GLenum name); +const GLubyte * glGetStringi(GLenum name, GLuint index); +GLuint glGetSubroutineIndex( GLuint program, GLenum shadertype, const GLchar *name); +GLint glGetSubroutineUniformLocation( GLuint program, GLenum shadertype, const GLchar *name); +void glGetSynciv( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +void glGetTexImage( GLenum target, GLint level, GLenum format, GLenum type, void * pixels); +void glGetTexLevelParameterfv( GLenum target, GLint level, GLenum pname, GLfloat * params); +void glGetTexLevelParameteriv( GLenum target, GLint level, GLenum pname, GLint * params); +void glGetTexParameterfv( GLenum target, GLenum pname, GLfloat * params); +void glGetTexParameteriv( GLenum target, GLenum pname, GLint * params); +void glGetTexParameterIiv( GLenum target, GLenum pname, GLint * params); +void glGetTexParameterIuiv( GLenum target, GLenum pname, GLuint * params); +void glGetTransformFeedbackVarying( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, char *name); +GLuint glGetUniformBlockIndex( GLuint program, const GLchar *uniformBlockName); +void glGetUniformIndices( GLuint program, GLsizei uniformCount, const GLchar **uniformNames, GLuint *uniformIndices); +GLint glGetUniformLocation( GLuint program, const GLchar *name); +void glGetUniformSubroutineuiv( GLenum shadertype, GLint location, GLuint *values); +void glGetVertexAttribdv( GLuint index, GLenum pname, GLdouble *params); +void glGetVertexAttribfv( GLuint index, GLenum pname, GLfloat *params); +void glGetVertexAttribiv( GLuint index, GLenum pname, GLint *params); +void glGetVertexAttribIiv( GLuint index, GLenum pname, GLint *params); +void glGetVertexAttribIuiv( GLuint index, GLenum pname, GLuint *params); +void glGetVertexAttribLdv( GLuint index, GLenum pname, GLdouble *params); +void glGetVertexAttribPointerv( GLuint index, GLenum pname, void **pointer); diff --git a/src/opengl/bind/g.bind b/src/opengl/bind/g.bind new file mode 100644 index 0000000..2c608b8 --- /dev/null +++ b/src/opengl/bind/g.bind @@ -0,0 +1,910 @@ +int glGenBuffers_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + GLuint * buffers = get: GLuint * + glGenBuffers(n, buffers); + return 0; +} + + +int glGenerateMipmap_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + glGenerateMipmap(target); + return 0; +} + + +int glGenFramebuffers_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + GLuint * ids = get: GLuint * + glGenFramebuffers(n, ids); + return 0; +} + + +int glGenProgramPipelines_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + GLuint * pipelines = get: GLuint * + glGenProgramPipelines(n, pipelines); + return 0; +} + + +int glGenQueries_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + GLuint * ids = get: GLuint * + glGenQueries(n, ids); + return 0; +} + + +int glGenRenderbuffers_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + GLuint * renderbuffers = get: GLuint * + glGenRenderbuffers(n, renderbuffers); + return 0; +} + + +int glGenSamplers_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + GLuint * samplers = get: GLuint * + glGenSamplers(n, samplers); + return 0; +} + + +int glGenTextures_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + GLuint * textures = get: GLuint * + glGenTextures(n, textures); + return 0; +} + + +int glGenTransformFeedbacks_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + GLuint * ids = get: GLuint * + glGenTransformFeedbacks(n, ids); + return 0; +} + + +int glGenVertexArrays_bind(lua_State *L) +{ + GLsizei n = luaL_checkinteger(L, 1); + GLuint * arrays = get: GLuint * + glGenVertexArrays(n, arrays); + return 0; +} + + +int glGetBooleanv_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + GLboolean * data = get: GLboolean * + glGetBooleanv(pname, data); + return 0; +} + + +int glGetDoublev_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + GLdouble * data = get: GLdouble * + glGetDoublev(pname, data); + return 0; +} + + +int glGetFloatv_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + GLfloat * data = get: GLfloat * + glGetFloatv(pname, data); + return 0; +} + + +int glGetIntegerv_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + GLint * data = get: GLint * + glGetIntegerv(pname, data); + return 0; +} + + +int glGetInteger64v_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + GLint64 * data = get: GLint64 * + glGetInteger64v(pname, data); + return 0; +} + + +int glGetBooleani_v_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + GLboolean * data = get: GLboolean * + glGetBooleani_v(target, index, data); + return 0; +} + + +int glGetIntegeri_v_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + GLint * data = get: GLint * + glGetIntegeri_v(target, index, data); + return 0; +} + + +int glGetFloati_v_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + GLfloat * data = get: GLfloat * + glGetFloati_v(target, index, data); + return 0; +} + + +int glGetDoublei_v_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + GLdouble * data = get: GLdouble * + glGetDoublei_v(target, index, data); + return 0; +} + + +int glGetInteger64i_v_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + GLint64 * data = get: GLint64 * + glGetInteger64i_v(target, index, data); + return 0; +} + + +int glGetActiveAttrib_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + GLsizei bufSize = luaL_checkinteger(L, 3); + GLsizei * length = get: GLsizei * + GLint * size = get: GLint * + GLenum * type = get: GLenum * + GLchar * name = luaL_checkstring(L, 7); + glGetActiveAttrib(program, index, bufSize, length, size, type, name); + return 0; +} + + +int glGetActiveSubroutineName_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLenum shadertype = luaL_checkinteger(L, 2); + GLuint index = luaL_checkinteger(L, 3); + GLsizei bufSize = luaL_checkinteger(L, 4); + GLsizei * length = get: GLsizei * + GLchar * name = luaL_checkstring(L, 6); + glGetActiveSubroutineName(program, shadertype, index, bufSize, length, name); + return 0; +} + + +int glGetActiveSubroutineUniformiv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLenum shadertype = luaL_checkinteger(L, 2); + GLuint index = luaL_checkinteger(L, 3); + GLenum pname = luaL_checkinteger(L, 4); + GLint * values = get: GLint * + glGetActiveSubroutineUniformiv(program, shadertype, index, pname, values); + return 0; +} + + +int glGetActiveSubroutineUniformName_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLenum shadertype = luaL_checkinteger(L, 2); + GLuint index = luaL_checkinteger(L, 3); + GLsizei bufSize = luaL_checkinteger(L, 4); + GLsizei * length = get: GLsizei * + GLchar * name = luaL_checkstring(L, 6); + glGetActiveSubroutineUniformName(program, shadertype, index, bufSize, length, name); + return 0; +} + + +int glGetActiveUniform_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + GLsizei bufSize = luaL_checkinteger(L, 3); + GLsizei * length = get: GLsizei * + GLint * size = get: GLint * + GLenum * type = get: GLenum * + GLchar * name = luaL_checkstring(L, 7); + glGetActiveUniform(program, index, bufSize, length, size, type, name); + return 0; +} + + +int glGetActiveUniformBlockiv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLuint uniformBlockIndex = luaL_checkinteger(L, 2); + GLenum pname = luaL_checkinteger(L, 3); + GLint * params = get: GLint * + glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); + return 0; +} + + +int glGetActiveUniformBlockName_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLuint uniformBlockIndex = luaL_checkinteger(L, 2); + GLsizei bufSize = luaL_checkinteger(L, 3); + GLsizei * length = get: GLsizei * + GLchar * uniformBlockName = luaL_checkstring(L, 5); + glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName); + return 0; +} + + +int glGetActiveUniformName_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLuint uniformIndex = luaL_checkinteger(L, 2); + GLsizei bufSize = luaL_checkinteger(L, 3); + GLsizei * length = get: GLsizei * + GLchar * uniformName = luaL_checkstring(L, 5); + glGetActiveUniformName(program, uniformIndex, bufSize, length, uniformName); + return 0; +} + + +int glGetActiveUniformsiv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLsizei uniformCount = luaL_checkinteger(L, 2); + const GLuint * uniformIndices = get: const GLuint * + GLenum pname = luaL_checkinteger(L, 4); + GLint * params = get: GLint * + glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params); + return 0; +} + + +int glGetAttachedShaders_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLsizei maxCount = luaL_checkinteger(L, 2); + GLsizei * count = get: GLsizei * + GLuint * shaders = get: GLuint * + glGetAttachedShaders(program, maxCount, count, shaders); + return 0; +} + + +int glGetAttribLocation_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + const GLchar * name = luaL_checkstring(L, 2); + GLint bind_result = glGetAttribLocation(program, name); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glGetBufferParameteriv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum value = luaL_checkinteger(L, 2); + GLint * data = get: GLint * + glGetBufferParameteriv(target, value, data); + return 0; +} + + +int glGetBufferParameteri64v_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum value = luaL_checkinteger(L, 2); + GLint64 * data = get: GLint64 * + glGetBufferParameteri64v(target, value, data); + return 0; +} + + +int glGetBufferPointerv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + void ** params = get: void ** + glGetBufferPointerv(target, pname, params); + return 0; +} + + +int glGetBufferSubData_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLintptr offset = luaL_checkinteger(L, 2); + GLsizeiptr size = luaL_checkinteger(L, 3); + void * data = get: void * + glGetBufferSubData(target, offset, size, data); + return 0; +} + + +int glGetCompressedTexImage_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + void * pixels = get: void * + glGetCompressedTexImage(target, level, pixels); + return 0; +} + + +int glGetError_bind(lua_State *L) +{ + void = get: + GLenum bind_result = glGetError(void); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glGetFragDataIndex_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + const char * name = luaL_checkstring(L, 2); + GLint bind_result = glGetFragDataIndex(program, name); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glGetFragDataLocation_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + const char * name = luaL_checkstring(L, 2); + GLint bind_result = glGetFragDataLocation(program, name); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glGetFramebufferAttachmentParameteriv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum attachment = luaL_checkinteger(L, 2); + GLenum pname = luaL_checkinteger(L, 3); + GLint * params = get: GLint * + glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); + return 0; +} + + +int glGetMultisamplefv_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + GLfloat * val = get: GLfloat * + glGetMultisamplefv(pname, index, val); + return 0; +} + + +int glGetUniformfv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLfloat * params = get: GLfloat * + glGetUniformfv(program, location, params); + return 0; +} + + +int glGetUniformiv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetUniformiv(program, location, params); + return 0; +} + + +int glGetUniformuiv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLuint * params = get: GLuint * + glGetUniformuiv(program, location, params); + return 0; +} + + +int glGetUniformdv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLdouble * params = get: GLdouble * + glGetUniformdv(program, location, params); + return 0; +} + + +int glGetProgramiv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetProgramiv(program, pname, params); + return 0; +} + + +int glGetProgramBinary_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLsizei bufSize = luaL_checkinteger(L, 2); + GLsizei * length = get: GLsizei * + GLenum * binaryFormat = get: GLenum * + void * binary = get: void * + glGetProgramBinary(program, bufSize, length, binaryFormat, binary); + return 0; +} + + +int glGetProgramInfoLog_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLsizei maxLength = luaL_checkinteger(L, 2); + GLsizei * length = get: GLsizei * + GLchar * infoLog = luaL_checkstring(L, 4); + glGetProgramInfoLog(program, maxLength, length, infoLog); + return 0; +} + + +int glGetProgramPipelineiv_bind(lua_State *L) +{ + GLuint pipeline = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetProgramPipelineiv(pipeline, pname, params); + return 0; +} + + +int glGetProgramPipelineInfoLog_bind(lua_State *L) +{ + GLuint pipeline = luaL_checkinteger(L, 1); + GLsizei bufSize = luaL_checkinteger(L, 2); + GLsizei * length = get: GLsizei * + GLchar * infoLog = luaL_checkstring(L, 4); + glGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); + return 0; +} + + +int glGetProgramPipelineiv_bind(lua_State *L) +{ + GLuint pipeline = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetProgramPipelineiv(pipeline, pname, params); + return 0; +} + + +int glGetProgramStageiv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLenum shadertype = luaL_checkinteger(L, 2); + GLenum pname = luaL_checkinteger(L, 3); + GLint * values = get: GLint * + glGetProgramStageiv(program, shadertype, pname, values); + return 0; +} + + +int glGetQueryIndexediv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + GLenum pname = luaL_checkinteger(L, 3); + GLint * params = get: GLint * + glGetQueryIndexediv(target, index, pname, params); + return 0; +} + + +int glGetQueryiv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetQueryiv(target, pname, params); + return 0; +} + + +int glGetRenderbufferParameteriv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetRenderbufferParameteriv(target, pname, params); + return 0; +} + + +int glGetSamplerParameterfv_bind(lua_State *L) +{ + GLuint sampler = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLfloat * params = get: GLfloat * + glGetSamplerParameterfv(sampler, pname, params); + return 0; +} + + +int glGetSamplerParameteriv_bind(lua_State *L) +{ + GLuint sampler = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetSamplerParameteriv(sampler, pname, params); + return 0; +} + + +int glGetSamplerParameterIiv_bind(lua_State *L) +{ + GLuint sampler = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetSamplerParameterIiv(sampler, pname, params); + return 0; +} + + +int glGetSamplerParameterIuiv_bind(lua_State *L) +{ + GLuint sampler = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLuint * params = get: GLuint * + glGetSamplerParameterIuiv(sampler, pname, params); + return 0; +} + + +int glGetShaderiv_bind(lua_State *L) +{ + GLuint shader = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetShaderiv(shader, pname, params); + return 0; +} + + +int glGetShaderInfoLog_bind(lua_State *L) +{ + GLuint shader = luaL_checkinteger(L, 1); + GLsizei maxLength = luaL_checkinteger(L, 2); + GLsizei * length = get: GLsizei * + GLchar * infoLog = luaL_checkstring(L, 4); + glGetShaderInfoLog(shader, maxLength, length, infoLog); + return 0; +} + + +int glGetShaderiv_bind(lua_State *L) +{ + GLuint shader = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetShaderiv(shader, pname, params); + return 0; +} + + +int glGetShaderPrecisionFormat_bind(lua_State *L) +{ + GLenum shaderType = luaL_checkinteger(L, 1); + GLenum precisionType = luaL_checkinteger(L, 2); + GLint * range = get: GLint * + GLint * precision = get: GLint * + glGetShaderPrecisionFormat(shaderType, precisionType, range, precision); + return 0; +} + + +int glGetShaderSource_bind(lua_State *L) +{ + GLuint shader = luaL_checkinteger(L, 1); + GLsizei bufSize = luaL_checkinteger(L, 2); + GLsizei * length = get: GLsizei * + GLchar * source = luaL_checkstring(L, 4); + glGetShaderSource(shader, bufSize, length, source); + return 0; +} + + +int glGetString_bind(lua_State *L) +{ + GLenum name = luaL_checkinteger(L, 1); + const GLubyte * bind_result = glGetString(name); + /* push result */ + return /* count */; +} + + +int glGetStringi_bind(lua_State *L) +{ + GLenum name = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + const GLubyte * bind_result = glGetStringi(name, index); + /* push result */ + return /* count */; +} + + +int glGetSubroutineIndex_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLenum shadertype = luaL_checkinteger(L, 2); + const GLchar * name = luaL_checkstring(L, 3); + GLuint bind_result = glGetSubroutineIndex(program, shadertype, name); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glGetSubroutineUniformLocation_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLenum shadertype = luaL_checkinteger(L, 2); + const GLchar * name = luaL_checkstring(L, 3); + GLint bind_result = glGetSubroutineUniformLocation(program, shadertype, name); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glGetSynciv_bind(lua_State *L) +{ + GLsync sync = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLsizei bufSize = luaL_checkinteger(L, 3); + GLsizei * length = get: GLsizei * + GLint * values = get: GLint * + glGetSynciv(sync, pname, bufSize, length, values); + return 0; +} + + +int glGetTexImage_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLenum format = luaL_checkinteger(L, 3); + GLenum type = luaL_checkinteger(L, 4); + void * pixels = get: void * + glGetTexImage(target, level, format, type, pixels); + return 0; +} + + +int glGetTexLevelParameterfv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLenum pname = luaL_checkinteger(L, 3); + GLfloat * params = get: GLfloat * + glGetTexLevelParameterfv(target, level, pname, params); + return 0; +} + + +int glGetTexLevelParameteriv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLenum pname = luaL_checkinteger(L, 3); + GLint * params = get: GLint * + glGetTexLevelParameteriv(target, level, pname, params); + return 0; +} + + +int glGetTexParameterfv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLfloat * params = get: GLfloat * + glGetTexParameterfv(target, pname, params); + return 0; +} + + +int glGetTexParameteriv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetTexParameteriv(target, pname, params); + return 0; +} + + +int glGetTexParameterIiv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetTexParameterIiv(target, pname, params); + return 0; +} + + +int glGetTexParameterIuiv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLuint * params = get: GLuint * + glGetTexParameterIuiv(target, pname, params); + return 0; +} + + +int glGetTransformFeedbackVarying_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + GLsizei bufSize = luaL_checkinteger(L, 3); + GLsizei * length = get: GLsizei * + GLsizei * size = get: GLsizei * + GLenum * type = get: GLenum * + char * name = luaL_checkstring(L, 7); + glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name); + return 0; +} + + +int glGetUniformBlockIndex_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + const GLchar * uniformBlockName = luaL_checkstring(L, 2); + GLuint bind_result = glGetUniformBlockIndex(program, uniformBlockName); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glGetUniformIndices_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLsizei uniformCount = luaL_checkinteger(L, 2); + const GLchar ** uniformNames = get: const GLchar ** + GLuint * uniformIndices = get: GLuint * + glGetUniformIndices(program, uniformCount, uniformNames, uniformIndices); + return 0; +} + + +int glGetUniformLocation_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + const GLchar * name = luaL_checkstring(L, 2); + GLint bind_result = glGetUniformLocation(program, name); + lua_pushinteger(L, bind_result); + return 1; +} + + +int glGetUniformSubroutineuiv_bind(lua_State *L) +{ + GLenum shadertype = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLuint * values = get: GLuint * + glGetUniformSubroutineuiv(shadertype, location, values); + return 0; +} + + +int glGetVertexAttribdv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLdouble * params = get: GLdouble * + glGetVertexAttribdv(index, pname, params); + return 0; +} + + +int glGetVertexAttribfv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLfloat * params = get: GLfloat * + glGetVertexAttribfv(index, pname, params); + return 0; +} + + +int glGetVertexAttribiv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetVertexAttribiv(index, pname, params); + return 0; +} + + +int glGetVertexAttribIiv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint * params = get: GLint * + glGetVertexAttribIiv(index, pname, params); + return 0; +} + + +int glGetVertexAttribIuiv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLuint * params = get: GLuint * + glGetVertexAttribIuiv(index, pname, params); + return 0; +} + + +int glGetVertexAttribLdv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLdouble * params = get: GLdouble * + glGetVertexAttribLdv(index, pname, params); + return 0; +} + + +int glGetVertexAttribPointerv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + void ** pointer = get: void ** + glGetVertexAttribPointerv(index, pname, pointer); + return 0; +} + + diff --git a/src/opengl/bind/h b/src/opengl/bind/h new file mode 100644 index 0000000..00590da --- /dev/null +++ b/src/opengl/bind/h @@ -0,0 +1 @@ +void glHint( GLenum target, GLenum mode); diff --git a/src/opengl/bind/h.bind b/src/opengl/bind/h.bind new file mode 100644 index 0000000..7837656 --- /dev/null +++ b/src/opengl/bind/h.bind @@ -0,0 +1,9 @@ +int glHint_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum mode = luaL_checkinteger(L, 2); + glHint(target, mode); + return 0; +} + + diff --git a/src/opengl/bind/i b/src/opengl/bind/i new file mode 100644 index 0000000..6cb0306 --- /dev/null +++ b/src/opengl/bind/i @@ -0,0 +1,14 @@ +GLboolean glIsBuffer( GLuint buffer); +GLboolean glIsEnabled( GLenum cap); +GLboolean glIsEnabledi( GLenum cap, GLuint index); +GLboolean glIsFramebuffer( GLuint framebuffer); +GLboolean glIsProgram( GLuint program); +GLboolean glIsProgramPipeline( GLuint pipeline); +GLboolean glIsQuery( GLuint id); +GLboolean glIsRenderbuffer( GLuint renderbuffer); +GLboolean glIsSampler( GLuint id); +GLboolean glIsShader( GLuint shader); +GLboolean glIsSync( GLsync sync); +GLboolean glIsTexture( GLuint texture); +GLboolean glIsTransformFeedback( GLuint id); +GLboolean glIsVertexArray( GLuint array); diff --git a/src/opengl/bind/i.bind b/src/opengl/bind/i.bind new file mode 100644 index 0000000..044b72b --- /dev/null +++ b/src/opengl/bind/i.bind @@ -0,0 +1,127 @@ +int glIsBuffer_bind(lua_State *L) +{ + GLuint buffer = luaL_checkinteger(L, 1); + GLboolean bind_result = glIsBuffer(buffer); + /* push result */ + return /* count */; +} + + +int glIsEnabled_bind(lua_State *L) +{ + GLenum cap = luaL_checkinteger(L, 1); + GLboolean bind_result = glIsEnabled(cap); + /* push result */ + return /* count */; +} + + +int glIsEnabledi_bind(lua_State *L) +{ + GLenum cap = luaL_checkinteger(L, 1); + GLuint index = luaL_checkinteger(L, 2); + GLboolean bind_result = glIsEnabledi(cap, index); + /* push result */ + return /* count */; +} + + +int glIsFramebuffer_bind(lua_State *L) +{ + GLuint framebuffer = luaL_checkinteger(L, 1); + GLboolean bind_result = glIsFramebuffer(framebuffer); + /* push result */ + return /* count */; +} + + +int glIsProgram_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLboolean bind_result = glIsProgram(program); + /* push result */ + return /* count */; +} + + +int glIsProgramPipeline_bind(lua_State *L) +{ + GLuint pipeline = luaL_checkinteger(L, 1); + GLboolean bind_result = glIsProgramPipeline(pipeline); + /* push result */ + return /* count */; +} + + +int glIsQuery_bind(lua_State *L) +{ + GLuint id = luaL_checkinteger(L, 1); + GLboolean bind_result = glIsQuery(id); + /* push result */ + return /* count */; +} + + +int glIsRenderbuffer_bind(lua_State *L) +{ + GLuint renderbuffer = luaL_checkinteger(L, 1); + GLboolean bind_result = glIsRenderbuffer(renderbuffer); + /* push result */ + return /* count */; +} + + +int glIsSampler_bind(lua_State *L) +{ + GLuint id = luaL_checkinteger(L, 1); + GLboolean bind_result = glIsSampler(id); + /* push result */ + return /* count */; +} + + +int glIsShader_bind(lua_State *L) +{ + GLuint shader = luaL_checkinteger(L, 1); + GLboolean bind_result = glIsShader(shader); + /* push result */ + return /* count */; +} + + +int glIsSync_bind(lua_State *L) +{ + GLsync sync = luaL_checkinteger(L, 1); + GLboolean bind_result = glIsSync(sync); + /* push result */ + return /* count */; +} + + +int glIsTexture_bind(lua_State *L) +{ + GLuint texture = luaL_checkinteger(L, 1); + GLboolean bind_result = glIsTexture(texture); + /* push result */ + return /* count */; +} + + +int glIsTransformFeedback_bind(lua_State *L) +{ + GLuint id = luaL_checkinteger(L, 1); + GLboolean bind_result = glIsTransformFeedback(id); + /* push result */ + return /* count */; +} + + +int glIsVertexArray_bind(lua_State *L) +{ + GLuint array = luaL_checkinteger(L, 1); + GLboolean bind_result = glIsVertexArray(array); + /* push result */ + return /* count */; +} + + diff --git a/src/opengl/bind/l b/src/opengl/bind/l new file mode 100644 index 0000000..eb6ec73 --- /dev/null +++ b/src/opengl/bind/l @@ -0,0 +1,4 @@ +void glLineWidth( GLfloat width); +void glLinkProgram( GLuint program); +void glLogicOp( GLenum opcode); + diff --git a/src/opengl/bind/l.bind b/src/opengl/bind/l.bind new file mode 100644 index 0000000..1c8601b --- /dev/null +++ b/src/opengl/bind/l.bind @@ -0,0 +1,24 @@ +int glLineWidth_bind(lua_State *L) +{ + GLfloat width = luaL_checknumber(L, 1); + glLineWidth(width); + return 0; +} + + +int glLinkProgram_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + glLinkProgram(program); + return 0; +} + + +int glLogicOp_bind(lua_State *L) +{ + GLenum opcode = luaL_checkinteger(L, 1); + glLogicOp(opcode); + return 0; +} + + diff --git a/src/opengl/bind/m b/src/opengl/bind/m new file mode 100644 index 0000000..a346dd1 --- /dev/null +++ b/src/opengl/bind/m @@ -0,0 +1,7 @@ +void * glMapBuffer( GLenum target, GLenum access); +void * glMapBufferRange( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +void glMinSampleShading( GLfloat value); +void glMultiDrawArrays( GLenum mode, const GLint * first, const GLsizei * count, GLsizei drawcount); +void glMultiDrawElements( GLenum mode, const GLsizei * count, GLenum type, const void * const * indices, GLsizei drawcount); +void glMultiDrawElementsBaseVertex( GLenum mode, const GLsizei *count, GLenum type, const void * const *indices, GLsizei drawcount, const GLint *basevertex); + diff --git a/src/opengl/bind/m.bind b/src/opengl/bind/m.bind new file mode 100644 index 0000000..e76b3df --- /dev/null +++ b/src/opengl/bind/m.bind @@ -0,0 +1,66 @@ +int glMapBuffer_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum access = luaL_checkinteger(L, 2); + void * bind_result = glMapBuffer(target, access); + /* push result */ + return /* count */; +} + + +int glMapBufferRange_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLintptr offset = luaL_checkinteger(L, 2); + GLsizeiptr length = luaL_checkinteger(L, 3); + GLbitfield access = luaL_checkinteger(L, 4); + void * bind_result = glMapBufferRange(target, offset, length, access); + /* push result */ + return /* count */; +} + + +int glMinSampleShading_bind(lua_State *L) +{ + GLfloat value = luaL_checknumber(L, 1); + glMinSampleShading(value); + return 0; +} + + +int glMultiDrawArrays_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + const GLint * first = get: const GLint * + const GLsizei * count = get: const GLsizei * + GLsizei drawcount = luaL_checkinteger(L, 4); + glMultiDrawArrays(mode, first, count, drawcount); + return 0; +} + + +int glMultiDrawElements_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + const GLsizei * count = get: const GLsizei * + GLenum type = luaL_checkinteger(L, 3); + const void * const * indices = get: const void * const * + GLsizei drawcount = luaL_checkinteger(L, 5); + glMultiDrawElements(mode, count, type, indices, drawcount); + return 0; +} + + +int glMultiDrawElementsBaseVertex_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + const GLsizei * count = get: const GLsizei * + GLenum type = luaL_checkinteger(L, 3); + const void * const * indices = get: const void * const * + GLsizei drawcount = luaL_checkinteger(L, 5); + const GLint * basevertex = get: const GLint * + glMultiDrawElementsBaseVertex(mode, count, type, indices, drawcount, basevertex); + return 0; +} + + diff --git a/src/opengl/bind/p b/src/opengl/bind/p new file mode 100644 index 0000000..98ee850 --- /dev/null +++ b/src/opengl/bind/p @@ -0,0 +1,50 @@ +void glPatchParameteri( GLenum pname, GLint value); +void glPatchParameterfv( GLenum pname, const GLfloat *values); +void glPauseTransformFeedback( void); +void glPixelStoref( GLenum pname, GLfloat param); +void glPixelStorei( GLenum pname, GLint param); +void glPointParameterf( GLenum pname, GLfloat param); +void glPointParameteri( GLenum pname, GLint param); +void glPointParameterfv( GLenum pname, const GLfloat * params); +void glPointParameteriv( GLenum pname, const GLint * params); +void glPointSize( GLfloat size); +void glPolygonMode( GLenum face, GLenum mode); +void glPolygonOffset( GLfloat factor, GLfloat units); +void glPrimitiveRestartIndex( GLuint index); +void glProgramBinary( GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +void glProgramParameteri( GLuint program, GLenum pname, GLint value); +void glProgramUniform1f( GLuint program, GLint location, GLfloat v0); +void glProgramUniform2f( GLuint program, GLint location, GLfloat v0, GLfloat v1); +void glProgramUniform3f( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +void glProgramUniform4f( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +void glProgramUniform1i( GLuint program, GLint location, GLint v0); +void glProgramUniform2i( GLuint program, GLint location, GLint v0, GLint v1); +void glProgramUniform3i( GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +void glProgramUniform4i( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +void glProgramUniform1ui( GLuint program, GLint location, GLuint v0); +void glProgramUniform2ui( GLuint program, GLint location, GLuint v0, GLuint v1); +void glProgramUniform3ui( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +void glProgramUniform4ui( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +void glProgramUniform1fv( GLuint program, GLint location, GLsizei count, const GLfloat *value); +void glProgramUniform2fv( GLuint program, GLint location, GLsizei count, const GLfloat *value); +void glProgramUniform3fv( GLuint program, GLint location, GLsizei count, const GLfloat *value); +void glProgramUniform4fv( GLuint program, GLint location, GLsizei count, const GLfloat *value); +void glProgramUniform1iv( GLuint program, GLint location, GLsizei count, const GLint *value); +void glProgramUniform2iv( GLuint program, GLint location, GLsizei count, const GLint *value); +void glProgramUniform3iv( GLuint program, GLint location, GLsizei count, const GLint *value); +void glProgramUniform4iv( GLuint program, GLint location, GLsizei count, const GLint *value); +void glProgramUniform1uiv( GLuint program, GLint location, GLsizei count, const GLuint *value); +void glProgramUniform2uiv( GLuint program, GLint location, GLsizei count, const GLuint *value); +void glProgramUniform3uiv( GLuint program, GLint location, GLsizei count, const GLuint *value); +void glProgramUniform4uiv( GLuint program, GLint location, GLsizei count, const GLuint *value); +void glProgramUniformMatrix2fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix3fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix4fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix2x3fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix3x2fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix2x4fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix4x2fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix3x4fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix4x3fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProvokingVertex( GLenum provokeMode); + diff --git a/src/opengl/bind/p.bind b/src/opengl/bind/p.bind new file mode 100644 index 0000000..55411f4 --- /dev/null +++ b/src/opengl/bind/p.bind @@ -0,0 +1,521 @@ +int glPatchParameteri_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + GLint value = luaL_checkinteger(L, 2); + glPatchParameteri(pname, value); + return 0; +} + + +int glPatchParameterfv_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + const GLfloat * values = get: const GLfloat * + glPatchParameterfv(pname, values); + return 0; +} + + +int glPauseTransformFeedback_bind(lua_State *L) +{ + void = get: + glPauseTransformFeedback(void); + return 0; +} + + +int glPixelStoref_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + GLfloat param = luaL_checknumber(L, 2); + glPixelStoref(pname, param); + return 0; +} + + +int glPixelStorei_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + GLint param = luaL_checkinteger(L, 2); + glPixelStorei(pname, param); + return 0; +} + + +int glPointParameterf_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + GLfloat param = luaL_checknumber(L, 2); + glPointParameterf(pname, param); + return 0; +} + + +int glPointParameteri_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + GLint param = luaL_checkinteger(L, 2); + glPointParameteri(pname, param); + return 0; +} + + +int glPointParameterfv_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + const GLfloat * params = get: const GLfloat * + glPointParameterfv(pname, params); + return 0; +} + + +int glPointParameteriv_bind(lua_State *L) +{ + GLenum pname = luaL_checkinteger(L, 1); + const GLint * params = get: const GLint * + glPointParameteriv(pname, params); + return 0; +} + + +int glPointSize_bind(lua_State *L) +{ + GLfloat size = luaL_checknumber(L, 1); + glPointSize(size); + return 0; +} + + +int glPolygonMode_bind(lua_State *L) +{ + GLenum face = luaL_checkinteger(L, 1); + GLenum mode = luaL_checkinteger(L, 2); + glPolygonMode(face, mode); + return 0; +} + + +int glPolygonOffset_bind(lua_State *L) +{ + GLfloat factor = luaL_checknumber(L, 1); + GLfloat units = luaL_checknumber(L, 2); + glPolygonOffset(factor, units); + return 0; +} + + +int glPrimitiveRestartIndex_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + glPrimitiveRestartIndex(index); + return 0; +} + + +int glProgramBinary_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLenum binaryFormat = luaL_checkinteger(L, 2); + const void * binary = get: const void * + GLsizei length = luaL_checkinteger(L, 4); + glProgramBinary(program, binaryFormat, binary, length); + return 0; +} + + +int glProgramParameteri_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint value = luaL_checkinteger(L, 3); + glProgramParameteri(program, pname, value); + return 0; +} + + +int glProgramUniform1f_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLfloat v0 = luaL_checknumber(L, 3); + glProgramUniform1f(program, location, v0); + return 0; +} + + +int glProgramUniform2f_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLfloat v0 = luaL_checknumber(L, 3); + GLfloat v1 = luaL_checknumber(L, 4); + glProgramUniform2f(program, location, v0, v1); + return 0; +} + + +int glProgramUniform3f_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLfloat v0 = luaL_checknumber(L, 3); + GLfloat v1 = luaL_checknumber(L, 4); + GLfloat v2 = luaL_checknumber(L, 5); + glProgramUniform3f(program, location, v0, v1, v2); + return 0; +} + + +int glProgramUniform4f_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLfloat v0 = luaL_checknumber(L, 3); + GLfloat v1 = luaL_checknumber(L, 4); + GLfloat v2 = luaL_checknumber(L, 5); + GLfloat v3 = luaL_checknumber(L, 6); + glProgramUniform4f(program, location, v0, v1, v2, v3); + return 0; +} + + +int glProgramUniform1i_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLint v0 = luaL_checkinteger(L, 3); + glProgramUniform1i(program, location, v0); + return 0; +} + + +int glProgramUniform2i_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLint v0 = luaL_checkinteger(L, 3); + GLint v1 = luaL_checkinteger(L, 4); + glProgramUniform2i(program, location, v0, v1); + return 0; +} + + +int glProgramUniform3i_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLint v0 = luaL_checkinteger(L, 3); + GLint v1 = luaL_checkinteger(L, 4); + GLint v2 = luaL_checkinteger(L, 5); + glProgramUniform3i(program, location, v0, v1, v2); + return 0; +} + + +int glProgramUniform4i_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLint v0 = luaL_checkinteger(L, 3); + GLint v1 = luaL_checkinteger(L, 4); + GLint v2 = luaL_checkinteger(L, 5); + GLint v3 = luaL_checkinteger(L, 6); + glProgramUniform4i(program, location, v0, v1, v2, v3); + return 0; +} + + +int glProgramUniform1ui_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLuint v0 = luaL_checkinteger(L, 3); + glProgramUniform1ui(program, location, v0); + return 0; +} + + +int glProgramUniform2ui_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLuint v0 = luaL_checkinteger(L, 3); + GLuint v1 = luaL_checkinteger(L, 4); + glProgramUniform2ui(program, location, v0, v1); + return 0; +} + + +int glProgramUniform3ui_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLuint v0 = luaL_checkinteger(L, 3); + GLuint v1 = luaL_checkinteger(L, 4); + GLuint v2 = luaL_checkinteger(L, 5); + glProgramUniform3ui(program, location, v0, v1, v2); + return 0; +} + + +int glProgramUniform4ui_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLuint v0 = luaL_checkinteger(L, 3); + GLuint v1 = luaL_checkinteger(L, 4); + GLuint v2 = luaL_checkinteger(L, 5); + GLuint v3 = luaL_checkinteger(L, 6); + glProgramUniform4ui(program, location, v0, v1, v2, v3); + return 0; +} + + +int glProgramUniform1fv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + const GLfloat * value = get: const GLfloat * + glProgramUniform1fv(program, location, count, value); + return 0; +} + + +int glProgramUniform2fv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + const GLfloat * value = get: const GLfloat * + glProgramUniform2fv(program, location, count, value); + return 0; +} + + +int glProgramUniform3fv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + const GLfloat * value = get: const GLfloat * + glProgramUniform3fv(program, location, count, value); + return 0; +} + + +int glProgramUniform4fv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + const GLfloat * value = get: const GLfloat * + glProgramUniform4fv(program, location, count, value); + return 0; +} + + +int glProgramUniform1iv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + const GLint * value = get: const GLint * + glProgramUniform1iv(program, location, count, value); + return 0; +} + + +int glProgramUniform2iv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + const GLint * value = get: const GLint * + glProgramUniform2iv(program, location, count, value); + return 0; +} + + +int glProgramUniform3iv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + const GLint * value = get: const GLint * + glProgramUniform3iv(program, location, count, value); + return 0; +} + + +int glProgramUniform4iv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + const GLint * value = get: const GLint * + glProgramUniform4iv(program, location, count, value); + return 0; +} + + +int glProgramUniform1uiv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + const GLuint * value = get: const GLuint * + glProgramUniform1uiv(program, location, count, value); + return 0; +} + + +int glProgramUniform2uiv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + const GLuint * value = get: const GLuint * + glProgramUniform2uiv(program, location, count, value); + return 0; +} + + +int glProgramUniform3uiv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + const GLuint * value = get: const GLuint * + glProgramUniform3uiv(program, location, count, value); + return 0; +} + + +int glProgramUniform4uiv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + const GLuint * value = get: const GLuint * + glProgramUniform4uiv(program, location, count, value); + return 0; +} + + +int glProgramUniformMatrix2fv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glProgramUniformMatrix2fv(program, location, count, transpose, value); + return 0; +} + + +int glProgramUniformMatrix3fv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glProgramUniformMatrix3fv(program, location, count, transpose, value); + return 0; +} + + +int glProgramUniformMatrix4fv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glProgramUniformMatrix4fv(program, location, count, transpose, value); + return 0; +} + + +int glProgramUniformMatrix2x3fv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glProgramUniformMatrix2x3fv(program, location, count, transpose, value); + return 0; +} + + +int glProgramUniformMatrix3x2fv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glProgramUniformMatrix3x2fv(program, location, count, transpose, value); + return 0; +} + + +int glProgramUniformMatrix2x4fv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glProgramUniformMatrix2x4fv(program, location, count, transpose, value); + return 0; +} + + +int glProgramUniformMatrix4x2fv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glProgramUniformMatrix4x2fv(program, location, count, transpose, value); + return 0; +} + + +int glProgramUniformMatrix3x4fv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glProgramUniformMatrix3x4fv(program, location, count, transpose, value); + return 0; +} + + +int glProgramUniformMatrix4x3fv_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLint location = luaL_checkinteger(L, 2); + GLsizei count = luaL_checkinteger(L, 3); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glProgramUniformMatrix4x3fv(program, location, count, transpose, value); + return 0; +} + + +int glProvokingVertex_bind(lua_State *L) +{ + GLenum provokeMode = luaL_checkinteger(L, 1); + glProvokingVertex(provokeMode); + return 0; +} + + diff --git a/src/opengl/bind/q b/src/opengl/bind/q new file mode 100644 index 0000000..840f97b --- /dev/null +++ b/src/opengl/bind/q @@ -0,0 +1 @@ +void glQueryCounter( GLuint id, GLenum target); diff --git a/src/opengl/bind/q.bind b/src/opengl/bind/q.bind new file mode 100644 index 0000000..7209f1f --- /dev/null +++ b/src/opengl/bind/q.bind @@ -0,0 +1,9 @@ +int glQueryCounter_bind(lua_State *L) +{ + GLuint id = luaL_checkinteger(L, 1); + GLenum target = luaL_checkinteger(L, 2); + glQueryCounter(id, target); + return 0; +} + + diff --git a/src/opengl/bind/r b/src/opengl/bind/r new file mode 100644 index 0000000..f4e581c --- /dev/null +++ b/src/opengl/bind/r @@ -0,0 +1,6 @@ +void glReadBuffer( GLenum mode); +void glReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * data); +void glReleaseShaderCompiler( void); +void glRenderbufferStorage( GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +void glRenderbufferStorageMultisample( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +void glResumeTransformFeedback( void); diff --git a/src/opengl/bind/r.bind b/src/opengl/bind/r.bind new file mode 100644 index 0000000..d070737 --- /dev/null +++ b/src/opengl/bind/r.bind @@ -0,0 +1,61 @@ +int glReadBuffer_bind(lua_State *L) +{ + GLenum mode = luaL_checkinteger(L, 1); + glReadBuffer(mode); + return 0; +} + + +int glReadPixels_bind(lua_State *L) +{ + GLint x = luaL_checkinteger(L, 1); + GLint y = luaL_checkinteger(L, 2); + GLsizei width = luaL_checkinteger(L, 3); + GLsizei height = luaL_checkinteger(L, 4); + GLenum format = luaL_checkinteger(L, 5); + GLenum type = luaL_checkinteger(L, 6); + void * data = get: void * + glReadPixels(x, y, width, height, format, type, data); + return 0; +} + + +int glReleaseShaderCompiler_bind(lua_State *L) +{ + void = get: + glReleaseShaderCompiler(void); + return 0; +} + + +int glRenderbufferStorage_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum internalformat = luaL_checkinteger(L, 2); + GLsizei width = luaL_checkinteger(L, 3); + GLsizei height = luaL_checkinteger(L, 4); + glRenderbufferStorage(target, internalformat, width, height); + return 0; +} + + +int glRenderbufferStorageMultisample_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLsizei samples = luaL_checkinteger(L, 2); + GLenum internalformat = luaL_checkinteger(L, 3); + GLsizei width = luaL_checkinteger(L, 4); + GLsizei height = luaL_checkinteger(L, 5); + glRenderbufferStorageMultisample(target, samples, internalformat, width, height); + return 0; +} + + +int glResumeTransformFeedback_bind(lua_State *L) +{ + void = get: + glResumeTransformFeedback(void); + return 0; +} + + diff --git a/src/opengl/bind/s b/src/opengl/bind/s new file mode 100644 index 0000000..cdddf6b --- /dev/null +++ b/src/opengl/bind/s @@ -0,0 +1,21 @@ +void glSampleCoverage( GLfloat value, GLboolean invert); +void glSampleMaski( GLuint maskNumber, GLbitfield mask); +void glSamplerParameterf( GLuint sampler, GLenum pname, GLfloat param); +void glSamplerParameteri( GLuint sampler, GLenum pname, GLint param); +void glSamplerParameterfv( GLuint sampler, GLenum pname, const GLfloat * params); +void glSamplerParameteriv( GLuint sampler, GLenum pname, const GLint * params); +void glSamplerParameterIiv( GLuint sampler, GLenum pname, const GLint *params); +void glSamplerParameterIuiv( GLuint sampler, GLenum pname, const GLuint *params); +void glScissor( GLint x, GLint y, GLsizei width, GLsizei height); +void glScissorArrayv( GLuint first, GLsizei count, const GLint *v); +void glScissorIndexed( GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +void glScissorIndexedv( GLuint index, const GLint *v); +void glShaderBinary( GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length); +void glShaderSource( GLuint shader, GLsizei count, const GLchar **string, const GLint *length); +void glStencilFunc( GLenum func, GLint ref, GLuint mask); +void glStencilFuncSeparate( GLenum face, GLenum func, GLint ref, GLuint mask); +void glStencilMask( GLuint mask); +void glStencilMaskSeparate( GLenum face, GLuint mask); +void glStencilOp( GLenum sfail, GLenum dpfail, GLenum dppass); +void glStencilOpSeparate( GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); + diff --git a/src/opengl/bind/s.bind b/src/opengl/bind/s.bind new file mode 100644 index 0000000..256ebe2 --- /dev/null +++ b/src/opengl/bind/s.bind @@ -0,0 +1,202 @@ +int glSampleCoverage_bind(lua_State *L) +{ + GLfloat value = luaL_checknumber(L, 1); + GLboolean invert = get: GLboolean + glSampleCoverage(value, invert); + return 0; +} + + +int glSampleMaski_bind(lua_State *L) +{ + GLuint maskNumber = luaL_checkinteger(L, 1); + GLbitfield mask = luaL_checkinteger(L, 2); + glSampleMaski(maskNumber, mask); + return 0; +} + + +int glSamplerParameterf_bind(lua_State *L) +{ + GLuint sampler = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLfloat param = luaL_checknumber(L, 3); + glSamplerParameterf(sampler, pname, param); + return 0; +} + + +int glSamplerParameteri_bind(lua_State *L) +{ + GLuint sampler = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint param = luaL_checkinteger(L, 3); + glSamplerParameteri(sampler, pname, param); + return 0; +} + + +int glSamplerParameterfv_bind(lua_State *L) +{ + GLuint sampler = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + const GLfloat * params = get: const GLfloat * + glSamplerParameterfv(sampler, pname, params); + return 0; +} + + +int glSamplerParameteriv_bind(lua_State *L) +{ + GLuint sampler = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + const GLint * params = get: const GLint * + glSamplerParameteriv(sampler, pname, params); + return 0; +} + + +int glSamplerParameterIiv_bind(lua_State *L) +{ + GLuint sampler = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + const GLint * params = get: const GLint * + glSamplerParameterIiv(sampler, pname, params); + return 0; +} + + +int glSamplerParameterIuiv_bind(lua_State *L) +{ + GLuint sampler = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + const GLuint * params = get: const GLuint * + glSamplerParameterIuiv(sampler, pname, params); + return 0; +} + + +int glScissor_bind(lua_State *L) +{ + GLint x = luaL_checkinteger(L, 1); + GLint y = luaL_checkinteger(L, 2); + GLsizei width = luaL_checkinteger(L, 3); + GLsizei height = luaL_checkinteger(L, 4); + glScissor(x, y, width, height); + return 0; +} + + +int glScissorArrayv_bind(lua_State *L) +{ + GLuint first = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLint * v = get: const GLint * + glScissorArrayv(first, count, v); + return 0; +} + + +int glScissorIndexed_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLint left = luaL_checkinteger(L, 2); + GLint bottom = luaL_checkinteger(L, 3); + GLsizei width = luaL_checkinteger(L, 4); + GLsizei height = luaL_checkinteger(L, 5); + glScissorIndexed(index, left, bottom, width, height); + return 0; +} + + +int glScissorIndexedv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLint * v = get: const GLint * + glScissorIndexedv(index, v); + return 0; +} + + +int glShaderBinary_bind(lua_State *L) +{ + GLsizei count = luaL_checkinteger(L, 1); + const GLuint * shaders = get: const GLuint * + GLenum binaryFormat = luaL_checkinteger(L, 3); + const void * binary = get: const void * + GLsizei length = luaL_checkinteger(L, 5); + glShaderBinary(count, shaders, binaryFormat, binary, length); + return 0; +} + + +int glShaderSource_bind(lua_State *L) +{ + GLuint shader = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLchar ** string = get: const GLchar ** + const GLint * length = get: const GLint * + glShaderSource(shader, count, string, length); + return 0; +} + + +int glStencilFunc_bind(lua_State *L) +{ + GLenum func = luaL_checkinteger(L, 1); + GLint ref = luaL_checkinteger(L, 2); + GLuint mask = luaL_checkinteger(L, 3); + glStencilFunc(func, ref, mask); + return 0; +} + + +int glStencilFuncSeparate_bind(lua_State *L) +{ + GLenum face = luaL_checkinteger(L, 1); + GLenum func = luaL_checkinteger(L, 2); + GLint ref = luaL_checkinteger(L, 3); + GLuint mask = luaL_checkinteger(L, 4); + glStencilFuncSeparate(face, func, ref, mask); + return 0; +} + + +int glStencilMask_bind(lua_State *L) +{ + GLuint mask = luaL_checkinteger(L, 1); + glStencilMask(mask); + return 0; +} + + +int glStencilMaskSeparate_bind(lua_State *L) +{ + GLenum face = luaL_checkinteger(L, 1); + GLuint mask = luaL_checkinteger(L, 2); + glStencilMaskSeparate(face, mask); + return 0; +} + + +int glStencilOp_bind(lua_State *L) +{ + GLenum sfail = luaL_checkinteger(L, 1); + GLenum dpfail = luaL_checkinteger(L, 2); + GLenum dppass = luaL_checkinteger(L, 3); + glStencilOp(sfail, dpfail, dppass); + return 0; +} + + +int glStencilOpSeparate_bind(lua_State *L) +{ + GLenum face = luaL_checkinteger(L, 1); + GLenum sfail = luaL_checkinteger(L, 2); + GLenum dpfail = luaL_checkinteger(L, 3); + GLenum dppass = luaL_checkinteger(L, 4); + glStencilOpSeparate(face, sfail, dpfail, dppass); + return 0; +} + + diff --git a/src/opengl/bind/sigs b/src/opengl/bind/sigs new file mode 100644 index 0000000..60479df --- /dev/null +++ b/src/opengl/bind/sigs @@ -0,0 +1,445 @@ +void glActiveShaderProgram( GLuint pipeline, GLuint program); +void glActiveTexture( GLenum texture); +void glAttachShader( GLuint program, GLuint shader); +void glBeginConditionalRender( GLuint id, GLenum mode); +void glBeginQuery( GLenum target, GLuint id); +void glBeginQuery( GLenum target, GLuint id); +void glBeginTransformFeedback( GLenum primitiveMode); +void glBindAttribLocation( GLuint program, GLuint index, const GLchar *name); +void glBindBuffer( GLenum target, GLuint buffer); +void glBindBufferBase( GLenum target, GLuint index, GLuint buffer); +void glBindBufferRange( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +void glBindFragDataLocation( GLuint program, GLuint colorNumber, const char * name); +void glBindFragDataLocationIndexed( GLuint program, GLuint colorNumber, GLuint index, const char *name); +void glBindFramebuffer( GLenum target, GLuint framebuffer); +void glBindImageTexture( GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +void glBindProgramPipeline( GLuint pipeline); +void glBindRenderbuffer( GLenum target, GLuint renderbuffer); +void glBindSampler( GLuint unit, GLuint sampler); +void glBindTexture( GLenum target, GLuint texture); +void glBindTextureUnit( GLuint unit, GLuint texture); +void glBindTransformFeedback( GLenum target, GLuint id); +void glBindVertexArray( GLuint array); +void glBindVertexBuffer( GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +void glBlendColor( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +void glBlendEquation( GLenum mode); + +void glBlendEquationi( GLuint buf, GLenum mode); +void glBlendEquationSeparate( GLenum modeRGB, GLenum modeAlpha); +void glBlendEquationSeparatei( GLuint buf, GLenum modeRGB, GLenum modeAlpha); +void glBlendFunc( GLenum sfactor, GLenum dfactor); +void glBlendFunci( GLuint buf, GLenum sfactor, GLenum dfactor); +void glBlendFuncSeparate( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +void glBlendFuncSeparatei( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +void glBlitFramebuffer( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +void glBlitNamedFramebuffer( GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +void glBufferData( GLenum target, GLsizeiptr size, const void * data, GLenum usage); +void glBufferStorage( GLenum target, GLsizeiptr size, const void * data, GLbitfield flags); +void glBufferSubData( GLenum target, GLintptr offset, GLsizeiptr size, const void * data); +GLenum glCheckFramebufferStatus( GLenum target); +GLenum glCheckNamedFramebufferStatus( GLuint framebuffer, GLenum target); +void glClampColor( GLenum target, GLenum clamp); +void glClear( GLbitfield mask); +void glClearBufferiv( GLenum buffer, GLint drawbuffer, const GLint * value); +void glClearBufferuiv( GLenum buffer, GLint drawbuffer, const GLuint * value); +void glClearBufferfv( GLenum buffer, GLint drawbuffer, const GLfloat * value); +void glClearBufferfi( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +void glClearStencil( GLint s); +GLenum glClientWaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout); +void glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +void glColorMaski( GLuint buf, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +void glCompileShader( GLuint shader); +void glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void * data); +void glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data); +void glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data); +void glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void * data); +void glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data); +void glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data); +void glCopyBufferSubData( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +void glCopyBufferSubData( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +void glCopyTexImage1D( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +void glCopyTexImage2D( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +void glCopyTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +void glCopyTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +void glCopyTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLuint glCreateProgram( void); +GLuint glCreateShader( GLenum shaderType); +GLuint glCreateShaderProgramv( GLenum type, GLsizei count, const char **strings); +void glCullFace( GLenum mode); + +void glDeleteBuffers( GLsizei n, const GLuint * buffers); +void glDeleteFramebuffers( GLsizei n, GLuint *framebuffers); +void glDeleteProgram( GLuint program); +void glDeleteProgramPipelines( GLsizei n, const GLuint *pipelines); +void glDeleteQueries( GLsizei n, const GLuint * ids); +void glDeleteRenderbuffers( GLsizei n, GLuint *renderbuffers); +void glDeleteSamplers( GLsizei n, const GLuint * samplers); +void glDeleteShader( GLuint shader); +void glDeleteSync( GLsync sync); +void glDeleteTextures( GLsizei n, const GLuint * textures); +void glDeleteTransformFeedbacks( GLsizei n, const GLuint *ids); +void glDeleteVertexArrays( GLsizei n, const GLuint *arrays); +void glDepthFunc( GLenum func); +void glDepthMask( GLboolean flag); +void glDepthRange( GLdouble nearVal, GLdouble farVal); +void glDepthRangef( GLfloat nearVal, GLfloat farVal); +void glDepthRangeArrayv( GLuint first, GLsizei count, const GLdouble *v); +void glDepthRangeIndexed( GLuint index, GLdouble nearVal, GLdouble farVal); +void glDetachShader( GLuint program, GLuint shader); +void glDisable( GLenum cap); +void glDisablei( GLenum cap, GLuint index); +void glDisableVertexAttribArray( GLuint index); +void glDrawArrays( GLenum mode, GLint first, GLsizei count); +void glDrawArraysIndirect( GLenum mode, const void *indirect); +void glDrawArraysInstanced( GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +void glDrawBuffer( GLenum buf); +void glDrawBuffers( GLsizei n, const GLenum *bufs); +void glDrawElements( GLenum mode, GLsizei count, GLenum type, const void * indices); +void glDrawElementsBaseVertex( GLenum mode, GLsizei count, GLenum type, void *indices, GLint basevertex); +void glDrawElementsIndirect( GLenum mode, GLenum type, const void *indirect); +void glDrawElementsInstanced( GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount); +void glDrawRangeElements( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices); +void glDrawRangeElementsBaseVertex( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, void *indices, GLint basevertex); +void glDrawTransformFeedback( GLenum mode, GLuint id); +void glDrawTransformFeedbackStream( GLenum mode, GLuint id, GLuint stream); + +void glEnable( GLenum cap); +void glEnablei( GLenum cap, GLuint index); +void glEnableVertexAttribArray( GLuint index); +void glEndConditionalRender( void); +void glEndQuery( GLenum target); +void glEndQueryIndexed( GLenum target, GLuint index); +void glEndTransformFeedback(); +GLsync glFenceSync( GLenum condition, GLbitfield flags); +void glFinish( void); +void glFlush( void); +void glFlushMappedBufferRange( GLenum target, GLintptr offset, GLsizeiptr length); +void glFramebufferRenderbuffer( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +void glFramebufferTexture( GLenum target, GLenum attachment, GLuint texture, GLint level); +void glFramebufferTexture1D( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +void glFramebufferTexture2D( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +void glFramebufferTexture3D( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint layer); +void glFramebufferTextureLayer( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +void glFrontFace( GLenum mode); +void glGenBuffers( GLsizei n, GLuint * buffers); +void glGenerateMipmap( GLenum target); +void glGenFramebuffers( GLsizei n, GLuint *ids); +void glGenProgramPipelines( GLsizei n, GLuint *pipelines); +void glGenQueries( GLsizei n, GLuint * ids); +void glGenRenderbuffers( GLsizei n, GLuint *renderbuffers); +void glGenSamplers( GLsizei n, GLuint *samplers); +void glGenTextures( GLsizei n, GLuint * textures); +void glGenTransformFeedbacks( GLsizei n, GLuint *ids); +void glGenVertexArrays( GLsizei n, GLuint *arrays); +void glGetBooleanv( GLenum pname, GLboolean * data); +void glGetDoublev( GLenum pname, GLdouble * data); +void glGetFloatv( GLenum pname, GLfloat * data); +void glGetIntegerv( GLenum pname, GLint * data); +void glGetInteger64v( GLenum pname, GLint64 * data); +void glGetBooleani_v( GLenum target, GLuint index, GLboolean * data); +void glGetIntegeri_v( GLenum target, GLuint index, GLint * data); +void glGetFloati_v( GLenum target, GLuint index, GLfloat * data); +void glGetDoublei_v( GLenum target, GLuint index, GLdouble * data); +void glGetInteger64i_v( GLenum target, GLuint index, GLint64 * data); +void glGetActiveAttrib( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +void glGetActiveSubroutineName( GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +void glGetActiveSubroutineUniformiv( GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +void glGetActiveSubroutineUniformName( GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +void glGetActiveUniform( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +void glGetActiveUniformBlockiv( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +void glGetActiveUniformBlockName( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +void glGetActiveUniformName( GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +void glGetActiveUniformsiv( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +void glGetAttachedShaders( GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +GLint glGetAttribLocation( GLuint program, const GLchar *name); +void glGetBufferParameteriv( GLenum target, GLenum value, GLint * data); +void glGetBufferParameteri64v( GLenum target, GLenum value, GLint64 * data); +void glGetBufferPointerv( GLenum target, GLenum pname, void ** params); +void glGetBufferSubData( GLenum target, GLintptr offset, GLsizeiptr size, void * data); +void glGetCompressedTexImage( GLenum target, GLint level, void * pixels); +GLenum glGetError( void); +GLint glGetFragDataIndex( GLuint program, const char * name); +GLint glGetFragDataLocation( GLuint program, const char * name); +void glGetFramebufferAttachmentParameteriv( GLenum target, GLenum attachment, GLenum pname, GLint *params); +void glGetMultisamplefv( GLenum pname, GLuint index, GLfloat *val); +void glGetUniformfv( GLuint program, GLint location, GLfloat *params); +void glGetUniformiv( GLuint program, GLint location, GLint *params); +void glGetUniformuiv( GLuint program, GLint location, GLuint *params); +void glGetUniformdv( GLuint program, GLint location, GLdouble *params); +void glGetProgramiv( GLuint program, GLenum pname, GLint *params); +void glGetProgramBinary( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +void glGetProgramInfoLog( GLuint program, GLsizei maxLength, GLsizei *length, GLchar *infoLog); +void glGetProgramPipelineiv( GLuint pipeline, GLenum pname, GLint *params); +void glGetProgramPipelineInfoLog( GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +void glGetProgramPipelineiv( GLuint pipeline, GLenum pname, GLint *params); +void glGetProgramStageiv( GLuint program, GLenum shadertype, GLenum pname, GLint *values); +void glGetQueryIndexediv( GLenum target, GLuint index, GLenum pname, GLint * params); +void glGetQueryiv( GLenum target, GLenum pname, GLint * params); +void glGetRenderbufferParameteriv( GLenum target, GLenum pname, GLint *params); +void glGetSamplerParameterfv( GLuint sampler, GLenum pname, GLfloat * params); +void glGetSamplerParameteriv( GLuint sampler, GLenum pname, GLint * params); +void glGetSamplerParameterIiv( GLuint sampler, GLenum pname, GLint * params); +void glGetSamplerParameterIuiv( GLuint sampler, GLenum pname, GLuint * params); +void glGetShaderiv( GLuint shader, GLenum pname, GLint *params); +void glGetShaderInfoLog( GLuint shader, GLsizei maxLength, GLsizei *length, GLchar *infoLog); +void glGetShaderiv( GLuint shader, GLenum pname, GLint *params); +void glGetShaderPrecisionFormat( GLenum shaderType, GLenum precisionType, GLint *range, GLint *precision); +void glGetShaderSource( GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +const GLubyte * glGetString(GLenum name); +const GLubyte * glGetStringi(GLenum name, GLuint index); +GLuint glGetSubroutineIndex( GLuint program, GLenum shadertype, const GLchar *name); +GLint glGetSubroutineUniformLocation( GLuint program, GLenum shadertype, const GLchar *name); +void glGetSynciv( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +void glGetTexImage( GLenum target, GLint level, GLenum format, GLenum type, void * pixels); +void glGetTexLevelParameterfv( GLenum target, GLint level, GLenum pname, GLfloat * params); +void glGetTexLevelParameteriv( GLenum target, GLint level, GLenum pname, GLint * params); +void glGetTexParameterfv( GLenum target, GLenum pname, GLfloat * params); +void glGetTexParameteriv( GLenum target, GLenum pname, GLint * params); +void glGetTexParameterIiv( GLenum target, GLenum pname, GLint * params); +void glGetTexParameterIuiv( GLenum target, GLenum pname, GLuint * params); +void glGetTransformFeedbackVarying( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, char *name); +GLuint glGetUniformBlockIndex( GLuint program, const GLchar *uniformBlockName); +void glGetUniformIndices( GLuint program, GLsizei uniformCount, const GLchar **uniformNames, GLuint *uniformIndices); +GLint glGetUniformLocation( GLuint program, const GLchar *name); +void glGetUniformSubroutineuiv( GLenum shadertype, GLint location, GLuint *values); +void glGetVertexAttribdv( GLuint index, GLenum pname, GLdouble *params); +void glGetVertexAttribfv( GLuint index, GLenum pname, GLfloat *params); +void glGetVertexAttribiv( GLuint index, GLenum pname, GLint *params); +void glGetVertexAttribIiv( GLuint index, GLenum pname, GLint *params); +void glGetVertexAttribIuiv( GLuint index, GLenum pname, GLuint *params); +void glGetVertexAttribLdv( GLuint index, GLenum pname, GLdouble *params); +void glGetVertexAttribPointerv( GLuint index, GLenum pname, void **pointer); +void glHint( GLenum target, GLenum mode); +GLboolean glIsBuffer( GLuint buffer); +GLboolean glIsEnabled( GLenum cap); +GLboolean glIsEnabledi( GLenum cap, GLuint index); +GLboolean glIsFramebuffer( GLuint framebuffer); +GLboolean glIsProgram( GLuint program); +GLboolean glIsProgramPipeline( GLuint pipeline); +GLboolean glIsQuery( GLuint id); +GLboolean glIsRenderbuffer( GLuint renderbuffer); +GLboolean glIsSampler( GLuint id); +GLboolean glIsShader( GLuint shader); +GLboolean glIsSync( GLsync sync); +GLboolean glIsTexture( GLuint texture); +GLboolean glIsTransformFeedback( GLuint id); +GLboolean glIsVertexArray( GLuint array); +void glLineWidth( GLfloat width); +void glLinkProgram( GLuint program); +void glLogicOp( GLenum opcode); + +void * glMapBuffer( GLenum target, GLenum access); +void * glMapBufferRange( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +void glMinSampleShading( GLfloat value); +void glMultiDrawArrays( GLenum mode, const GLint * first, const GLsizei * count, GLsizei drawcount); +void glMultiDrawElements( GLenum mode, const GLsizei * count, GLenum type, const void * const * indices, GLsizei drawcount); +void glMultiDrawElementsBaseVertex( GLenum mode, const GLsizei *count, GLenum type, const void * const *indices, GLsizei drawcount, const GLint *basevertex); + +void glPatchParameteri( GLenum pname, GLint value); +void glPatchParameterfv( GLenum pname, const GLfloat *values); +void glPauseTransformFeedback( void); +void glPixelStoref( GLenum pname, GLfloat param); +void glPixelStorei( GLenum pname, GLint param); +void glPointParameterf( GLenum pname, GLfloat param); +void glPointParameteri( GLenum pname, GLint param); +void glPointParameterfv( GLenum pname, const GLfloat * params); +void glPointParameteriv( GLenum pname, const GLint * params); +void glPointSize( GLfloat size); +void glPolygonMode( GLenum face, GLenum mode); +void glPolygonOffset( GLfloat factor, GLfloat units); +void glPrimitiveRestartIndex( GLuint index); +void glProgramBinary( GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +void glProgramParameteri( GLuint program, GLenum pname, GLint value); +void glProgramUniform1f( GLuint program, GLint location, GLfloat v0); +void glProgramUniform2f( GLuint program, GLint location, GLfloat v0, GLfloat v1); +void glProgramUniform3f( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +void glProgramUniform4f( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +void glProgramUniform1i( GLuint program, GLint location, GLint v0); +void glProgramUniform2i( GLuint program, GLint location, GLint v0, GLint v1); +void glProgramUniform3i( GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +void glProgramUniform4i( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +void glProgramUniform1ui( GLuint program, GLint location, GLuint v0); +void glProgramUniform2ui( GLuint program, GLint location, GLuint v0, GLuint v1); +void glProgramUniform3ui( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +void glProgramUniform4ui( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +void glProgramUniform1fv( GLuint program, GLint location, GLsizei count, const GLfloat *value); +void glProgramUniform2fv( GLuint program, GLint location, GLsizei count, const GLfloat *value); +void glProgramUniform3fv( GLuint program, GLint location, GLsizei count, const GLfloat *value); +void glProgramUniform4fv( GLuint program, GLint location, GLsizei count, const GLfloat *value); +void glProgramUniform1iv( GLuint program, GLint location, GLsizei count, const GLint *value); +void glProgramUniform2iv( GLuint program, GLint location, GLsizei count, const GLint *value); +void glProgramUniform3iv( GLuint program, GLint location, GLsizei count, const GLint *value); +void glProgramUniform4iv( GLuint program, GLint location, GLsizei count, const GLint *value); +void glProgramUniform1uiv( GLuint program, GLint location, GLsizei count, const GLuint *value); +void glProgramUniform2uiv( GLuint program, GLint location, GLsizei count, const GLuint *value); +void glProgramUniform3uiv( GLuint program, GLint location, GLsizei count, const GLuint *value); +void glProgramUniform4uiv( GLuint program, GLint location, GLsizei count, const GLuint *value); +void glProgramUniformMatrix2fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix3fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix4fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix2x3fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix3x2fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix2x4fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix4x2fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix3x4fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProgramUniformMatrix4x3fv( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glProvokingVertex( GLenum provokeMode); + +void glQueryCounter( GLuint id, GLenum target); +void glReadBuffer( GLenum mode); +void glReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * data); +void glReleaseShaderCompiler( void); +void glRenderbufferStorage( GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +void glRenderbufferStorageMultisample( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +void glResumeTransformFeedback( void); +void glSampleCoverage( GLfloat value, GLboolean invert); +void glSampleMaski( GLuint maskNumber, GLbitfield mask); +void glSamplerParameterf( GLuint sampler, GLenum pname, GLfloat param); +void glSamplerParameteri( GLuint sampler, GLenum pname, GLint param); +void glSamplerParameterfv( GLuint sampler, GLenum pname, const GLfloat * params); +void glSamplerParameteriv( GLuint sampler, GLenum pname, const GLint * params); +void glSamplerParameterIiv( GLuint sampler, GLenum pname, const GLint *params); +void glSamplerParameterIuiv( GLuint sampler, GLenum pname, const GLuint *params); +void glScissor( GLint x, GLint y, GLsizei width, GLsizei height); +void glScissorArrayv( GLuint first, GLsizei count, const GLint *v); +void glScissorIndexed( GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +void glScissorIndexedv( GLuint index, const GLint *v); +void glShaderBinary( GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length); +void glShaderSource( GLuint shader, GLsizei count, const GLchar **string, const GLint *length); +void glStencilFunc( GLenum func, GLint ref, GLuint mask); +void glStencilFuncSeparate( GLenum face, GLenum func, GLint ref, GLuint mask); +void glStencilMask( GLuint mask); +void glStencilMaskSeparate( GLenum face, GLuint mask); +void glStencilOp( GLenum sfail, GLenum dpfail, GLenum dppass); +void glStencilOpSeparate( GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); + +void glTexBuffer( GLenum target, GLenum internalformat, GLuint buffer); +void glTexImage1D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void * data); +void glTexImage2D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * data); +void glTexImage2DMultisample( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +void glTexImage3D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * data); +void glTexImage3DMultisample( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +void glTexParameterf( GLenum target, GLenum pname, GLfloat param); +void glTexParameteri( GLenum target, GLenum pname, GLint param); +void glTexParameterfv( GLenum target, GLenum pname, const GLfloat * params); +void glTexParameteriv( GLenum target, GLenum pname, const GLint * params); +void glTexParameterIiv( GLenum target, GLenum pname, const GLint * params); +void glTexParameterIuiv( GLenum target, GLenum pname, const GLuint * params); +void glTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels); +void glTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels); +void glTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels); +void glTransformFeedbackVaryings( GLuint program, GLsizei count, const char **varyings, GLenum bufferMode); +void glUniform1f( GLint location, GLfloat v0); +void glUniform2f( GLint location, GLfloat v0, GLfloat v1); +void glUniform3f( GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +void glUniform4f( GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +void glUniform1i( GLint location, GLint v0); +void glUniform2i( GLint location, GLint v0, GLint v1); +void glUniform3i( GLint location, GLint v0, GLint v1, GLint v2); +void glUniform4i( GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +void glUniform1ui( GLint location, GLuint v0); +void glUniform2ui( GLint location, GLuint v0, GLuint v1); +void glUniform3ui( GLint location, GLuint v0, GLuint v1, GLuint v2); +void glUniform4ui( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +void glUniform1fv( GLint location, GLsizei count, const GLfloat *value); +void glUniform2fv( GLint location, GLsizei count, const GLfloat *value); +void glUniform3fv( GLint location, GLsizei count, const GLfloat *value); +void glUniform4fv( GLint location, GLsizei count, const GLfloat *value); +void glUniform1iv( GLint location, GLsizei count, const GLint *value); +void glUniform2iv( GLint location, GLsizei count, const GLint *value); +void glUniform3iv( GLint location, GLsizei count, const GLint *value); +void glUniform4iv( GLint location, GLsizei count, const GLint *value); +void glUniform1uiv( GLint location, GLsizei count, const GLuint *value); +void glUniform2uiv( GLint location, GLsizei count, const GLuint *value); +void glUniform3uiv( GLint location, GLsizei count, const GLuint *value); +void glUniform4uiv( GLint location, GLsizei count, const GLuint *value); +void glUniformMatrix2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix2x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix3x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix2x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix4x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix3x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix4x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformSubroutinesuiv( GLenum shadertype, GLsizei count, const GLuint *indices); +GLboolean glUnmapBuffer( GLenum target); +void glUseProgram( GLuint program); +void glUseProgramStages( GLuint pipeline, GLbitfield stages, GLuint program); +void glValidateProgram( GLuint program); +void glValidateProgramPipeline( GLuint pipeline); +void glVertexAttrib1f( GLuint index, GLfloat v0); +void glVertexAttrib1s( GLuint index, GLshort v0); +void glVertexAttrib1d( GLuint index, GLdouble v0); +void glVertexAttribI1i( GLuint index, GLint v0); +void glVertexAttribI1ui( GLuint index, GLuint v0); +void glVertexAttrib2f( GLuint index, GLfloat v0, GLfloat v1); +void glVertexAttrib2s( GLuint index, GLshort v0, GLshort v1); +void glVertexAttrib2d( GLuint index, GLdouble v0, GLdouble v1); +void glVertexAttribI2i( GLuint index, GLint v0, GLint v1); +void glVertexAttribI2ui( GLuint index, GLuint v0, GLuint v1); +void glVertexAttrib3f( GLuint index, GLfloat v0, GLfloat v1, GLfloat v2); +void glVertexAttrib3s( GLuint index, GLshort v0, GLshort v1, GLshort v2); +void glVertexAttrib3d( GLuint index, GLdouble v0, GLdouble v1, GLdouble v2); +void glVertexAttribI3i( GLuint index, GLint v0, GLint v1, GLint v2); +void glVertexAttribI3ui( GLuint index, GLuint v0, GLuint v1, GLuint v2); +void glVertexAttrib4f( GLuint index, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +void glVertexAttrib4s( GLuint index, GLshort v0, GLshort v1, GLshort v2, GLshort v3); +void glVertexAttrib4d( GLuint index, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +void glVertexAttrib4Nub( GLuint index, GLubyte v0, GLubyte v1, GLubyte v2, GLubyte v3); +void glVertexAttribI4i( GLuint index, GLint v0, GLint v1, GLint v2, GLint v3); +void glVertexAttribI4ui( GLuint index, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +void glVertexAttribL1d( GLuint index, GLdouble v0); +void glVertexAttribL2d( GLuint index, GLdouble v0, GLdouble v1); +void glVertexAttribL3d( GLuint index, GLdouble v0, GLdouble v1, GLdouble v2); +void glVertexAttribL4d( GLuint index, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +void glVertexAttrib1fv( GLuint index, const GLfloat *v); +void glVertexAttrib1sv( GLuint index, const GLshort *v); +void glVertexAttrib1dv( GLuint index, const GLdouble *v); +void glVertexAttribI1iv( GLuint index, const GLint *v); +void glVertexAttribI1uiv( GLuint index, const GLuint *v); +void glVertexAttrib2fv( GLuint index, const GLfloat *v); +void glVertexAttrib2sv( GLuint index, const GLshort *v); +void glVertexAttrib2dv( GLuint index, const GLdouble *v); +void glVertexAttribI2iv( GLuint index, const GLint *v); +void glVertexAttribI2uiv( GLuint index, const GLuint *v); +void glVertexAttrib3fv( GLuint index, const GLfloat *v); +void glVertexAttrib3sv( GLuint index, const GLshort *v); +void glVertexAttrib3dv( GLuint index, const GLdouble *v); +void glVertexAttribI3iv( GLuint index, const GLint *v); +void glVertexAttribI3uiv( GLuint index, const GLuint *v); +void glVertexAttrib4fv( GLuint index, const GLfloat *v); +void glVertexAttrib4sv( GLuint index, const GLshort *v); +void glVertexAttrib4dv( GLuint index, const GLdouble *v); +void glVertexAttrib4iv( GLuint index, const GLint *v); +void glVertexAttrib4bv( GLuint index, const GLbyte *v); +void glVertexAttrib4ubv( GLuint index, const GLubyte *v); +void glVertexAttrib4usv( GLuint index, const GLushort *v); +void glVertexAttrib4uiv( GLuint index, const GLuint *v); +void glVertexAttrib4Nbv( GLuint index, const GLbyte *v); +void glVertexAttrib4Nsv( GLuint index, const GLshort *v); +void glVertexAttrib4Niv( GLuint index, const GLint *v); +void glVertexAttrib4Nubv( GLuint index, const GLubyte *v); +void glVertexAttrib4Nusv( GLuint index, const GLushort *v); +void glVertexAttrib4Nuiv( GLuint index, const GLuint *v); +void glVertexAttribI4bv( GLuint index, const GLbyte *v); +void glVertexAttribI4ubv( GLuint index, const GLubyte *v); +void glVertexAttribI4sv( GLuint index, const GLshort *v); +void glVertexAttribI4usv( GLuint index, const GLushort *v); +void glVertexAttribI4iv( GLuint index, const GLint *v); +void glVertexAttribI4uiv( GLuint index, const GLuint *v); +void glVertexAttribL1dv( GLuint index, const GLdouble *v); +void glVertexAttribL2dv( GLuint index, const GLdouble *v); +void glVertexAttribL3dv( GLuint index, const GLdouble *v); +void glVertexAttribL4dv( GLuint index, const GLdouble *v); +void glVertexAttribP1ui( GLuint index, GLenum type, GLboolean normalized, GLuint value); +void glVertexAttribP2ui( GLuint index, GLenum type, GLboolean normalized, GLuint value); +void glVertexAttribP3ui( GLuint index, GLenum type, GLboolean normalized, GLuint value); +void glVertexAttribP4ui( GLuint index, GLenum type, GLboolean normalized, GLuint value); +void glVertexAttribPointer( GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer); +void glVertexAttribIPointer( GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer); +void glViewport( GLint x, GLint y, GLsizei width, GLsizei height); +void glViewportArrayv( GLuint first, GLsizei count, const GLfloat *v); +void glViewportIndexedf( GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +void glViewportIndexedfv( GLuint index, const GLfloat *v); +void glWaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout); diff --git a/src/opengl/bind/t b/src/opengl/bind/t new file mode 100644 index 0000000..d503c1e --- /dev/null +++ b/src/opengl/bind/t @@ -0,0 +1,16 @@ +void glTexBuffer( GLenum target, GLenum internalformat, GLuint buffer); +void glTexImage1D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void * data); +void glTexImage2D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * data); +void glTexImage2DMultisample( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +void glTexImage3D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * data); +void glTexImage3DMultisample( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +void glTexParameterf( GLenum target, GLenum pname, GLfloat param); +void glTexParameteri( GLenum target, GLenum pname, GLint param); +void glTexParameterfv( GLenum target, GLenum pname, const GLfloat * params); +void glTexParameteriv( GLenum target, GLenum pname, const GLint * params); +void glTexParameterIiv( GLenum target, GLenum pname, const GLint * params); +void glTexParameterIuiv( GLenum target, GLenum pname, const GLuint * params); +void glTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void * pixels); +void glTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels); +void glTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels); +void glTransformFeedbackVaryings( GLuint program, GLsizei count, const char **varyings, GLenum bufferMode); diff --git a/src/opengl/bind/t.bind b/src/opengl/bind/t.bind new file mode 100644 index 0000000..1a447e7 --- /dev/null +++ b/src/opengl/bind/t.bind @@ -0,0 +1,204 @@ +int glTexBuffer_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum internalformat = luaL_checkinteger(L, 2); + GLuint buffer = luaL_checkinteger(L, 3); + glTexBuffer(target, internalformat, buffer); + return 0; +} + + +int glTexImage1D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLint internalformat = luaL_checkinteger(L, 3); + GLsizei width = luaL_checkinteger(L, 4); + GLint border = luaL_checkinteger(L, 5); + GLenum format = luaL_checkinteger(L, 6); + GLenum type = luaL_checkinteger(L, 7); + const void * data = get: const void * + glTexImage1D(target, level, internalformat, width, border, format, type, data); + return 0; +} + + +int glTexImage2D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLint internalformat = luaL_checkinteger(L, 3); + GLsizei width = luaL_checkinteger(L, 4); + GLsizei height = luaL_checkinteger(L, 5); + GLint border = luaL_checkinteger(L, 6); + GLenum format = luaL_checkinteger(L, 7); + GLenum type = luaL_checkinteger(L, 8); + const void * data = get: const void * + glTexImage2D(target, level, internalformat, width, height, border, format, type, data); + return 0; +} + + +int glTexImage2DMultisample_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLsizei samples = luaL_checkinteger(L, 2); + GLenum internalformat = luaL_checkinteger(L, 3); + GLsizei width = luaL_checkinteger(L, 4); + GLsizei height = luaL_checkinteger(L, 5); + GLboolean fixedsamplelocations = get: GLboolean + glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); + return 0; +} + + +int glTexImage3D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLint internalformat = luaL_checkinteger(L, 3); + GLsizei width = luaL_checkinteger(L, 4); + GLsizei height = luaL_checkinteger(L, 5); + GLsizei depth = luaL_checkinteger(L, 6); + GLint border = luaL_checkinteger(L, 7); + GLenum format = luaL_checkinteger(L, 8); + GLenum type = luaL_checkinteger(L, 9); + const void * data = get: const void * + glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, data); + return 0; +} + + +int glTexImage3DMultisample_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLsizei samples = luaL_checkinteger(L, 2); + GLenum internalformat = luaL_checkinteger(L, 3); + GLsizei width = luaL_checkinteger(L, 4); + GLsizei height = luaL_checkinteger(L, 5); + GLsizei depth = luaL_checkinteger(L, 6); + GLboolean fixedsamplelocations = get: GLboolean + glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); + return 0; +} + + +int glTexParameterf_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLfloat param = luaL_checknumber(L, 3); + glTexParameterf(target, pname, param); + return 0; +} + + +int glTexParameteri_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + GLint param = luaL_checkinteger(L, 3); + glTexParameteri(target, pname, param); + return 0; +} + + +int glTexParameterfv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + const GLfloat * params = get: const GLfloat * + glTexParameterfv(target, pname, params); + return 0; +} + + +int glTexParameteriv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + const GLint * params = get: const GLint * + glTexParameteriv(target, pname, params); + return 0; +} + + +int glTexParameterIiv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + const GLint * params = get: const GLint * + glTexParameterIiv(target, pname, params); + return 0; +} + + +int glTexParameterIuiv_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLenum pname = luaL_checkinteger(L, 2); + const GLuint * params = get: const GLuint * + glTexParameterIuiv(target, pname, params); + return 0; +} + + +int glTexSubImage1D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLint xoffset = luaL_checkinteger(L, 3); + GLsizei width = luaL_checkinteger(L, 4); + GLenum format = luaL_checkinteger(L, 5); + GLenum type = luaL_checkinteger(L, 6); + const void * pixels = get: const void * + glTexSubImage1D(target, level, xoffset, width, format, type, pixels); + return 0; +} + + +int glTexSubImage2D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLint xoffset = luaL_checkinteger(L, 3); + GLint yoffset = luaL_checkinteger(L, 4); + GLsizei width = luaL_checkinteger(L, 5); + GLsizei height = luaL_checkinteger(L, 6); + GLenum format = luaL_checkinteger(L, 7); + GLenum type = luaL_checkinteger(L, 8); + const void * pixels = get: const void * + glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + return 0; +} + + +int glTexSubImage3D_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLint level = luaL_checkinteger(L, 2); + GLint xoffset = luaL_checkinteger(L, 3); + GLint yoffset = luaL_checkinteger(L, 4); + GLint zoffset = luaL_checkinteger(L, 5); + GLsizei width = luaL_checkinteger(L, 6); + GLsizei height = luaL_checkinteger(L, 7); + GLsizei depth = luaL_checkinteger(L, 8); + GLenum format = luaL_checkinteger(L, 9); + GLenum type = luaL_checkinteger(L, 10); + const void * pixels = get: const void * + glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + return 0; +} + + +int glTransformFeedbackVaryings_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const char ** varyings = get: const char ** + GLenum bufferMode = luaL_checkinteger(L, 4); + glTransformFeedbackVaryings(program, count, varyings, bufferMode); + return 0; +} + + diff --git a/src/opengl/bind/u b/src/opengl/bind/u new file mode 100644 index 0000000..7cd3e42 --- /dev/null +++ b/src/opengl/bind/u @@ -0,0 +1,37 @@ +void glUniform1f( GLint location, GLfloat v0); +void glUniform2f( GLint location, GLfloat v0, GLfloat v1); +void glUniform3f( GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +void glUniform4f( GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +void glUniform1i( GLint location, GLint v0); +void glUniform2i( GLint location, GLint v0, GLint v1); +void glUniform3i( GLint location, GLint v0, GLint v1, GLint v2); +void glUniform4i( GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +void glUniform1ui( GLint location, GLuint v0); +void glUniform2ui( GLint location, GLuint v0, GLuint v1); +void glUniform3ui( GLint location, GLuint v0, GLuint v1, GLuint v2); +void glUniform4ui( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +void glUniform1fv( GLint location, GLsizei count, const GLfloat *value); +void glUniform2fv( GLint location, GLsizei count, const GLfloat *value); +void glUniform3fv( GLint location, GLsizei count, const GLfloat *value); +void glUniform4fv( GLint location, GLsizei count, const GLfloat *value); +void glUniform1iv( GLint location, GLsizei count, const GLint *value); +void glUniform2iv( GLint location, GLsizei count, const GLint *value); +void glUniform3iv( GLint location, GLsizei count, const GLint *value); +void glUniform4iv( GLint location, GLsizei count, const GLint *value); +void glUniform1uiv( GLint location, GLsizei count, const GLuint *value); +void glUniform2uiv( GLint location, GLsizei count, const GLuint *value); +void glUniform3uiv( GLint location, GLsizei count, const GLuint *value); +void glUniform4uiv( GLint location, GLsizei count, const GLuint *value); +void glUniformMatrix2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix2x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix3x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix2x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix4x2fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix3x4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformMatrix4x3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +void glUniformSubroutinesuiv( GLenum shadertype, GLsizei count, const GLuint *indices); +GLboolean glUnmapBuffer( GLenum target); +void glUseProgram( GLuint program); +void glUseProgramStages( GLuint pipeline, GLbitfield stages, GLuint program); diff --git a/src/opengl/bind/u.bind b/src/opengl/bind/u.bind new file mode 100644 index 0000000..07785a8 --- /dev/null +++ b/src/opengl/bind/u.bind @@ -0,0 +1,382 @@ +int glUniform1f_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLfloat v0 = luaL_checknumber(L, 2); + glUniform1f(location, v0); + return 0; +} + + +int glUniform2f_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLfloat v0 = luaL_checknumber(L, 2); + GLfloat v1 = luaL_checknumber(L, 3); + glUniform2f(location, v0, v1); + return 0; +} + + +int glUniform3f_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLfloat v0 = luaL_checknumber(L, 2); + GLfloat v1 = luaL_checknumber(L, 3); + GLfloat v2 = luaL_checknumber(L, 4); + glUniform3f(location, v0, v1, v2); + return 0; +} + + +int glUniform4f_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLfloat v0 = luaL_checknumber(L, 2); + GLfloat v1 = luaL_checknumber(L, 3); + GLfloat v2 = luaL_checknumber(L, 4); + GLfloat v3 = luaL_checknumber(L, 5); + glUniform4f(location, v0, v1, v2, v3); + return 0; +} + + +int glUniform1i_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLint v0 = luaL_checkinteger(L, 2); + glUniform1i(location, v0); + return 0; +} + + +int glUniform2i_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLint v0 = luaL_checkinteger(L, 2); + GLint v1 = luaL_checkinteger(L, 3); + glUniform2i(location, v0, v1); + return 0; +} + + +int glUniform3i_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLint v0 = luaL_checkinteger(L, 2); + GLint v1 = luaL_checkinteger(L, 3); + GLint v2 = luaL_checkinteger(L, 4); + glUniform3i(location, v0, v1, v2); + return 0; +} + + +int glUniform4i_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLint v0 = luaL_checkinteger(L, 2); + GLint v1 = luaL_checkinteger(L, 3); + GLint v2 = luaL_checkinteger(L, 4); + GLint v3 = luaL_checkinteger(L, 5); + glUniform4i(location, v0, v1, v2, v3); + return 0; +} + + +int glUniform1ui_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLuint v0 = luaL_checkinteger(L, 2); + glUniform1ui(location, v0); + return 0; +} + + +int glUniform2ui_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLuint v0 = luaL_checkinteger(L, 2); + GLuint v1 = luaL_checkinteger(L, 3); + glUniform2ui(location, v0, v1); + return 0; +} + + +int glUniform3ui_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLuint v0 = luaL_checkinteger(L, 2); + GLuint v1 = luaL_checkinteger(L, 3); + GLuint v2 = luaL_checkinteger(L, 4); + glUniform3ui(location, v0, v1, v2); + return 0; +} + + +int glUniform4ui_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLuint v0 = luaL_checkinteger(L, 2); + GLuint v1 = luaL_checkinteger(L, 3); + GLuint v2 = luaL_checkinteger(L, 4); + GLuint v3 = luaL_checkinteger(L, 5); + glUniform4ui(location, v0, v1, v2, v3); + return 0; +} + + +int glUniform1fv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLfloat * value = get: const GLfloat * + glUniform1fv(location, count, value); + return 0; +} + + +int glUniform2fv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLfloat * value = get: const GLfloat * + glUniform2fv(location, count, value); + return 0; +} + + +int glUniform3fv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLfloat * value = get: const GLfloat * + glUniform3fv(location, count, value); + return 0; +} + + +int glUniform4fv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLfloat * value = get: const GLfloat * + glUniform4fv(location, count, value); + return 0; +} + + +int glUniform1iv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLint * value = get: const GLint * + glUniform1iv(location, count, value); + return 0; +} + + +int glUniform2iv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLint * value = get: const GLint * + glUniform2iv(location, count, value); + return 0; +} + + +int glUniform3iv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLint * value = get: const GLint * + glUniform3iv(location, count, value); + return 0; +} + + +int glUniform4iv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLint * value = get: const GLint * + glUniform4iv(location, count, value); + return 0; +} + + +int glUniform1uiv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLuint * value = get: const GLuint * + glUniform1uiv(location, count, value); + return 0; +} + + +int glUniform2uiv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLuint * value = get: const GLuint * + glUniform2uiv(location, count, value); + return 0; +} + + +int glUniform3uiv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLuint * value = get: const GLuint * + glUniform3uiv(location, count, value); + return 0; +} + + +int glUniform4uiv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLuint * value = get: const GLuint * + glUniform4uiv(location, count, value); + return 0; +} + + +int glUniformMatrix2fv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glUniformMatrix2fv(location, count, transpose, value); + return 0; +} + + +int glUniformMatrix3fv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glUniformMatrix3fv(location, count, transpose, value); + return 0; +} + + +int glUniformMatrix4fv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glUniformMatrix4fv(location, count, transpose, value); + return 0; +} + + +int glUniformMatrix2x3fv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glUniformMatrix2x3fv(location, count, transpose, value); + return 0; +} + + +int glUniformMatrix3x2fv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glUniformMatrix3x2fv(location, count, transpose, value); + return 0; +} + + +int glUniformMatrix2x4fv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glUniformMatrix2x4fv(location, count, transpose, value); + return 0; +} + + +int glUniformMatrix4x2fv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glUniformMatrix4x2fv(location, count, transpose, value); + return 0; +} + + +int glUniformMatrix3x4fv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glUniformMatrix3x4fv(location, count, transpose, value); + return 0; +} + + +int glUniformMatrix4x3fv_bind(lua_State *L) +{ + GLint location = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + GLboolean transpose = get: GLboolean + const GLfloat * value = get: const GLfloat * + glUniformMatrix4x3fv(location, count, transpose, value); + return 0; +} + + +int glUniformSubroutinesuiv_bind(lua_State *L) +{ + GLenum shadertype = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLuint * indices = get: const GLuint * + glUniformSubroutinesuiv(shadertype, count, indices); + return 0; +} + + +int glUnmapBuffer_bind(lua_State *L) +{ + GLenum target = luaL_checkinteger(L, 1); + GLboolean bind_result = glUnmapBuffer(target); + /* push result */ + return /* count */; +} + + +int glUseProgram_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + glUseProgram(program); + return 0; +} + + +int glUseProgramStages_bind(lua_State *L) +{ + GLuint pipeline = luaL_checkinteger(L, 1); + GLbitfield stages = luaL_checkinteger(L, 2); + GLuint program = luaL_checkinteger(L, 3); + glUseProgramStages(pipeline, stages, program); + return 0; +} + + diff --git a/src/opengl/bind/v b/src/opengl/bind/v new file mode 100644 index 0000000..d6bb3aa --- /dev/null +++ b/src/opengl/bind/v @@ -0,0 +1,76 @@ +void glValidateProgram( GLuint program); +void glValidateProgramPipeline( GLuint pipeline); +void glVertexAttrib1f( GLuint index, GLfloat v0); +void glVertexAttrib1s( GLuint index, GLshort v0); +void glVertexAttrib1d( GLuint index, GLdouble v0); +void glVertexAttribI1i( GLuint index, GLint v0); +void glVertexAttribI1ui( GLuint index, GLuint v0); +void glVertexAttrib2f( GLuint index, GLfloat v0, GLfloat v1); +void glVertexAttrib2s( GLuint index, GLshort v0, GLshort v1); +void glVertexAttrib2d( GLuint index, GLdouble v0, GLdouble v1); +void glVertexAttribI2i( GLuint index, GLint v0, GLint v1); +void glVertexAttribI2ui( GLuint index, GLuint v0, GLuint v1); +void glVertexAttrib3f( GLuint index, GLfloat v0, GLfloat v1, GLfloat v2); +void glVertexAttrib3s( GLuint index, GLshort v0, GLshort v1, GLshort v2); +void glVertexAttrib3d( GLuint index, GLdouble v0, GLdouble v1, GLdouble v2); +void glVertexAttribI3i( GLuint index, GLint v0, GLint v1, GLint v2); +void glVertexAttribI3ui( GLuint index, GLuint v0, GLuint v1, GLuint v2); +void glVertexAttrib4f( GLuint index, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +void glVertexAttrib4s( GLuint index, GLshort v0, GLshort v1, GLshort v2, GLshort v3); +void glVertexAttrib4d( GLuint index, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +void glVertexAttrib4Nub( GLuint index, GLubyte v0, GLubyte v1, GLubyte v2, GLubyte v3); +void glVertexAttribI4i( GLuint index, GLint v0, GLint v1, GLint v2, GLint v3); +void glVertexAttribI4ui( GLuint index, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +void glVertexAttribL1d( GLuint index, GLdouble v0); +void glVertexAttribL2d( GLuint index, GLdouble v0, GLdouble v1); +void glVertexAttribL3d( GLuint index, GLdouble v0, GLdouble v1, GLdouble v2); +void glVertexAttribL4d( GLuint index, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +void glVertexAttrib1fv( GLuint index, const GLfloat *v); +void glVertexAttrib1sv( GLuint index, const GLshort *v); +void glVertexAttrib1dv( GLuint index, const GLdouble *v); +void glVertexAttribI1iv( GLuint index, const GLint *v); +void glVertexAttribI1uiv( GLuint index, const GLuint *v); +void glVertexAttrib2fv( GLuint index, const GLfloat *v); +void glVertexAttrib2sv( GLuint index, const GLshort *v); +void glVertexAttrib2dv( GLuint index, const GLdouble *v); +void glVertexAttribI2iv( GLuint index, const GLint *v); +void glVertexAttribI2uiv( GLuint index, const GLuint *v); +void glVertexAttrib3fv( GLuint index, const GLfloat *v); +void glVertexAttrib3sv( GLuint index, const GLshort *v); +void glVertexAttrib3dv( GLuint index, const GLdouble *v); +void glVertexAttribI3iv( GLuint index, const GLint *v); +void glVertexAttribI3uiv( GLuint index, const GLuint *v); +void glVertexAttrib4fv( GLuint index, const GLfloat *v); +void glVertexAttrib4sv( GLuint index, const GLshort *v); +void glVertexAttrib4dv( GLuint index, const GLdouble *v); +void glVertexAttrib4iv( GLuint index, const GLint *v); +void glVertexAttrib4bv( GLuint index, const GLbyte *v); +void glVertexAttrib4ubv( GLuint index, const GLubyte *v); +void glVertexAttrib4usv( GLuint index, const GLushort *v); +void glVertexAttrib4uiv( GLuint index, const GLuint *v); +void glVertexAttrib4Nbv( GLuint index, const GLbyte *v); +void glVertexAttrib4Nsv( GLuint index, const GLshort *v); +void glVertexAttrib4Niv( GLuint index, const GLint *v); +void glVertexAttrib4Nubv( GLuint index, const GLubyte *v); +void glVertexAttrib4Nusv( GLuint index, const GLushort *v); +void glVertexAttrib4Nuiv( GLuint index, const GLuint *v); +void glVertexAttribI4bv( GLuint index, const GLbyte *v); +void glVertexAttribI4ubv( GLuint index, const GLubyte *v); +void glVertexAttribI4sv( GLuint index, const GLshort *v); +void glVertexAttribI4usv( GLuint index, const GLushort *v); +void glVertexAttribI4iv( GLuint index, const GLint *v); +void glVertexAttribI4uiv( GLuint index, const GLuint *v); +void glVertexAttribL1dv( GLuint index, const GLdouble *v); +void glVertexAttribL2dv( GLuint index, const GLdouble *v); +void glVertexAttribL3dv( GLuint index, const GLdouble *v); +void glVertexAttribL4dv( GLuint index, const GLdouble *v); +void glVertexAttribP1ui( GLuint index, GLenum type, GLboolean normalized, GLuint value); +void glVertexAttribP2ui( GLuint index, GLenum type, GLboolean normalized, GLuint value); +void glVertexAttribP3ui( GLuint index, GLenum type, GLboolean normalized, GLuint value); +void glVertexAttribP4ui( GLuint index, GLenum type, GLboolean normalized, GLuint value); +void glVertexAttribPointer( GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer); +void glVertexAttribIPointer( GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer); +void glViewport( GLint x, GLint y, GLsizei width, GLsizei height); +void glViewportArrayv( GLuint first, GLsizei count, const GLfloat *v); +void glViewportIndexedf( GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +void glViewportIndexedfv( GLuint index, const GLfloat *v); diff --git a/src/opengl/bind/v.bind b/src/opengl/bind/v.bind new file mode 100644 index 0000000..ec35e3f --- /dev/null +++ b/src/opengl/bind/v.bind @@ -0,0 +1,742 @@ +int glValidateProgram_bind(lua_State *L) +{ + GLuint program = luaL_checkinteger(L, 1); + glValidateProgram(program); + return 0; +} + + +int glValidateProgramPipeline_bind(lua_State *L) +{ + GLuint pipeline = luaL_checkinteger(L, 1); + glValidateProgramPipeline(pipeline); + return 0; +} + + +int glVertexAttrib1f_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLfloat v0 = luaL_checknumber(L, 2); + glVertexAttrib1f(index, v0); + return 0; +} + + +int glVertexAttrib1s_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLshort v0 = luaL_checkinteger(L, 2); + glVertexAttrib1s(index, v0); + return 0; +} + + +int glVertexAttrib1d_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLdouble v0 = luaL_checknumber(L, 2); + glVertexAttrib1d(index, v0); + return 0; +} + + +int glVertexAttribI1i_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLint v0 = luaL_checkinteger(L, 2); + glVertexAttribI1i(index, v0); + return 0; +} + + +int glVertexAttribI1ui_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLuint v0 = luaL_checkinteger(L, 2); + glVertexAttribI1ui(index, v0); + return 0; +} + + +int glVertexAttrib2f_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLfloat v0 = luaL_checknumber(L, 2); + GLfloat v1 = luaL_checknumber(L, 3); + glVertexAttrib2f(index, v0, v1); + return 0; +} + + +int glVertexAttrib2s_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLshort v0 = luaL_checkinteger(L, 2); + GLshort v1 = luaL_checkinteger(L, 3); + glVertexAttrib2s(index, v0, v1); + return 0; +} + + +int glVertexAttrib2d_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLdouble v0 = luaL_checknumber(L, 2); + GLdouble v1 = luaL_checknumber(L, 3); + glVertexAttrib2d(index, v0, v1); + return 0; +} + + +int glVertexAttribI2i_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLint v0 = luaL_checkinteger(L, 2); + GLint v1 = luaL_checkinteger(L, 3); + glVertexAttribI2i(index, v0, v1); + return 0; +} + + +int glVertexAttribI2ui_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLuint v0 = luaL_checkinteger(L, 2); + GLuint v1 = luaL_checkinteger(L, 3); + glVertexAttribI2ui(index, v0, v1); + return 0; +} + + +int glVertexAttrib3f_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLfloat v0 = luaL_checknumber(L, 2); + GLfloat v1 = luaL_checknumber(L, 3); + GLfloat v2 = luaL_checknumber(L, 4); + glVertexAttrib3f(index, v0, v1, v2); + return 0; +} + + +int glVertexAttrib3s_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLshort v0 = luaL_checkinteger(L, 2); + GLshort v1 = luaL_checkinteger(L, 3); + GLshort v2 = luaL_checkinteger(L, 4); + glVertexAttrib3s(index, v0, v1, v2); + return 0; +} + + +int glVertexAttrib3d_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLdouble v0 = luaL_checknumber(L, 2); + GLdouble v1 = luaL_checknumber(L, 3); + GLdouble v2 = luaL_checknumber(L, 4); + glVertexAttrib3d(index, v0, v1, v2); + return 0; +} + + +int glVertexAttribI3i_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLint v0 = luaL_checkinteger(L, 2); + GLint v1 = luaL_checkinteger(L, 3); + GLint v2 = luaL_checkinteger(L, 4); + glVertexAttribI3i(index, v0, v1, v2); + return 0; +} + + +int glVertexAttribI3ui_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLuint v0 = luaL_checkinteger(L, 2); + GLuint v1 = luaL_checkinteger(L, 3); + GLuint v2 = luaL_checkinteger(L, 4); + glVertexAttribI3ui(index, v0, v1, v2); + return 0; +} + + +int glVertexAttrib4f_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLfloat v0 = luaL_checknumber(L, 2); + GLfloat v1 = luaL_checknumber(L, 3); + GLfloat v2 = luaL_checknumber(L, 4); + GLfloat v3 = luaL_checknumber(L, 5); + glVertexAttrib4f(index, v0, v1, v2, v3); + return 0; +} + + +int glVertexAttrib4s_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLshort v0 = luaL_checkinteger(L, 2); + GLshort v1 = luaL_checkinteger(L, 3); + GLshort v2 = luaL_checkinteger(L, 4); + GLshort v3 = luaL_checkinteger(L, 5); + glVertexAttrib4s(index, v0, v1, v2, v3); + return 0; +} + + +int glVertexAttrib4d_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLdouble v0 = luaL_checknumber(L, 2); + GLdouble v1 = luaL_checknumber(L, 3); + GLdouble v2 = luaL_checknumber(L, 4); + GLdouble v3 = luaL_checknumber(L, 5); + glVertexAttrib4d(index, v0, v1, v2, v3); + return 0; +} + + +int glVertexAttrib4Nub_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLubyte v0 = luaL_checkinteger(L, 2); + GLubyte v1 = luaL_checkinteger(L, 3); + GLubyte v2 = luaL_checkinteger(L, 4); + GLubyte v3 = luaL_checkinteger(L, 5); + glVertexAttrib4Nub(index, v0, v1, v2, v3); + return 0; +} + + +int glVertexAttribI4i_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLint v0 = luaL_checkinteger(L, 2); + GLint v1 = luaL_checkinteger(L, 3); + GLint v2 = luaL_checkinteger(L, 4); + GLint v3 = luaL_checkinteger(L, 5); + glVertexAttribI4i(index, v0, v1, v2, v3); + return 0; +} + + +int glVertexAttribI4ui_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLuint v0 = luaL_checkinteger(L, 2); + GLuint v1 = luaL_checkinteger(L, 3); + GLuint v2 = luaL_checkinteger(L, 4); + GLuint v3 = luaL_checkinteger(L, 5); + glVertexAttribI4ui(index, v0, v1, v2, v3); + return 0; +} + + +int glVertexAttribL1d_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLdouble v0 = luaL_checknumber(L, 2); + glVertexAttribL1d(index, v0); + return 0; +} + + +int glVertexAttribL2d_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLdouble v0 = luaL_checknumber(L, 2); + GLdouble v1 = luaL_checknumber(L, 3); + glVertexAttribL2d(index, v0, v1); + return 0; +} + + +int glVertexAttribL3d_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLdouble v0 = luaL_checknumber(L, 2); + GLdouble v1 = luaL_checknumber(L, 3); + GLdouble v2 = luaL_checknumber(L, 4); + glVertexAttribL3d(index, v0, v1, v2); + return 0; +} + + +int glVertexAttribL4d_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLdouble v0 = luaL_checknumber(L, 2); + GLdouble v1 = luaL_checknumber(L, 3); + GLdouble v2 = luaL_checknumber(L, 4); + GLdouble v3 = luaL_checknumber(L, 5); + glVertexAttribL4d(index, v0, v1, v2, v3); + return 0; +} + + +int glVertexAttrib1fv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLfloat * v = get: const GLfloat * + glVertexAttrib1fv(index, v); + return 0; +} + + +int glVertexAttrib1sv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLshort * v = get: const GLshort * + glVertexAttrib1sv(index, v); + return 0; +} + + +int glVertexAttrib1dv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLdouble * v = get: const GLdouble * + glVertexAttrib1dv(index, v); + return 0; +} + + +int glVertexAttribI1iv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLint * v = get: const GLint * + glVertexAttribI1iv(index, v); + return 0; +} + + +int glVertexAttribI1uiv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLuint * v = get: const GLuint * + glVertexAttribI1uiv(index, v); + return 0; +} + + +int glVertexAttrib2fv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLfloat * v = get: const GLfloat * + glVertexAttrib2fv(index, v); + return 0; +} + + +int glVertexAttrib2sv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLshort * v = get: const GLshort * + glVertexAttrib2sv(index, v); + return 0; +} + + +int glVertexAttrib2dv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLdouble * v = get: const GLdouble * + glVertexAttrib2dv(index, v); + return 0; +} + + +int glVertexAttribI2iv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLint * v = get: const GLint * + glVertexAttribI2iv(index, v); + return 0; +} + + +int glVertexAttribI2uiv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLuint * v = get: const GLuint * + glVertexAttribI2uiv(index, v); + return 0; +} + + +int glVertexAttrib3fv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLfloat * v = get: const GLfloat * + glVertexAttrib3fv(index, v); + return 0; +} + + +int glVertexAttrib3sv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLshort * v = get: const GLshort * + glVertexAttrib3sv(index, v); + return 0; +} + + +int glVertexAttrib3dv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLdouble * v = get: const GLdouble * + glVertexAttrib3dv(index, v); + return 0; +} + + +int glVertexAttribI3iv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLint * v = get: const GLint * + glVertexAttribI3iv(index, v); + return 0; +} + + +int glVertexAttribI3uiv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLuint * v = get: const GLuint * + glVertexAttribI3uiv(index, v); + return 0; +} + + +int glVertexAttrib4fv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLfloat * v = get: const GLfloat * + glVertexAttrib4fv(index, v); + return 0; +} + + +int glVertexAttrib4sv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLshort * v = get: const GLshort * + glVertexAttrib4sv(index, v); + return 0; +} + + +int glVertexAttrib4dv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLdouble * v = get: const GLdouble * + glVertexAttrib4dv(index, v); + return 0; +} + + +int glVertexAttrib4iv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLint * v = get: const GLint * + glVertexAttrib4iv(index, v); + return 0; +} + + +int glVertexAttrib4bv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLbyte * v = get: const GLbyte * + glVertexAttrib4bv(index, v); + return 0; +} + + +int glVertexAttrib4ubv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLubyte * v = get: const GLubyte * + glVertexAttrib4ubv(index, v); + return 0; +} + + +int glVertexAttrib4usv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLushort * v = get: const GLushort * + glVertexAttrib4usv(index, v); + return 0; +} + + +int glVertexAttrib4uiv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLuint * v = get: const GLuint * + glVertexAttrib4uiv(index, v); + return 0; +} + + +int glVertexAttrib4Nbv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLbyte * v = get: const GLbyte * + glVertexAttrib4Nbv(index, v); + return 0; +} + + +int glVertexAttrib4Nsv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLshort * v = get: const GLshort * + glVertexAttrib4Nsv(index, v); + return 0; +} + + +int glVertexAttrib4Niv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLint * v = get: const GLint * + glVertexAttrib4Niv(index, v); + return 0; +} + + +int glVertexAttrib4Nubv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLubyte * v = get: const GLubyte * + glVertexAttrib4Nubv(index, v); + return 0; +} + + +int glVertexAttrib4Nusv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLushort * v = get: const GLushort * + glVertexAttrib4Nusv(index, v); + return 0; +} + + +int glVertexAttrib4Nuiv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLuint * v = get: const GLuint * + glVertexAttrib4Nuiv(index, v); + return 0; +} + + +int glVertexAttribI4bv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLbyte * v = get: const GLbyte * + glVertexAttribI4bv(index, v); + return 0; +} + + +int glVertexAttribI4ubv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLubyte * v = get: const GLubyte * + glVertexAttribI4ubv(index, v); + return 0; +} + + +int glVertexAttribI4sv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLshort * v = get: const GLshort * + glVertexAttribI4sv(index, v); + return 0; +} + + +int glVertexAttribI4usv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLushort * v = get: const GLushort * + glVertexAttribI4usv(index, v); + return 0; +} + + +int glVertexAttribI4iv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLint * v = get: const GLint * + glVertexAttribI4iv(index, v); + return 0; +} + + +int glVertexAttribI4uiv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLuint * v = get: const GLuint * + glVertexAttribI4uiv(index, v); + return 0; +} + + +int glVertexAttribL1dv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLdouble * v = get: const GLdouble * + glVertexAttribL1dv(index, v); + return 0; +} + + +int glVertexAttribL2dv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLdouble * v = get: const GLdouble * + glVertexAttribL2dv(index, v); + return 0; +} + + +int glVertexAttribL3dv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLdouble * v = get: const GLdouble * + glVertexAttribL3dv(index, v); + return 0; +} + + +int glVertexAttribL4dv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLdouble * v = get: const GLdouble * + glVertexAttribL4dv(index, v); + return 0; +} + + +int glVertexAttribP1ui_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLenum type = luaL_checkinteger(L, 2); + GLboolean normalized = get: GLboolean + GLuint value = luaL_checkinteger(L, 4); + glVertexAttribP1ui(index, type, normalized, value); + return 0; +} + + +int glVertexAttribP2ui_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLenum type = luaL_checkinteger(L, 2); + GLboolean normalized = get: GLboolean + GLuint value = luaL_checkinteger(L, 4); + glVertexAttribP2ui(index, type, normalized, value); + return 0; +} + + +int glVertexAttribP3ui_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLenum type = luaL_checkinteger(L, 2); + GLboolean normalized = get: GLboolean + GLuint value = luaL_checkinteger(L, 4); + glVertexAttribP3ui(index, type, normalized, value); + return 0; +} + + +int glVertexAttribP4ui_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLenum type = luaL_checkinteger(L, 2); + GLboolean normalized = get: GLboolean + GLuint value = luaL_checkinteger(L, 4); + glVertexAttribP4ui(index, type, normalized, value); + return 0; +} + + +int glVertexAttribPointer_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLint size = luaL_checkinteger(L, 2); + GLenum type = luaL_checkinteger(L, 3); + GLboolean normalized = get: GLboolean + GLsizei stride = luaL_checkinteger(L, 5); + const void * pointer = get: const void * + glVertexAttribPointer(index, size, type, normalized, stride, pointer); + return 0; +} + + +int glVertexAttribIPointer_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLint size = luaL_checkinteger(L, 2); + GLenum type = luaL_checkinteger(L, 3); + GLsizei stride = luaL_checkinteger(L, 4); + const void * pointer = get: const void * + glVertexAttribIPointer(index, size, type, stride, pointer); + return 0; +} + + +int glViewport_bind(lua_State *L) +{ + GLint x = luaL_checkinteger(L, 1); + GLint y = luaL_checkinteger(L, 2); + GLsizei width = luaL_checkinteger(L, 3); + GLsizei height = luaL_checkinteger(L, 4); + glViewport(x, y, width, height); + return 0; +} + + +int glViewportArrayv_bind(lua_State *L) +{ + GLuint first = luaL_checkinteger(L, 1); + GLsizei count = luaL_checkinteger(L, 2); + const GLfloat * v = get: const GLfloat * + glViewportArrayv(first, count, v); + return 0; +} + + +int glViewportIndexedf_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + GLfloat x = luaL_checknumber(L, 2); + GLfloat y = luaL_checknumber(L, 3); + GLfloat w = luaL_checknumber(L, 4); + GLfloat h = luaL_checknumber(L, 5); + glViewportIndexedf(index, x, y, w, h); + return 0; +} + + +int glViewportIndexedfv_bind(lua_State *L) +{ + GLuint index = luaL_checkinteger(L, 1); + const GLfloat * v = get: const GLfloat * + glViewportIndexedfv(index, v); + return 0; +} + + diff --git a/src/opengl/bind/w b/src/opengl/bind/w new file mode 100644 index 0000000..1a75379 --- /dev/null +++ b/src/opengl/bind/w @@ -0,0 +1 @@ +void glWaitSync( GLsync sync, GLbitfield flags, GLuint64 timeout); diff --git a/src/opengl/bind/w.bind b/src/opengl/bind/w.bind new file mode 100644 index 0000000..6f5210c --- /dev/null +++ b/src/opengl/bind/w.bind @@ -0,0 +1,10 @@ +int glWaitSync_bind(lua_State *L) +{ + GLsync sync = luaL_checkinteger(L, 1); + GLbitfield flags = luaL_checkinteger(L, 2); + GLuint64 timeout = luaL_checkinteger(L, 3); + glWaitSync(sync, flags, timeout); + return 0; +} + + diff --git a/src/gl/data.c b/src/opengl/data.c index b7dc581..b7dc581 100644 --- a/src/gl/data.c +++ b/src/opengl/data.c diff --git a/src/gl/data.test.c b/src/opengl/data.test.c index 143b0ce..143b0ce 100644 --- a/src/gl/data.test.c +++ b/src/opengl/data.test.c diff --git a/src/gl/drawing.c b/src/opengl/drawing.c index eeb0496..eeb0496 100644 --- a/src/gl/drawing.c +++ b/src/opengl/drawing.c diff --git a/src/gl/gl.c b/src/opengl/gl.c index b8da1ec..b8da1ec 100644 --- a/src/gl/gl.c +++ b/src/opengl/gl.c diff --git a/src/gl/gl.h b/src/opengl/gl.h index 8aa1ef7..8aa1ef7 100644 --- a/src/gl/gl.h +++ b/src/opengl/gl.h diff --git a/src/gl/gl.test.c b/src/opengl/gl.test.c index 488126f..488126f 100644 --- a/src/gl/gl.test.c +++ b/src/opengl/gl.test.c diff --git a/src/gl/glad/CMakeLists.txt b/src/opengl/glad/CMakeLists.txt index de6a508..de6a508 100644 --- a/src/gl/glad/CMakeLists.txt +++ b/src/opengl/glad/CMakeLists.txt diff --git a/src/gl/glad/include/KHR/khrplatform.h b/src/opengl/glad/include/KHR/khrplatform.h index 0164644..0164644 100644 --- a/src/gl/glad/include/KHR/khrplatform.h +++ b/src/opengl/glad/include/KHR/khrplatform.h diff --git a/src/gl/glad/include/glad/glad.h b/src/opengl/glad/include/glad/glad.h index a5fe03e..a5fe03e 100644 --- a/src/gl/glad/include/glad/glad.h +++ b/src/opengl/glad/include/glad/glad.h diff --git a/src/gl/glad/src/glad.c b/src/opengl/glad/src/glad.c index 2004507..2004507 100644 --- a/src/gl/glad/src/glad.c +++ b/src/opengl/glad/src/glad.c diff --git a/src/gl/notes.md b/src/opengl/notes.md index 3ea0171..3ea0171 100644 --- a/src/gl/notes.md +++ b/src/opengl/notes.md diff --git a/src/opengl/setup.c b/src/opengl/setup.c new file mode 100644 index 0000000..b169660 --- /dev/null +++ b/src/opengl/setup.c @@ -0,0 +1,23 @@ +#include <lua.h> +#include <lauxlib.h> +#include <glad/glad.h> +#include "util/util.h" +#include "bind.h" + + +void setup_gl(lua_State *L, int honey_tbl) +{ + struct honey_tbl_t tbl[] = { + #define X(name, func) H_FUNC(name, func), + GL_FUNCTIONS + #undef X + + #define X(name, value) H_INT(name, value), + GL_ENUM + #undef X + + H_END + }; + create_table(L, tbl); + lua_setfield(L, honey_tbl, "gl"); +} diff --git a/src/gl/shader.c b/src/opengl/shader.c index d78b1ef..d78b1ef 100644 --- a/src/gl/shader.c +++ b/src/opengl/shader.c diff --git a/src/gl/texture.c b/src/opengl/texture.c index 13b23c0..13b23c0 100644 --- a/src/gl/texture.c +++ b/src/opengl/texture.c diff --git a/src/gl/window.c b/src/opengl/window.c index 46bc2f5..46bc2f5 100644 --- a/src/gl/window.c +++ b/src/opengl/window.c diff --git a/src/gl/window.test.c b/src/opengl/window.test.c index 505c876..505c876 100644 --- a/src/gl/window.test.c +++ b/src/opengl/window.test.c |