Added a debug controller
Made a default template for cameras. Added delta to mouse state so we can check delta for debug Camera.
This commit is contained in:
+3
-5
@@ -228,7 +228,6 @@ void JulietApplication::Shutdown()
|
||||
void JulietApplication::Update(float deltaTime)
|
||||
{
|
||||
|
||||
|
||||
CameraTime += deltaTime;
|
||||
|
||||
static float fpsTimer = 0.0f;
|
||||
@@ -488,7 +487,7 @@ void JulietApplication::Update(float deltaTime)
|
||||
DebugDisplay_DrawLine({ 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 1.0f }, { 0.0f, 0.0f, 1.0f, 1.0f }, true);
|
||||
DebugDisplay_DrawSphere({ 0.0f, 0.0f, 0.0f }, 0.5f, { 1.0f, 1.0f, 0.0f, 1.0f }, true);
|
||||
|
||||
Game.Update(&Data, 0.0f);
|
||||
Game.Update(&Data, deltaTime);
|
||||
|
||||
if (ShouldReloadCode(GameCode))
|
||||
{
|
||||
@@ -540,11 +539,10 @@ void JulietApplication::Update(float deltaTime)
|
||||
|
||||
void JulietApplication::OnPreRender(CommandList* /*cmd*/) {}
|
||||
|
||||
void JulietApplication::OnRender(RenderPass* pass, CommandList* cmd)
|
||||
void JulietApplication::OnRender(RenderPass* pass, CommandList* cmd, const Camera& camera)
|
||||
{
|
||||
Camera cam = {};
|
||||
PushData pushData = {};
|
||||
pushData.ViewProjection = Camera_GetViewProjectionMatrix(cam);
|
||||
pushData.ViewProjection = Camera_GetViewProjectionMatrix(camera);
|
||||
|
||||
#if 0
|
||||
if (enableGlobalLight)
|
||||
|
||||
+2
-2
@@ -27,8 +27,8 @@ class JulietApplication : public Juliet::IApplication
|
||||
Juliet::GraphicsDevice* GetGraphicsDevice() override { return GraphicsDevice; }
|
||||
|
||||
// Render Lifecycle
|
||||
void OnPreRender(Juliet::CommandList* cmd) override;
|
||||
void OnRender(Juliet::RenderPass* pass, Juliet::CommandList* cmd) override;
|
||||
void OnPreRender(Juliet::CommandList* cmd) override;
|
||||
void OnRender(Juliet::RenderPass* pass, Juliet::CommandList* cmd, const Juliet::Camera& camera) override;
|
||||
Juliet::ColorTargetInfo GetColorTargetInfo(Juliet::Texture* swapchainTexture) override;
|
||||
Juliet::DepthStencilTargetInfo* GetDepthTargetInfo() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user