diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/normalopenglgraphics.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/normalopenglgraphics.cpp b/src/normalopenglgraphics.cpp index 0538d2da1..d2b7818dd 100644 --- a/src/normalopenglgraphics.cpp +++ b/src/normalopenglgraphics.cpp @@ -820,7 +820,7 @@ void NormalOpenGLGraphics::calcTile(ImageVertexes *const vert, const float tw = static_cast<float>(image->mTexWidth); const float th = static_cast<float>(image->mTexHeight); - const unsigned int vLimit = mMaxVertices * 4; + const unsigned int vLimit = 512 * 4; NormalOpenGLGraphicsVertexes *ogl = vert->ogl; @@ -833,9 +833,9 @@ void NormalOpenGLGraphics::calcTile(ImageVertexes *const vert, float texY1 = static_cast<float>(srcY) / th; if (!ogl->mFloatTexArray) - ogl->mFloatTexArray = new GLfloat[mMaxVertices * 4 + 30]; + ogl->mFloatTexArray = new GLfloat[vLimit]; if (!ogl->mIntVertArray) - ogl->mIntVertArray = new GLint[mMaxVertices * 4 + 30]; + ogl->mIntVertArray = new GLint[vLimit]; GLfloat *floatTexArray = ogl->mFloatTexArray; GLint *intVertArray = ogl->mIntVertArray; @@ -878,9 +878,9 @@ void NormalOpenGLGraphics::calcTile(ImageVertexes *const vert, else { if (!ogl->mIntTexArray) - ogl->mIntTexArray = new GLint[mMaxVertices * 4 + 30]; + ogl->mIntTexArray = new GLint[vLimit]; if (!ogl->mIntVertArray) - ogl->mIntVertArray = new GLint[mMaxVertices * 4 + 30]; + ogl->mIntVertArray = new GLint[vLimit]; GLint *intTexArray = ogl->mIntTexArray; GLint *intVertArray = ogl->mIntVertArray; |