This commit is contained in:
Ben Kyd
2019-07-16 16:26:11 +01:00
parent 8a8636c144
commit b52dae8631
4 changed files with 7 additions and 2 deletions

2
README.md Normal file
View File

@@ -0,0 +1,2 @@
# Inferno Pathtracer

View File

@@ -41,8 +41,10 @@ bool InfernoEngine::InitWindow(int xRes, int yRes) {
void InfernoEngine::Ready() { void InfernoEngine::Ready() {
if (!m_initialized) m_initialized = true; if (!m_initialized) m_initialized = true;
}
while (m_display->WindowOpen) { void InfernoEngine::Render() {
while (m_display->WindowOpen) {
SDL_Event e; SDL_Event e;
while (SDL_PollEvent(&e) == SDL_TRUE) while (SDL_PollEvent(&e) == SDL_TRUE)
if (e.type == SDL_QUIT) m_display->CloseDisplay(); if (e.type == SDL_QUIT) m_display->CloseDisplay();

View File

@@ -30,6 +30,7 @@ public:
bool InitWindow(int xRes, int yRes); bool InitWindow(int xRes, int yRes);
void Ready(); void Ready();
void Render();
// Queries the modules, if one of them errored it finds their error string // Queries the modules, if one of them errored it finds their error string
// and returns it to the main execution code, the same happens for warnings // and returns it to the main execution code, the same happens for warnings

View File

@@ -11,6 +11,6 @@ int main(int argc, char** argv) {
std::cout << "Error initializing window: " << inferno.LastError() << std::endl; std::cout << "Error initializing window: " << inferno.LastError() << std::endl;
} }
inferno.Ready(); inferno.Ready();
inferno.Render();
} }