diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-05-08 21:59:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-05-08 21:59:40 +0300 |
commit | 0af9ff98876426c096d2b4b8a4f17172af92b8d0 (patch) | |
tree | 7bda8371f24f7e4734d38785c1ddf45e51ee0e3c /src/openglgraphics.cpp | |
parent | 6597ad3d884c0e443203738cae4e97a545f76f48 (diff) | |
download | plus-0af9ff98876426c096d2b4b8a4f17172af92b8d0.tar.gz plus-0af9ff98876426c096d2b4b8a4f17172af92b8d0.tar.bz2 plus-0af9ff98876426c096d2b4b8a4f17172af92b8d0.tar.xz plus-0af9ff98876426c096d2b4b8a4f17172af92b8d0.zip |
Fix draw line position.
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r-- | src/openglgraphics.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index e6f598904..b979cb473 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -1166,10 +1166,10 @@ void OpenGLGraphics::drawLine(int x1, int y1, int x2, int y2) setTexturingAndBlending(false); glDisableClientState(GL_TEXTURE_COORD_ARRAY); - mFloatTexArray[0] = static_cast<float>(x1); - mFloatTexArray[1] = static_cast<float>(y1); - mFloatTexArray[2] = static_cast<float>(x2); - mFloatTexArray[3] = static_cast<float>(y2); + mFloatTexArray[0] = static_cast<float>(x1) + 0.5f; + mFloatTexArray[1] = static_cast<float>(y1) + 0.5f; + mFloatTexArray[2] = static_cast<float>(x2) + 0.5f; + mFloatTexArray[3] = static_cast<float>(y2) + 0.5f; drawLineArrayf(vp); |