diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-11 00:49:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-11 00:49:11 +0300 |
commit | 023723c3109aba4841ec91ca9495e6703804fd7f (patch) | |
tree | 2fbc65274725260559dd4ab44ca7fe3e2f382dd9 /src | |
parent | 0f6fcf759a1a02c1dd8955971d54395e0d529244 (diff) | |
download | manaplus-023723c3109aba4841ec91ca9495e6703804fd7f.tar.gz manaplus-023723c3109aba4841ec91ca9495e6703804fd7f.tar.bz2 manaplus-023723c3109aba4841ec91ca9495e6703804fd7f.tar.xz manaplus-023723c3109aba4841ec91ca9495e6703804fd7f.zip |
Limit tile batches to 512 size only.
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; |