summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2023-05-17 10:58:21 -0500
committersanine-a <sanine.not@pm.me>2023-05-17 10:58:21 -0500
commitfcfb00c77e4dc160b11095ecd12be2f5f0afdd63 (patch)
tree70c4b3465069c86b809cb1deb78f46044710fc9c
parentbc37d6024572b844e1c55afecb683fcce31491d1 (diff)
add glPointSize and glLineWidth bindsHEADmain
-rw-r--r--src/main.c1
-rw-r--r--src/opengl/drawing.c18
2 files changed, 19 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 357a04f..4fd97e7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -34,6 +34,7 @@ int main(int argc, char **argv)
honey_log(HONEY_FATAL, "[FATAL] could not find directory \"%s\"\n", options.working_dir);
return 1;
}
+ honey_log(HONEY_INFO, "[INFO] switched working directory to %s", options.working_dir);
}
/* set up lua state */
diff --git a/src/opengl/drawing.c b/src/opengl/drawing.c
index e3a2d87..a367178 100644
--- a/src/opengl/drawing.c
+++ b/src/opengl/drawing.c
@@ -16,6 +16,8 @@
X("CullFace", glCullFace_bind) \
X("BlendFunc", glBlendFunc_bind) \
X("PolygonMode", glPolygonMode_bind) \
+ X("LineWidth", glLineWidth_bind) \
+ X("PointSize", glPointSize_bind) \
#define X(name, func) int func(lua_State *L);
@@ -186,3 +188,19 @@ int glPolygonMode_bind(lua_State *L)
glPolygonMode(face, mode);
return 0;
}
+
+
+int glLineWidth_bind(lua_State *L)
+{
+ float width = luaL_checknumber(L, 1);
+ glLineWidth(width);
+ return 0;
+}
+
+
+int glPointSize_bind(lua_State *L)
+{
+ float size = luaL_checknumber(L, 1);
+ glPointSize(size);
+ return 0;
+}