Created
September 28, 2014 00:40
-
-
Save terryjsmith/c403f7840c17502a5f41 to your computer and use it in GitHub Desktop.
Early main loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* INCLUDES */ | |
#include <GLFW/glfw3.h> | |
#include <component.h> | |
#include <system.h> | |
#include <rendersystem.h> | |
/* GLOBAL VARIABLES */ | |
RenderSystem* g_renderSystem = 0; | |
/* MAIN FUNCTION */ | |
int main(int argc, char** argv) { | |
/* INITIALIZATION */ | |
g_renderSystem = new RenderSystem(); | |
g_renderSystem->Initialize(); | |
g_renderSystem->CreateWindow(800, 600, "Evolution", false); | |
/* MAIN LOOP */ | |
while(!glfwWindowShouldClose(g_renderSystem->GetWindow())) { | |
// Update our render system | |
g_renderSystem->Update(0); | |
// Poll for and process events | |
glfwPollEvents(); | |
} | |
/* SHUT DOWN */ | |
g_renderSystem->Shutdown(); | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment