WIP: fix some memaccess-class warnings

This commit is contained in:
nillerusr
2022-11-16 13:28:39 +03:00
parent 8fbc002a37
commit db3062c60b
12 changed files with 78 additions and 35 deletions

View File

@@ -69,7 +69,13 @@ void ComputeProjectionMatrix( VMatrix *pCameraToProjection, const Camera_t &came
float halfHeight = tan( flFOV * M_PI / 360.0 );
float halfWidth = flApsectRatio * halfHeight;
#endif
memset( pCameraToProjection, 0, sizeof( VMatrix ) );
pCameraToProjection->Init(
0.f, 0.f, 0.f, 0.f,
0.f, 0.f, 0.f, 0.f,
0.f, 0.f, 0.f, 0.f,
0.f, 0.f, 0.f, 0.f
);
pCameraToProjection->m[0][0] = 1.0f / halfWidth;
pCameraToProjection->m[1][1] = 1.0f / halfHeight;
pCameraToProjection->m[2][2] = flZFar / ( flZNear - flZFar );