summaryrefslogtreecommitdiff
path: root/src/rmath.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rmath.c')
-rw-r--r--src/rmath.c41
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;
}