From b52dae8631c1900b655c93adb71d1c32ed18b496 Mon Sep 17 00:00:00 2001 From: Ben Kyd Date: Tue, 16 Jul 2019 16:26:11 +0100 Subject: [PATCH] smh --- README.md | 2 ++ src/inferno.cpp | 4 +++- src/inferno.hpp | 1 + test/main.cpp | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..b5b145c --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Inferno Pathtracer + diff --git a/src/inferno.cpp b/src/inferno.cpp index 98de93f..1e5398c 100644 --- a/src/inferno.cpp +++ b/src/inferno.cpp @@ -41,8 +41,10 @@ bool InfernoEngine::InitWindow(int xRes, int yRes) { void InfernoEngine::Ready() { if (!m_initialized) m_initialized = true; +} - while (m_display->WindowOpen) { +void InfernoEngine::Render() { + while (m_display->WindowOpen) { SDL_Event e; while (SDL_PollEvent(&e) == SDL_TRUE) if (e.type == SDL_QUIT) m_display->CloseDisplay(); diff --git a/src/inferno.hpp b/src/inferno.hpp index f87133a..ab34f4c 100644 --- a/src/inferno.hpp +++ b/src/inferno.hpp @@ -30,6 +30,7 @@ public: bool InitWindow(int xRes, int yRes); void Ready(); + void Render(); // 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 diff --git a/test/main.cpp b/test/main.cpp index 7288962..7eaf5a2 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -11,6 +11,6 @@ int main(int argc, char** argv) { std::cout << "Error initializing window: " << inferno.LastError() << std::endl; } - inferno.Ready(); + inferno.Render(); }