summaryrefslogtreecommitdiff
path: root/src/gl
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-09-28 17:42:56 -0500
committersanine <sanine.not@pm.me>2022-09-28 17:42:56 -0500
commit1cf9cc3408af7008451f9133fb95af66a9697d15 (patch)
treeb5c62dade54a67aefbb234ec9a35cfcf6d486120 /src/gl
parent40e4c6890f3f94e360b5e0249ad0045f2133b390 (diff)
add basic cairo demo functions
Diffstat (limited to 'src/gl')
-rw-r--r--src/gl/texture.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gl/texture.c b/src/gl/texture.c
index f9a65b3..002ec95 100644
--- a/src/gl/texture.c
+++ b/src/gl/texture.c
@@ -37,6 +37,10 @@ void setup_texture(lua_State *L, int gl_index)
hs_str_int("TEXTURE_WRAP_T", GL_TEXTURE_WRAP_T),
hs_str_int("TEXTURE_MIN_FILTER", GL_TEXTURE_MIN_FILTER),
hs_str_int("TEXTURE_MAG_FILTER", GL_TEXTURE_MAG_FILTER),
+ hs_str_int("TEXTURE_SWIZZLE_R", GL_TEXTURE_SWIZZLE_R),
+ hs_str_int("TEXTURE_SWIZZLE_G", GL_TEXTURE_SWIZZLE_G),
+ hs_str_int("TEXTURE_SWIZZLE_B", GL_TEXTURE_SWIZZLE_B),
+ hs_str_int("TEXTURE_SWIZZLE_A", GL_TEXTURE_SWIZZLE_A),
/* wrapping types */
hs_str_int("REPEAT", GL_REPEAT),
@@ -44,6 +48,14 @@ void setup_texture(lua_State *L, int gl_index)
/* filter types */
hs_str_int("NEAREST", GL_NEAREST),
hs_str_int("LINEAR", GL_LINEAR),
+
+ /* swizzle targets */
+ hs_str_int("RED", GL_RED),
+ hs_str_int("GREEN", GL_GREEN),
+ hs_str_int("BLUE", GL_BLUE),
+ hs_str_int("ALPHA", GL_ALPHA),
+ hs_str_int("ZERO", GL_ZERO),
+ hs_str_int("ONE", GL_ONE),
);
append_table(L, gl_index, tbl);