diff options
| author | jussi | 2022-06-19 12:18:09 +0300 |
|---|---|---|
| committer | jussi | 2022-06-19 12:18:09 +0300 |
| commit | 1529202e26a02461708784d8830475261893a537 (patch) | |
| tree | 134f627a4eb131f1daf0b3541fe925b7e5bcc6fb /src/rlgl.c | |
| parent | 7b26e0aa68fb45612083b8e6b5c970564804803d (diff) | |
| download | reilua-enhanced-1529202e26a02461708784d8830475261893a537.tar.gz reilua-enhanced-1529202e26a02461708784d8830475261893a537.tar.bz2 reilua-enhanced-1529202e26a02461708784d8830475261893a537.zip | |
RLGL line width functions.
Diffstat (limited to 'src/rlgl.c')
| -rw-r--r-- | src/rlgl.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/rlgl.c b/src/rlgl.c new file mode 100644 index 0000000..0ca3383 --- /dev/null +++ b/src/rlgl.c @@ -0,0 +1,41 @@ +#include "main.h" +#include "state.h" +#include "lua_core.h" +#include "lrlgl.h" + +/* +## RLGL - General render state +*/ + +/* +> success = RL_rlSetLineWidth( float width ) + +Set the line drawing width + +- Failure return false +- Success return true +*/ +int lrlglSetLineWidth( lua_State *L ) { + if ( !lua_isnumber( L, -1 ) ) { + TraceLog( LOG_WARNING, "%s", "Bad call of function. RL_rlSetLineWidth( float width )" ); + lua_pushboolean( L, false ); + return 1; + } + rlSetLineWidth( lua_tonumber( L, -1 ) ); + lua_pushboolean( L, true ); + + return 1; +} + +/* +> width = RL_rlGetLineWidth() + +Get the line drawing width + +- Success return float +*/ +int lrlglGetLineWidth( lua_State *L ) { + lua_pushnumber( L, rlGetLineWidth() ); + + return 1; +} |
