nigel
8cc6ed1f15
* Rendering 2 cubes * per cube transform panels * Updated TODO.md * Updated README.md
54 lines
772 B
C++
54 lines
772 B
C++
#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;
|
|
}
|
|
|
|
|