Documentation and better cmakelist.
This commit is contained in:
41
src/rmath.c
41
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user