diff options
| author | jussi | 2022-02-20 20:37:39 +0200 |
|---|---|---|
| committer | jussi | 2022-02-20 20:37:39 +0200 |
| commit | 8182a5f1b6c61bdf95d32a4ad102e1762f0d0924 (patch) | |
| tree | dea5baa7433161c1eb00277ae186b99fee940a1f /src | |
| parent | 6e4fdd3b3ae4e4656e151f098c40cfe551a36e8c (diff) | |
| download | reilua-enhanced-8182a5f1b6c61bdf95d32a4ad102e1762f0d0924.tar.gz reilua-enhanced-8182a5f1b6c61bdf95d32a4ad102e1762f0d0924.tar.bz2 reilua-enhanced-8182a5f1b6c61bdf95d32a4ad102e1762f0d0924.zip | |
Documentation and better cmakelist.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rmath.c | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/src/rmath.c b/src/rmath.c index 7ad9bdb..4027aa8 100644 --- a/src/rmath.c +++ b/src/rmath.c @@ -889,14 +889,15 @@ int lmathMatrixFrustum( lua_State *L ) { lua_pushboolean( L, false ); return 1; } - float far = lua_tonumber( L, -1 ); - float near = lua_tonumber( L, -2 ); - float top = lua_tonumber( L, -3 ); - float bottom = lua_tonumber( L, -4 ); - float right = lua_tonumber( L, -5 ); - float left = lua_tonumber( L, -6 ); + // float far = lua_tonumber( L, -1 ); + // float near = lua_tonumber( L, -2 ); + // float top = lua_tonumber( L, -3 ); + // float bottom = lua_tonumber( L, -4 ); + // float right = lua_tonumber( L, -5 ); + // float left = lua_tonumber( L, -6 ); - uluaPushMatrix( L, MatrixFrustum( left, right, bottom, top, near, far ) ); + // uluaPushMatrix( L, MatrixFrustum( left, right, bottom, top, near, far ) ); + uluaPushMatrix( L, MatrixFrustum( lua_tonumber( L, -6 ), lua_tonumber( L, -5 ), lua_tonumber( L, -4 ), lua_tonumber( L, -3 ), lua_tonumber( L, -2 ), lua_tonumber( L, -1 ) ) ); return 1; } @@ -915,12 +916,13 @@ int lmathMatrixPerspective( lua_State *L ) { lua_pushboolean( L, false ); return 1; } - float far = lua_tonumber( L, -1 ); - float near = lua_tonumber( L, -2 ); - float aspect = lua_tonumber( L, -3 ); - float fovy = lua_tonumber( L, -4 ); + // float far = lua_tonumber( L, -1 ); + // float near = lua_tonumber( L, -2 ); + // float aspect = lua_tonumber( L, -3 ); + // float fovy = lua_tonumber( L, -4 ); - uluaPushMatrix( L, MatrixPerspective( fovy, aspect, near, far ) ); + // uluaPushMatrix( L, MatrixPerspective( fovy, aspect, near, far ) ); + uluaPushMatrix( L, MatrixPerspective( lua_tonumber( L, -4 ), lua_tonumber( L, -3 ), lua_tonumber( L, -2 ), lua_tonumber( L, -1 ) ) ); return 1; } @@ -940,14 +942,15 @@ int lmathMatrixOrtho( lua_State *L ) { lua_pushboolean( L, false ); return 1; } - float far = lua_tonumber( L, -1 ); - float near = lua_tonumber( L, -2 ); - float top = lua_tonumber( L, -3 ); - float bottom = lua_tonumber( L, -4 ); - float right = lua_tonumber( L, -5 ); - float left = lua_tonumber( L, -6 ); + // float far = lua_tonumber( L, -1 ); + // float near = lua_tonumber( L, -2 ); + // float top = lua_tonumber( L, -3 ); + // float bottom = lua_tonumber( L, -4 ); + // float right = lua_tonumber( L, -5 ); + // float left = lua_tonumber( L, -6 ); - uluaPushMatrix( L, MatrixOrtho( left, right, bottom, top, near, far ) ); + // uluaPushMatrix( L, MatrixOrtho( left, right, bottom, top, near, far ) ); + uluaPushMatrix( L, MatrixOrtho( lua_tonumber( L, -6 ), lua_tonumber( L, -5 ), lua_tonumber( L, -4 ), lua_tonumber( L, -3 ), lua_tonumber( L, -2 ), lua_tonumber( L, -1 ) ) ); return 1; } |
