it works?

This commit is contained in:
Asuro
2025-02-08 01:46:25 +01:00
parent 60640a708f
commit b263c3aa82
19 changed files with 801 additions and 18 deletions

View File

@@ -1,22 +1,42 @@
#include "Setup.h"
#include "Log.h"
#include <bgfx/bgfx.h>
#include "rendering/Rendering.h"
#include <cstdint>
namespace Game
{
int32_t FrameCounter = 0;
class GameSetup
{
public:
GameRendering Rendering;
int32_t FrameCounter = 0;
};
namespace
{
GameSetup Instance;
}
void Setup(void* window)
{
Log("Game Setup Start!");
Instance.Rendering.Setup(window);
}
void Update()
{
++FrameCounter;
if (FrameCounter % 1000000 == 0)
++Instance.FrameCounter;
if (Instance.FrameCounter % 100 == 0)
{
Log("Frame!");
}
Instance.Rendering.Update();
}
void Shutdown()
{
Log("Shutdown");
Instance.Rendering.Shutdown();
}
}