Skip to content

Instantly share code, notes, and snippets.

@terryjsmith
Created September 28, 2014 00:40
Show Gist options
  • Save terryjsmith/c403f7840c17502a5f41 to your computer and use it in GitHub Desktop.
Save terryjsmith/c403f7840c17502a5f41 to your computer and use it in GitHub Desktop.
Early main loop
/* 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