diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-03-30 00:07:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-03-30 00:07:54 +0300 |
commit | a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63 (patch) | |
tree | 2d85d112997176e9ab765e638b0e7f2e16677b83 /src/render/mobileopenglgraphics.cpp | |
parent | 5c83a96b8ad85ad0562542b9720a0df6c5fb550c (diff) | |
parent | 8983700f6c8cc6496626ed3af235e1ec31fe5501 (diff) | |
download | manaverse-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.tar.gz manaverse-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.tar.bz2 manaverse-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.tar.xz manaverse-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.zip |
Merge branch 'master' into stable
Diffstat (limited to 'src/render/mobileopenglgraphics.cpp')
-rw-r--r-- | src/render/mobileopenglgraphics.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp index 86707fac8..0ad5bfeb7 100644 --- a/src/render/mobileopenglgraphics.cpp +++ b/src/render/mobileopenglgraphics.cpp @@ -113,10 +113,14 @@ void MobileOpenGLGraphics::initArrays() // need alocate small size, after if limit reached reallocate to double size const int sz = mMaxVertices * 4 + 30; vertexBufSize = mMaxVertices; - mFloatTexArray = new GLfloat[sz]; - mShortVertArray = new GLshort[sz]; - mFloatTexArrayCached = new GLfloat[sz]; - mShortVertArrayCached = new GLshort[sz]; + if (!mFloatTexArray) + mFloatTexArray = new GLfloat[sz]; + if (!mShortVertArray) + mShortVertArray = new GLshort[sz]; + if (!mFloatTexArrayCached) + mFloatTexArrayCached = new GLfloat[sz]; + if (!mShortVertArrayCached) + mShortVertArrayCached = new GLshort[sz]; } bool MobileOpenGLGraphics::setVideoMode(const int w, const int h, @@ -835,7 +839,7 @@ void MobileOpenGLGraphics::updateScreen() BLOCK_END("Graphics::updateScreen") } -void MobileOpenGLGraphics::_beginDraw() +void MobileOpenGLGraphics::beginDraw() { glMatrixMode(GL_TEXTURE); glLoadIdentity(); @@ -887,7 +891,7 @@ void MobileOpenGLGraphics::_beginDraw() pushClipArea(Rect(0, 0, mRect.w, mRect.h)); } -void MobileOpenGLGraphics::_endDraw() +void MobileOpenGLGraphics::endDraw() { popClipArea(); } |