Retrait d'instances de mc"clone"

This commit is contained in:
Marc-Eric Martel 2021-09-27 11:30:18 -04:00
parent 2324ef071b
commit 7bdc366edd
179 changed files with 75 additions and 63 deletions

View File

@ -1,20 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mcclone", "mcclone\mcclone.vcxproj", "{A21FD938-1FEA-4687-AB86-0EABAC30877B}"
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31702.278
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SQCSim2021", "SQCSim2021\SQCSim2021.vcxproj", "{A21FD938-1FEA-4687-AB86-0EABAC30877B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A21FD938-1FEA-4687-AB86-0EABAC30877B}.Debug|Win32.ActiveCfg = Debug|Win32
{A21FD938-1FEA-4687-AB86-0EABAC30877B}.Debug|Win32.Build.0 = Debug|Win32
{A21FD938-1FEA-4687-AB86-0EABAC30877B}.Release|Win32.ActiveCfg = Release|Win32
{A21FD938-1FEA-4687-AB86-0EABAC30877B}.Release|Win32.Build.0 = Release|Win32
{A21FD938-1FEA-4687-AB86-0EABAC30877B}.Debug|x86.ActiveCfg = Debug|Win32
{A21FD938-1FEA-4687-AB86-0EABAC30877B}.Debug|x86.Build.0 = Debug|Win32
{A21FD938-1FEA-4687-AB86-0EABAC30877B}.Release|x86.ActiveCfg = Release|Win32
{A21FD938-1FEA-4687-AB86-0EABAC30877B}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6A8DAB41-7A0D-46B9-A682-FDA3B2FD0D53}
EndGlobalSection
EndGlobal

View File

@ -2,14 +2,11 @@
#include <algorithm>
#include <cmath>
#include <iostream>
#include "transformation.h"
Engine::Engine()
{
}
Engine::Engine() { }
Engine::~Engine()
{
}
Engine::~Engine() { }
void Engine::Init()
{
@ -41,12 +38,9 @@ void Engine::Init()
HideCursor();
}
void Engine::DeInit()
{
}
void Engine::DeInit() { }
void Engine::LoadResource()
{
void Engine::LoadResource() {
LoadTexture(m_textureFloor, TEXTURE_PATH "floortile.png");
LoadTexture(m_textureSkybox, TEXTURE_PATH "curtains.png");
LoadTexture(m_textureCube, TEXTURE_PATH "kyle.png");
@ -62,6 +56,8 @@ void Engine::Render(float elapsedTime)
gameTime += elapsedTime;
Transformation cube;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// Transformations initiales
@ -71,7 +67,7 @@ void Engine::Render(float elapsedTime)
// Skybox
m_textureSkybox.Bind();
glDepthFunc(GL_ALWAYS);
glDisable(GL_DEPTH_TEST);
glBegin(GL_QUADS);
glTexCoord2f(1, 0);
@ -110,6 +106,7 @@ void Engine::Render(float elapsedTime)
glTexCoord2f(1, 1);
glVertex3f(10.f, -10.f, -10.f);
glEnd();
glEnable(GL_DEPTH_TEST);
// Plancher
// Les vertex doivent etre affiches dans le sens anti-horaire (CCW)
@ -128,64 +125,74 @@ void Engine::Render(float elapsedTime)
glEnd();
// Cube
glTranslatef(0.f, 0.f, -7.f);
cube.ApplyTranslation(0.f, 0.f, -10.f);
cube.ApplyRotation(gameTime * 100.f, 0.f, 1.f, 0.f);
cube.ApplyRotation(gameTime * 100.f, 0.f, 0.f, 1.f);
cube.ApplyRotation(gameTime * 100.f, 1.f, 0.f, 0.f);
cube.Use();
m_textureCube.Bind();
glBegin(GL_QUADS);
glDepthFunc(GL_GREATER);
glTexCoord2f(1, 0);
glVertex3f(1.f, 1.f, -1.f);
glNormal3f(0, 0, 1);
glTexCoord2f(0, 0);
glVertex3f(-1.f, 1.f, -1.f);
glTexCoord2f(0, 1);
glVertex3f(-1.f, 1.f, 1.f);
glVertex3f(-0.5f, -0.5f, -0.5f);
glTexCoord2f(1, 0);
glVertex3f(0.5f, -0.5f, -0.5f);
glTexCoord2f(1, 1);
glVertex3f(1.f, 1.f, 1.f);
glVertex3f(0.5f, 0.5f, -0.5f);
glTexCoord2f(0, 1);
glVertex3f(-0.5f, 0.5f, -0.5f);
glTexCoord2f(1, 0);
glVertex3f(1.f, -1.f, 1.f);
glNormal3f(0, 0, -1);
glTexCoord2f(0, 0);
glVertex3f(-1.f, -1.f, 1.f);
glTexCoord2f(0, 1);
glVertex3f(-1.f, -1.f, -1.f);
glVertex3f(-0.5f, -0.5f, 0.5f);
glTexCoord2f(1, 0);
glVertex3f(0.5f, -0.5f, 0.5f);
glTexCoord2f(1, 1);
glVertex3f(1.f, -1.f, -1.f);
glVertex3f(0.5f, 0.5f, 0.5f);
glTexCoord2f(0, 1);
glVertex3f(-0.5f, 0.5f, 0.5f);
glTexCoord2f(1, 0);
glVertex3f(1.f, 1.f, 1.f);
glNormal3f(0, -1, 0);
glTexCoord2f(0, 0);
glVertex3f(-1.f, 1.f, 1.f);
glTexCoord2f(0, 1);
glVertex3f(-1.f, -1.f, 1.f);
glVertex3f(-0.5f, -0.5f, -0.5f);
glTexCoord2f(1, 0);
glVertex3f(-0.5f, 0.5f, -0.5f);
glTexCoord2f(1, 1);
glVertex3f(1.f, -1.f, 1.f);
glVertex3f(-0.5f, 0.5f, 0.5f);
glTexCoord2f(0, 1);
glVertex3f(-0.5f, -0.5f, 0.5f);
glTexCoord2f(1, 0);
glVertex3f(1.f, -1.f, -1.f);
glNormal3f(0, 1, 0);
glTexCoord2f(0, 0);
glVertex3f(-1.f, -1.f, -1.f);
glTexCoord2f(0, 1);
glVertex3f(-1.f, 1.f, -1.f);
glVertex3f(0.5f, -0.5f, -0.5f);
glTexCoord2f(1, 0);
glVertex3f(0.5f, 0.5f, -0.5f);
glTexCoord2f(1, 1);
glVertex3f(1.f, 1.f, -1.f);
glVertex3f(0.5f, 0.5f, 0.5f);
glTexCoord2f(0, 1);
glVertex3f(0.5f, -0.5f, 0.5f);
glTexCoord2f(1, 0);
glVertex3f(-1.f, 1.f, 1.f);
glNormal3f(1, 0, 0);
glTexCoord2f(0, 0);
glVertex3f(-1.f, 1.f, -1.f);
glTexCoord2f(0, 1);
glVertex3f(-1.f, -1.f, -1.f);
glVertex3f(-0.5f, 0.5f, -0.5f);
glTexCoord2f(1, 0);
glVertex3f(-0.5f, 0.5f, 0.5f);
glTexCoord2f(1, 1);
glVertex3f(-1.f, -1.f, 1.f);
glVertex3f(0.5f, 0.5f, 0.5f);
glTexCoord2f(0, 1);
glVertex3f(0.5f, 0.5f, -0.5f);
glTexCoord2f(1, 0);
glVertex3f(1.f, 1.f, -1.f);
glNormal3f(-1, 0, 0);
glTexCoord2f(0, 0);
glVertex3f(1.f, 1.f, 1.f);
glTexCoord2f(0, 1);
glVertex3f(1.f, -1.f, 1.f);
glVertex3f(-0.5f, -0.5f, -0.5f);
glTexCoord2f(1, 0);
glVertex3f(-0.5f, -0.5f, 0.5f);
glTexCoord2f(1, 1);
glVertex3f(1.f, -1.f, -1.f);
glVertex3f(0.5f, -0.5f, 0.5f);
glTexCoord2f(0, 1);
glVertex3f(0.5f, -0.5f, -0.5f);
glEnd();
}

Some files were not shown because too many files have changed in this diff Show More