Aled le terrain n'apparait toujours pas
This commit is contained in:
parent
b73f86ff45
commit
e43fb7b0d8
@ -585,7 +585,6 @@ bool ApplicationClass::Render(float rotation, float x, float y, float z)
|
|||||||
|
|
||||||
for (auto cube : m_cubes)
|
for (auto cube : m_cubes)
|
||||||
{
|
{
|
||||||
cube->Render(m_Direct3D->GetDeviceContext());
|
|
||||||
|
|
||||||
scaleMatrix = cube->GetScaleMatrix();
|
scaleMatrix = cube->GetScaleMatrix();
|
||||||
|
|
||||||
@ -601,6 +600,8 @@ bool ApplicationClass::Render(float rotation, float x, float y, float z)
|
|||||||
srMatrix = XMMatrixMultiply(scaleMatrix, rotateMatrix);
|
srMatrix = XMMatrixMultiply(scaleMatrix, rotateMatrix);
|
||||||
worldMatrix = XMMatrixMultiply(srMatrix, translateMatrix);
|
worldMatrix = XMMatrixMultiply(srMatrix, translateMatrix);
|
||||||
|
|
||||||
|
cube->Render(m_Direct3D->GetDeviceContext());
|
||||||
|
|
||||||
result = m_LightShader->Render(m_Direct3D->GetDeviceContext(), m_Model->GetIndexCount(), worldMatrix, viewMatrix, projectionMatrix, m_Model->GetTexture(0),
|
result = m_LightShader->Render(m_Direct3D->GetDeviceContext(), m_Model->GetIndexCount(), worldMatrix, viewMatrix, projectionMatrix, m_Model->GetTexture(0),
|
||||||
diffuseColor, lightPosition);
|
diffuseColor, lightPosition);
|
||||||
if (!result)
|
if (!result)
|
||||||
@ -612,7 +613,6 @@ bool ApplicationClass::Render(float rotation, float x, float y, float z)
|
|||||||
// Render terrain
|
// Render terrain
|
||||||
for (auto chunk : m_terrainChunk)
|
for (auto chunk : m_terrainChunk)
|
||||||
{
|
{
|
||||||
chunk->Render(m_Direct3D->GetDeviceContext());
|
|
||||||
|
|
||||||
scaleMatrix = chunk->GetScaleMatrix();
|
scaleMatrix = chunk->GetScaleMatrix();
|
||||||
rotateMatrix = chunk->GetRotateMatrix();
|
rotateMatrix = chunk->GetRotateMatrix();
|
||||||
@ -621,7 +621,9 @@ bool ApplicationClass::Render(float rotation, float x, float y, float z)
|
|||||||
srMatrix = XMMatrixMultiply(scaleMatrix, rotateMatrix);
|
srMatrix = XMMatrixMultiply(scaleMatrix, rotateMatrix);
|
||||||
worldMatrix = XMMatrixMultiply(srMatrix, translateMatrix);
|
worldMatrix = XMMatrixMultiply(srMatrix, translateMatrix);
|
||||||
|
|
||||||
result = m_LightShader->Render(m_Direct3D->GetDeviceContext(), m_Model->GetIndexCount(), worldMatrix, viewMatrix, projectionMatrix, m_Model->GetTexture(0),
|
chunk->Render(m_Direct3D->GetDeviceContext());
|
||||||
|
|
||||||
|
result = m_LightShader->Render(m_Direct3D->GetDeviceContext(), chunk->GetIndexCount(), worldMatrix, viewMatrix, projectionMatrix, chunk->GetTexture(0),
|
||||||
diffuseColor, lightPosition);
|
diffuseColor, lightPosition);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
@ -689,7 +691,7 @@ void ApplicationClass::GenerateTerrain()
|
|||||||
char modelFilename[128];
|
char modelFilename[128];
|
||||||
|
|
||||||
// check if a chunk file already exists
|
// check if a chunk file already exists
|
||||||
strcpy_s(modelFilename, "chunk.txt");
|
strcpy_s(modelFilename, "plane.txt");
|
||||||
|
|
||||||
// Set the name of the texture file that we will be loading.
|
// Set the name of the texture file that we will be loading.
|
||||||
char textureFilename[128];
|
char textureFilename[128];
|
||||||
|
@ -3,16 +3,14 @@ Pos=60,60
|
|||||||
Size=400,400
|
Size=400,400
|
||||||
|
|
||||||
[Window][Khaotic Engine]
|
[Window][Khaotic Engine]
|
||||||
Pos=14,56
|
Pos=820,136
|
||||||
Size=694,183
|
Size=694,183
|
||||||
|
|
||||||
[Window][Objects]
|
[Window][Objects]
|
||||||
Pos=10,29
|
Pos=10,29
|
||||||
Size=492,353
|
Size=492,353
|
||||||
Collapsed=1
|
|
||||||
|
|
||||||
[Window][Terrain]
|
[Window][Terrain]
|
||||||
Pos=892,20
|
Pos=892,20
|
||||||
Size=418,94
|
Size=418,94
|
||||||
Collapsed=1
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user