summaryrefslogtreecommitdiffstats
path: root/src/Render.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-09-03 17:45:52 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-01-13 03:39:31 +0100
commit145ba8e157f79db64203db9684af2e6ed33af075 (patch)
treeec524120eaf2dda746d662297483be51fe626367 /src/Render.cpp
parent2017-08-29 (diff)
downloadAltCraft-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.cpp9
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;