summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-05-07 22:23:06 +0300
committerAndrei Karas <akaras@inbox.ru>2012-05-07 22:23:06 +0300
commit9e65d853ef4cbebb9899dabe0233ad83a0b9e97a (patch)
treebf9efca8cc5635a8a3608811782b46dae96fb15a /src
parent860c60be6c7a925bb4d8db291b771a6044d20308 (diff)
downloadmv-9e65d853ef4cbebb9899dabe0233ad83a0b9e97a.tar.gz
mv-9e65d853ef4cbebb9899dabe0233ad83a0b9e97a.tar.bz2
mv-9e65d853ef4cbebb9899dabe0233ad83a0b9e97a.tar.xz
mv-9e65d853ef4cbebb9899dabe0233ad83a0b9e97a.zip
Remove outdated glBegin/glEnd in fast opengl class.
Diffstat (limited to 'src')
-rw-r--r--src/openglgraphics.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index 02e14b77e..e6f598904 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -1160,19 +1160,20 @@ void OpenGLGraphics::drawPoint(int x, int y)
void OpenGLGraphics::drawLine(int x1, int y1, int x2, int y2)
{
+ unsigned int vp = 4;
+ const unsigned int vLimit = vertexBufSize * 4;
+
setTexturingAndBlending(false);
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
- float x3 = static_cast<float>(x2) + 0.5f;
- float y3 = static_cast<float>(y2) + 0.5f;
+ mFloatTexArray[0] = static_cast<float>(x1);
+ mFloatTexArray[1] = static_cast<float>(y1);
+ mFloatTexArray[2] = static_cast<float>(x2);
+ mFloatTexArray[3] = static_cast<float>(y2);
- glBegin(GL_LINES);
- glVertex2f(static_cast<float>(x1) + 0.5f, static_cast<float>(y1) + 0.5f);
- glVertex2f(x3, y3);
- glEnd();
+ drawLineArrayf(vp);
- glBegin(GL_POINTS);
- glVertex2f(x3, y3);
- glEnd();
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
}
void OpenGLGraphics::drawRectangle(const gcn::Rectangle& rect)