diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-09-03 17:45:52 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-01-13 03:39:31 +0100 |
commit | 145ba8e157f79db64203db9684af2e6ed33af075 (patch) | |
tree | ec524120eaf2dda746d662297483be51fe626367 /src/Render.cpp | |
parent | 2017-08-29 (diff) | |
download | AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.gz AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.bz2 AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.lz AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.xz AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.zst AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.zip |
Diffstat (limited to 'src/Render.cpp')
-rw-r--r-- | src/Render.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Render.cpp b/src/Render.cpp index 19e89f6..0504d0a 100644 --- a/src/Render.cpp +++ b/src/Render.cpp @@ -61,12 +61,15 @@ void Render::InitGlew() { SDL_GL_GetDrawableSize(window, &width, &height); glViewport(0, 0, width, height); glEnable(GL_DEPTH_TEST); - glEnable(GL_CULL_FACE); + /*glEnable(GL_CULL_FACE); glCullFace(GL_BACK); - glFrontFace(GL_CCW); + glFrontFace(GL_CCW);*/ glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glCheckError(); + if (glActiveTexture == nullptr) { + throw std::runtime_error("GLEW initialization failed with unknown reason"); + } } void Render::PrepareToRendering() { @@ -138,11 +141,11 @@ void Render::HandleEvents() { break; } case SDL_WINDOWEVENT_FOCUS_GAINED: - HasFocus = true; break; case SDL_WINDOWEVENT_FOCUS_LOST: HasFocus = false; SetMouseCapture(false); + state = GlobalState::Paused; break; } break; |