Files
Juliet/JulietApp/main.h
T

51 lines
1.4 KiB
C++

#pragma once
#include <Core/Application/IApplication.h>
#include <Core/HAL/Display/Display.h>
#include <Core/HAL/DynLib/DynamicLibrary.h>
#include <Core/HotReload/HotReload.h>
#include <Graphics/GraphicsPipeline.h>
struct Mesh;
struct GraphicsTransferBuffer;
struct GraphicsBuffer;
struct GraphicsDevice;
struct Window;
class JulietApplication : public IApplication
{
protected:
void Init(NonNullPtr<Arena> arena) override;
void Shutdown() override;
void Update(float deltaTime) override;
bool IsRunning() override;
Window* GetPlatformWindow() override { return MainWindow; }
GraphicsDevice* GetGraphicsDevice() override { return GraphicsDevice; }
// Render Lifecycle
ColorTargetInfo GetColorTargetInfo(Texture* swapchainTexture) override;
DepthStencilTargetInfo* GetDepthTargetInfo() override;
#if 0
Camera GetDebugCamera() override;
#endif
public:
void SetAutoCloseFrameCount(int count) { AutoCloseFrameCount = count; }
int GetAutoCloseFrameCount() const { return AutoCloseFrameCount; }
private:
Window* MainWindow = {};
GraphicsDevice* GraphicsDevice = {};
HotReloadCode GameCode = {};
GraphicsPipeline* GraphicsPipeline = {};
Texture* DepthBuffer = {};
int AutoCloseFrameCount = -1;
bool Running = false;
float CameraTime = 0.0f;
};
JulietApplication& GetApplication();