From fcfb00c77e4dc160b11095ecd12be2f5f0afdd63 Mon Sep 17 00:00:00 2001 From: sanine-a Date: Wed, 17 May 2023 10:58:21 -0500 Subject: add glPointSize and glLineWidth binds --- src/opengl/drawing.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/opengl') 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; +} -- cgit v1.2.1