summaryrefslogtreecommitdiff
path: root/src/rlgl.c
diff options
context:
space:
mode:
authorjussi2023-05-15 14:18:58 +0300
committerjussi2023-05-15 14:18:58 +0300
commit870e3a46a6fcdbd5b264406984d232874f138ea3 (patch)
tree3ce5e740a6133634906b2231b135123c54680fa7 /src/rlgl.c
parentb387742850a4d2d6b750f7cdc878ff00d7e4a5fb (diff)
downloadreilua-enhanced-870e3a46a6fcdbd5b264406984d232874f138ea3.tar.gz
reilua-enhanced-870e3a46a6fcdbd5b264406984d232874f138ea3.tar.bz2
reilua-enhanced-870e3a46a6fcdbd5b264406984d232874f138ea3.zip
More rlgl General render state functions. Fixed rlgl function prefix to rl.
Diffstat (limited to 'src/rlgl.c')
-rw-r--r--src/rlgl.c130
1 files changed, 130 insertions, 0 deletions
diff --git a/src/rlgl.c b/src/rlgl.c
index 00e42db..afe2e26 100644
--- a/src/rlgl.c
+++ b/src/rlgl.c
@@ -8,6 +8,114 @@
*/
/*
+> RL.rlEnableColorBlend()
+
+Enable color blending
+*/
+int lrlglEnableColorBlend( lua_State *L ) {
+ rlEnableColorBlend();
+
+ return 0;
+}
+
+/*
+> RL.rlDisableColorBlend()
+
+Disable color blending
+*/
+int lrlglDisableColorBlend( lua_State *L ) {
+ rlDisableColorBlend();
+
+ return 0;
+}
+
+/*
+> RL.rlEnableDepthTest()
+
+Enable depth test
+*/
+int lrlglEnableDepthTest( lua_State *L ) {
+ rlEnableDepthTest();
+
+ return 0;
+}
+
+/*
+> RL.rlDisableDepthTest()
+
+Disable depth test
+*/
+int lrlglDisableDepthTest( lua_State *L ) {
+ rlDisableDepthTest();
+
+ return 0;
+}
+
+/*
+> RL.rlEnableDepthMask()
+
+Enable depth write
+*/
+int lrlglEnableDepthMask( lua_State *L ) {
+ rlEnableDepthMask();
+
+ return 0;
+}
+
+/*
+> RL.rlDisableDepthMask()
+
+Disable depth write
+*/
+int lrlglDisableDepthMask( lua_State *L ) {
+ rlDisableDepthMask();
+
+ return 0;
+}
+
+/*
+> RL.rlEnableBackfaceCulling()
+
+Enable backface culling
+*/
+int lrlglEnableBackfaceCulling( lua_State *L ) {
+ rlEnableBackfaceCulling();
+
+ return 0;
+}
+
+/*
+> RL.rlDisableBackfaceCulling()
+
+Disable backface culling
+*/
+int lrlglDisableBackfaceCulling( lua_State *L ) {
+ rlDisableBackfaceCulling();
+
+ return 0;
+}
+
+/*
+> success = RL.rlSetCullFace( int mode )
+
+Set face culling mode
+
+- Failure return false
+- Success return true
+*/
+int lrlglSetCullFace( lua_State *L ) {
+ if ( !lua_isnumber( L, 1 ) ) {
+ TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlSetCullFace( int mode )" );
+ lua_pushboolean( L, false );
+ return 1;
+ }
+ rlSetCullFace( lua_tointeger( L, 1 ) );
+ lua_pushboolean( L, true );
+
+ return 1;
+}
+
+/*
> success = RL.rlSetLineWidth( float width )
Set the line drawing width
@@ -41,6 +149,28 @@ int lrlglGetLineWidth( lua_State *L ) {
}
/*
+> RL.rlEnableSmoothLines()
+
+Enable line aliasing
+*/
+int lrlglEnableSmoothLines( lua_State *L ) {
+ rlEnableSmoothLines();
+
+ return 0;
+}
+
+/*
+> RL.rlDisableSmoothLines()
+
+Disable line aliasing
+*/
+int lrlglDisableSmoothLines( lua_State *L ) {
+ rlDisableSmoothLines();
+
+ return 0;
+}
+
+/*
## RLGL - Initialization functions
*/