diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-10 23:31:42 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-10 23:31:42 +0200 |
commit | 63257034c946d40fb3ecc73a9ee3dc9d1e0a1e34 (patch) | |
tree | aa1fcf2928e2c9d5f89022242fbe3ff6d7d64bbb /src/app | |
parent | c3ab23ac9dc02d59180f2f1af5f3aa5b50f9f8d8 (diff) | |
download | colobot-63257034c946d40fb3ecc73a9ee3dc9d1e0a1e34.tar.gz colobot-63257034c946d40fb3ecc73a9ee3dc9d1e0a1e34.tar.bz2 colobot-63257034c946d40fb3ecc73a9ee3dc9d1e0a1e34.zip |
Partial CEngine implementation
- added rewritten implementation for basic modesetting in CEngine
- started rewriting proper rendering and object handling in CEngine
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/app.cpp | 21 | ||||
-rw-r--r-- | src/app/app.h | 2 |
2 files changed, 5 insertions, 18 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp index 3681172..e116914 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -573,16 +573,7 @@ int CApplication::Run() } // Update game and render a frame during idle time (no messages are waiting) - bool ok = Render(); - - // If an error occurs, push quit event to the queue - if (! ok) - { - SDL_Event quitEvent; - memset(&quitEvent, 0, sizeof(SDL_Event)); - quitEvent.type = SDL_QUIT; - SDL_PushEvent(&quitEvent); - } + Render(); } } @@ -751,17 +742,13 @@ bool CApplication::ProcessEvent(const Event &event) return true; } -/** Renders the frame and swaps buffers as necessary. Returns \c false on error. */ -bool CApplication::Render() +/** Renders the frame and swaps buffers as necessary */ +void CApplication::Render() { - bool result = m_engine->Render(); - if (! result) - return false; + m_engine->Render(); if (m_deviceConfig.doubleBuf) SDL_GL_SwapBuffers(); - - return true; } void CApplication::StepSimulation(float rTime) diff --git a/src/app/app.h b/src/app/app.h index bba55b2..e7ffd54 100644 --- a/src/app/app.h +++ b/src/app/app.h @@ -198,7 +198,7 @@ protected: //! Handles some incoming events bool ProcessEvent(const Event &event); //! Renders the image in window - bool Render(); + void Render(); //! Opens the joystick device bool OpenJoystick(); |