Correction shader + autres choses
This commit is contained in:
@@ -33,7 +33,7 @@ void Engine::Init()
|
||||
|
||||
// Light
|
||||
GLfloat light0Pos[4] = { 0.0f, CHUNK_SIZE_Y, 0.0f, 1.0f };
|
||||
GLfloat light0Amb[4] = { 0.9f, 0.9f, 0.9f, 1.f };
|
||||
GLfloat light0Amb[4] = { 0.2f, 0.2f, 0.2f, 1.f };
|
||||
GLfloat light0Diff[4] = { 1.f, 1.f, 1.f, 1.f };
|
||||
GLfloat light0Spec[4] = { 0.2f, 0.2f, 0.2f, 1.0f };
|
||||
|
||||
@@ -47,7 +47,7 @@ void Engine::Init()
|
||||
m_skybox.Init(0.00013f);
|
||||
|
||||
// Objet de musique!
|
||||
m_music.SetState(true);
|
||||
m_audio.ToggleMusicState();
|
||||
|
||||
// Init testChunk
|
||||
for (int x = 0; x < CHUNK_SIZE_X; ++x) {
|
||||
@@ -106,12 +106,13 @@ void Engine::Render(float elapsedTime)
|
||||
m_player.ApplyTransformation(all);
|
||||
m_player.ApplyTransformation(skybox, false); // Version d'ApplyTransformation qui ne tient compte que de la rotation
|
||||
// (donc l'objet ne bouge pas relativement au joueur, ce qui est pratique pour une skybox!).
|
||||
|
||||
glDisable(GL_LIGHT0);
|
||||
m_skybox.Render(skybox);
|
||||
|
||||
|
||||
// Plancher
|
||||
// Les vertex doivent etre affiches dans le sens anti-horaire (CCW)
|
||||
all.Use();
|
||||
glEnable(GL_LIGHT0);
|
||||
m_shader01.Use();
|
||||
m_textureFloor.Bind();
|
||||
float nbRep = 10.f;
|
||||
@@ -142,7 +143,7 @@ void Engine::Render(float elapsedTime)
|
||||
m_testChunk.Update();
|
||||
|
||||
m_testChunk.Render();
|
||||
//Shader::Disable();
|
||||
m_shader01.Disable();
|
||||
|
||||
}
|
||||
|
||||
@@ -204,7 +205,7 @@ void Engine::KeyReleaseEvent(unsigned char key)
|
||||
{
|
||||
switch (key) {
|
||||
case 12:
|
||||
m_music.SetState(!m_music.GetState());
|
||||
m_audio.ToggleMusicState();
|
||||
break;
|
||||
case 24: // Y
|
||||
m_wireframe = !m_wireframe;
|
||||
|
Reference in New Issue
Block a user