summaryrefslogtreecommitdiff
path: root/src/render/normalopenglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-30 00:07:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-30 00:07:54 +0300
commita93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63 (patch)
tree2d85d112997176e9ab765e638b0e7f2e16677b83 /src/render/normalopenglgraphics.cpp
parent5c83a96b8ad85ad0562542b9720a0df6c5fb550c (diff)
parent8983700f6c8cc6496626ed3af235e1ec31fe5501 (diff)
downloadplus-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.tar.gz
plus-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.tar.bz2
plus-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.tar.xz
plus-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.zip
Merge branch 'master' into stable
Diffstat (limited to 'src/render/normalopenglgraphics.cpp')
-rw-r--r--src/render/normalopenglgraphics.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp
index 6bc25be32..72fbd8a99 100644
--- a/src/render/normalopenglgraphics.cpp
+++ b/src/render/normalopenglgraphics.cpp
@@ -131,12 +131,18 @@ void NormalOpenGLGraphics::initArrays()
// need alocate small size, after if limit reached reallocate to double size
vertexBufSize = mMaxVertices;
const int sz = mMaxVertices * 4 + 30;
- mFloatTexArray = new GLfloat[sz];
- mIntTexArray = new GLint[sz];
- mIntVertArray = new GLint[sz];
- mFloatTexArrayCached = new GLfloat[sz];
- mIntTexArrayCached = new GLint[sz];
- mIntVertArrayCached = new GLint[sz];
+ if (!mFloatTexArray)
+ mFloatTexArray = new GLfloat[sz];
+ if (!mIntTexArray)
+ mIntTexArray = new GLint[sz];
+ if (!mIntVertArray)
+ mIntVertArray = new GLint[sz];
+ if (!mFloatTexArrayCached)
+ mFloatTexArrayCached = new GLfloat[sz];
+ if (!mIntTexArrayCached)
+ mIntTexArrayCached = new GLint[sz];
+ if (!mIntVertArrayCached)
+ mIntVertArrayCached = new GLint[sz];
}
bool NormalOpenGLGraphics::setVideoMode(const int w, const int h,
@@ -1094,7 +1100,7 @@ void NormalOpenGLGraphics::updateScreen()
BLOCK_END("Graphics::updateScreen")
}
-void NormalOpenGLGraphics::_beginDraw()
+void NormalOpenGLGraphics::beginDraw()
{
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
@@ -1148,7 +1154,7 @@ void NormalOpenGLGraphics::_beginDraw()
pushClipArea(Rect(0, 0, w, h));
}
-void NormalOpenGLGraphics::_endDraw()
+void NormalOpenGLGraphics::endDraw()
{
popClipArea();
}