diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-08-20 17:21:29 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-08-20 17:21:29 +0200 |
commit | c62e2cd49649109f0135e56ee8add0dab2254d01 (patch) | |
tree | 7e6240186a3801daf0189d1883081b93b5f1eb5c /src/Render.cpp | |
parent | 2017-08-19 (diff) | |
download | AltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.tar AltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.tar.gz AltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.tar.bz2 AltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.tar.lz AltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.tar.xz AltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.tar.zst AltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Render.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Render.cpp b/src/Render.cpp index a175278..56541e9 100644 --- a/src/Render.cpp +++ b/src/Render.cpp @@ -5,7 +5,7 @@ #include "AssetManager.hpp" #include "Event.hpp" -Render::Render(unsigned int windowWidth, unsigned int windowHeight, std::string windowTitle) : timer(std::chrono::milliseconds(16)) { +Render::Render(unsigned int windowWidth, unsigned int windowHeight, std::string windowTitle) : timer(std::chrono::milliseconds(0)) { InitSfml(windowWidth, windowHeight, windowTitle); glCheckError(); InitGlew(); @@ -47,20 +47,21 @@ void Render::InitGlew() { glEnable(GL_CULL_FACE); glCullFace(GL_BACK); glFrontFace(GL_CCW); - //glEnable(GL_BLEND); - //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glLineWidth(3.0); glCheckError(); } void Render::PrepareToRendering() { //TextureAtlas texture glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, AssetManager::Instance().GetTextureAtlas()); + glBindTexture(GL_TEXTURE_2D, AssetManager::Instance().GetTextureAtlas()); AssetManager::Instance().GetTextureAtlasIndexes(); } void Render::RenderFrame() { - glClearColor(0.2f, 0.3f, 0.3f, 1.0f); + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); if (renderWorld) |