diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-19 21:37:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-19 21:37:23 +0300 |
commit | 37ea8290db06e8ccd025d80c7cf19bf5bc1fc8fc (patch) | |
tree | 9c8b66a4036e5903f7fe609dd4d079807febc7fe | |
parent | 64192ec89b46f7c34aaaae493e48352c3cbbf03f (diff) | |
download | mv-37ea8290db06e8ccd025d80c7cf19bf5bc1fc8fc.tar.gz mv-37ea8290db06e8ccd025d80c7cf19bf5bc1fc8fc.tar.bz2 mv-37ea8290db06e8ccd025d80c7cf19bf5bc1fc8fc.tar.xz mv-37ea8290db06e8ccd025d80c7cf19bf5bc1fc8fc.zip |
Fix resetting draw color in modern and mobile2 renderers.
-rw-r--r-- | src/render/mobileopengl2graphics.cpp | 6 | ||||
-rw-r--r-- | src/render/modernopenglgraphics.cpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/render/mobileopengl2graphics.cpp b/src/render/mobileopengl2graphics.cpp index 6c0762934..620bc923a 100644 --- a/src/render/mobileopengl2graphics.cpp +++ b/src/render/mobileopengl2graphics.cpp @@ -198,6 +198,11 @@ void MobileOpenGL2Graphics::postInit() restrict2 mglUniform2f(mTextureSizeUniform, 1.0f, 1.0f); + mglUniform4f(mSimpleColorUniform, + 0.0F, + 0.0F, + 0.0F, + 0.0F); mglActiveTexture(GL_TEXTURE0); } @@ -207,6 +212,7 @@ void MobileOpenGL2Graphics::screenResized() restrict2 deleteGLObjects(); mVboBinded = 0U; mAttributesBinded = 0U; + mColor = Color(0, 0, 0, 0); postInit(); } diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp index cfd83e57f..89ca10fd4 100644 --- a/src/render/modernopenglgraphics.cpp +++ b/src/render/modernopenglgraphics.cpp @@ -200,6 +200,11 @@ void ModernOpenGLGraphics::postInit() restrict2 mglUniform2f(mScreenUniform, static_cast<float>(mWidth) / 2.0f, static_cast<float>(mHeight) / 2.0f); + mglUniform4f(mSimpleColorUniform, + 0.0F, + 0.0F, + 0.0F, + 0.0F); } void ModernOpenGLGraphics::screenResized() restrict2 @@ -208,6 +213,7 @@ void ModernOpenGLGraphics::screenResized() restrict2 mVboBinded = 0U; mEboBinded = 0U; mAttributesBinded = 0U; + mColor = Color(0, 0, 0, 0); postInit(); } |