Added a few models and removed ortho camera perspectiv.
This commit is contained in:
+11
-11
@@ -77,20 +77,20 @@ void dd::Camera::SetOrientation(glm::quat val)
|
||||
|
||||
void dd::Camera::UpdateProjectionMatrix()
|
||||
{
|
||||
m_ProjectionMatrix = glm::ortho(
|
||||
-16.f,
|
||||
16.f,
|
||||
-9.f,
|
||||
9.f,
|
||||
m_NearClip,
|
||||
m_FarClip
|
||||
);
|
||||
// m_ProjectionMatrix = glm::perspective(
|
||||
// m_FOV,
|
||||
// m_AspectRatio,
|
||||
// m_ProjectionMatrix = glm::ortho(
|
||||
// -16.f,
|
||||
// 16.f,
|
||||
// -9.f,
|
||||
// 9.f,
|
||||
// m_NearClip,
|
||||
// m_FarClip
|
||||
// );
|
||||
m_ProjectionMatrix = glm::perspective(
|
||||
m_FOV,
|
||||
m_AspectRatio,
|
||||
m_NearClip,
|
||||
m_FarClip
|
||||
);
|
||||
}
|
||||
|
||||
void dd::Camera::UpdateViewMatrix()
|
||||
|
||||
@@ -208,7 +208,7 @@ void dd::Renderer::CreateBuffers()
|
||||
void dd::Renderer::Draw(RenderQueueCollection& rq)
|
||||
{
|
||||
|
||||
//DrawDeferred(rq.Deferred, rq.Lights);
|
||||
DrawDeferred(rq.Deferred, rq.Lights);
|
||||
rq.Forward.Jobs.sort(dd::Renderer::DepthSort);
|
||||
DrawForward(rq.Forward, rq.Lights);
|
||||
|
||||
@@ -289,8 +289,8 @@ void dd::Renderer::DrawForward(RenderQueue &objects, RenderQueue &lights)
|
||||
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE);
|
||||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, m_fbDeferred3);
|
||||
glClearColor(1, 0.9, 0.8f, 1);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
// glClearColor(1, 0.9, 0.8f, 1);
|
||||
// glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
m_spForward->Bind();
|
||||
DrawScene(objects, *m_spForward);
|
||||
|
||||
Regular → Executable
+2
-2
@@ -145,8 +145,8 @@ bool dd::Systems::PadSystem::OnContact(const dd::Events::Contact &event)
|
||||
std::shared_ptr<Components::Transform> transform = m_World->AddComponent<Components::Transform>(ent);
|
||||
transform->Position = glm::vec3(transformBall->Position.x, transformBall->Position.y + 0.1f, -10.f);
|
||||
transform->Scale = glm::vec3(1.f, 1.f, 1.f);
|
||||
std::shared_ptr<Components::Sprite> sprite = m_World->AddComponent<Components::Sprite>(ent);
|
||||
sprite->SpriteFile = "Textures/Ball.png";
|
||||
auto model = m_World->AddComponent<Components::Model>(ent);
|
||||
model->ModelFile = "Models/Test/Ball/Ballopus.obj";
|
||||
std::shared_ptr<Components::CircleShape> circleShape = m_World->AddComponent<Components::CircleShape>(ent);
|
||||
std::shared_ptr<Components::Ball> cball = m_World->AddComponent<Components::Ball>(ent);
|
||||
std::shared_ptr<Components::Physics> physics = m_World->AddComponent<Components::Physics>(ent);
|
||||
|
||||
Reference in New Issue
Block a user