mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Zero out matrix in perspective function
This commit is contained in:
parent
c97753e805
commit
2245cac4ed
@ -63,6 +63,14 @@ void D3DRMMatrixInvert(D3DRMMATRIX4D out, const D3DRMMATRIX4D m)
|
|||||||
|
|
||||||
void HMM_Perspective_LH_NO(D3DRMMATRIX4D Result, float FOV, float AspectRatio, float Near, float Far)
|
void HMM_Perspective_LH_NO(D3DRMMATRIX4D Result, float FOV, float AspectRatio, float Near, float Far)
|
||||||
{
|
{
|
||||||
|
for (int i = 0; i < 4; i++) {
|
||||||
|
std::fill(
|
||||||
|
Result[i],
|
||||||
|
Result[i]+4,
|
||||||
|
0.f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPerspective.xml
|
// See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPerspective.xml
|
||||||
|
|
||||||
float Cotangent = 1.0f / SDL_tanf(FOV / 2.0f);
|
float Cotangent = 1.0f / SDL_tanf(FOV / 2.0f);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user