summaryrefslogtreecommitdiff
path: root/src/opengl/bind/f.bind
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2023-03-10 02:05:18 -0600
committersanine <sanine.not@pm.me>2023-03-10 02:05:18 -0600
commit51c7235d4e0a2df109dd5050328a0ad4a1878ae4 (patch)
tree201b065e93bf6a35d2bab0e49bcd32f7a971da94 /src/opengl/bind/f.bind
parent5bb783912ac384156b8abbe6e83a5a61da73881d (diff)
refactor: move glfw functions into separate table
Diffstat (limited to 'src/opengl/bind/f.bind')
-rw-r--r--src/opengl/bind/f.bind115
1 files changed, 115 insertions, 0 deletions
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;
+}
+
+