it works?
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user