diff options
| author | jussi | 2024-10-25 21:19:42 +0300 |
|---|---|---|
| committer | jussi | 2024-10-25 21:19:42 +0300 |
| commit | cddfc09ccc286726736fa436a10919021a177b69 (patch) | |
| tree | ac99e0a221807ee4d1906124f6b1218022d6011f /src/gl.c | |
| parent | ab995f345387b306735ecfbda84dbc019f1053bb (diff) | |
| download | reilua-enhanced-cddfc09ccc286726736fa436a10919021a177b69.tar.gz reilua-enhanced-cddfc09ccc286726736fa436a10919021a177b69.tar.bz2 reilua-enhanced-cddfc09ccc286726736fa436a10919021a177b69.zip | |
glDepthRange and glPolygonOffset.
Diffstat (limited to 'src/gl.c')
| -rw-r--r-- | src/gl.c | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -78,6 +78,20 @@ int lglBlitFramebuffer( lua_State* L ) { */ /* +> RL.glDepthRange( float nearVal, float farVal ) + +Specify mapping of depth values from normalized device coordinates to window coordinates +*/ +int lglDepthRange( lua_State* L ) { + float nearVal = luaL_checknumber( L, 1 ); + float farVal = luaL_checknumber( L, 2 ); + + glDepthRange( nearVal, farVal ); + + return 0; +} + +/* > RL.glEnable( int cap ) Enable server-side GL capabilities @@ -104,6 +118,20 @@ int lglDisable( lua_State* L ) { } /* +> RL.glPolygonOffset( float factor, float units ) + +Set the scale and units used to calculate depth values +*/ +int lglPolygonOffset( lua_State* L ) { + float factor = luaL_checknumber( L, 1 ); + float units = luaL_checknumber( L, 2 ); + + glPolygonOffset( factor, units ); + + return 0; +} + +/* > RL.glStencilFunc( int func, int ref, int mask ) Set front and back function and reference value for stencil testing |
