amelioration du frustum

This commit is contained in:
StratiX0
2024-04-03 12:47:02 +02:00
parent 41161f3388
commit 5d54c0ad54
4 changed files with 15 additions and 3 deletions

View File

@@ -51,6 +51,8 @@ bool ApplicationClass::Initialize(int screenWidth, int screenHeight, HWND hwnd)
char fpsString[32];
bool result;
m_screenWidth = screenWidth;
m_screenHeight = screenHeight;
// Create the Direct3D object.
m_Direct3D = new D3DClass;
@@ -725,7 +727,7 @@ bool ApplicationClass::Render(float rotation, float x, float y, float z)
}
// Construct the frustum.
m_Frustum->ConstructFrustum(viewMatrix, projectionMatrix, SCREEN_DEPTH);
m_Frustum->ConstructFrustum(viewMatrix, projectionMatrix, SCREEN_DEPTH, m_screenWidth, m_screenHeight);
// Get the number of models that will be rendered.
modelCount = m_ModelList->GetModelCount();