Nigel Barink
d019155d10
* Added a basic material abstraction * Started implementation of RenderTarget (such as render textures)
60 lines
904 B
C++
60 lines
904 B
C++
#include "BarinkEngine.h"
|
|
#include <phonon.h>
|
|
|
|
EngineStatistics* ES;
|
|
|
|
int main(int argc, char* argv[]) {
|
|
// Setup performance sampler
|
|
PerfomanceSamplerInit();
|
|
|
|
|
|
// Startup services
|
|
BarinkWindow MainWindow = BarinkWindow(800, 600);
|
|
|
|
BarinkEngine::Renderer renderer = BarinkEngine::Renderer();
|
|
BarinkEngine::InputManager InputSystem = BarinkEngine::InputManager();
|
|
|
|
InputSystem.attach(&MainWindow);
|
|
|
|
GUIManager GUISystem = GUIManager(&MainWindow);
|
|
|
|
|
|
|
|
// First call to setup game
|
|
Start();
|
|
|
|
|
|
// Runtime loop
|
|
while (!MainWindow.WindowShouldClose()) {
|
|
|
|
SamplePerformance();
|
|
|
|
|
|
// Execute main logic
|
|
InputSystem.PollEvents();
|
|
|
|
Update();
|
|
|
|
renderer.Render();
|
|
|
|
ImmediateGraphicsDraw();
|
|
|
|
GUISystem.Render();
|
|
|
|
|
|
|
|
MainWindow.SwapBuffers();
|
|
}
|
|
|
|
|
|
// Shutdown game
|
|
Stop();
|
|
|
|
|
|
// Shutdown Services
|
|
delete ES;
|
|
|
|
return 0;
|
|
}
|
|
|