YoggieEngine/BarinkEngine/BarinkEngine.cpp

54 lines
772 B
C++
Raw Normal View History

#include "BarinkEngine.h"
#include <imgui.h>
extern void Start();
extern void Update();
extern void ImmediateGraphicsDraw();
extern void Stop();
using namespace BarinkEngine;
int main(int argc, char* argv[]) {
// Startup services
BarinkWindow MainWindow = BarinkWindow(800, 600);
Renderer renderer = Renderer();
InputManager InputSystem = InputManager();
InputSystem.attach(&MainWindow);
GUIManager GUISystem = GUIManager(&MainWindow);
// First call to setup game
Start();
// Runtime loop
while (!MainWindow.WindowShouldClose()) {
InputSystem.PollEvents();
Update();
renderer.Render();
ImmediateGraphicsDraw();
GUISystem.Render();
MainWindow.SwapBuffers();
}
// Shutdown game
Stop();
// Shutdown Services
return 0;
}