summaryrefslogtreecommitdiff
path: root/src/mobileopenglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-06 21:06:21 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-06 21:06:21 +0300
commitad02b24b25f565a274ff8ec8408acefc1c232e12 (patch)
treeb6e1e935fdfab13cae4451a12c59b014a1d8c4a6 /src/mobileopenglgraphics.cpp
parent6cd4c1a2b02726766ad0d5317013ba2e1314c127 (diff)
downloadmanaverse-ad02b24b25f565a274ff8ec8408acefc1c232e12.tar.gz
manaverse-ad02b24b25f565a274ff8ec8408acefc1c232e12.tar.bz2
manaverse-ad02b24b25f565a274ff8ec8408acefc1c232e12.tar.xz
manaverse-ad02b24b25f565a274ff8ec8408acefc1c232e12.zip
Remove unused drawing class.
Diffstat (limited to 'src/mobileopenglgraphics.cpp')
-rw-r--r--src/mobileopenglgraphics.cpp122
1 files changed, 0 insertions, 122 deletions
diff --git a/src/mobileopenglgraphics.cpp b/src/mobileopenglgraphics.cpp
index 92afbc741..cbd1a8720 100644
--- a/src/mobileopenglgraphics.cpp
+++ b/src/mobileopenglgraphics.cpp
@@ -502,23 +502,6 @@ void MobileOpenGLGraphics::drawRescaledImagePattern(const Image *const image,
// }
}
-void MobileOpenGLGraphics::drawImagePattern2(const GraphicsVertexes
- *const vert,
- const Image *const image)
-{
- if (!image)
- return;
-
- setColorAlpha(image->mAlpha);
-#ifdef DEBUG_BIND_TEXTURE
- debugBindTexture(image);
-#endif
- bindTexture(OpenGLImageHelper::mTextureType, image->mGLImage);
- setTexturingAndBlending(true);
-
- drawVertexes(vert->getOGLconst());
-}
-
inline void MobileOpenGLGraphics::drawVertexes(const
NormalOpenGLGraphicsVertexes
&ogl)
@@ -549,111 +532,6 @@ inline void MobileOpenGLGraphics::drawVertexes(const
}
}
-void MobileOpenGLGraphics::calcImagePattern(GraphicsVertexes *const vert,
- const Image *const image,
- const int x, const int y,
- const int w, const int h) const
-{
- if (!image)
- {
- vert->incPtr(1);
- return;
- }
-
- const int srcX = image->mBounds.x;
- const int srcY = image->mBounds.y;
-
- const int iw = image->mBounds.w;
- const int ih = image->mBounds.h;
-
- if (iw == 0 || ih == 0)
- {
- vert->incPtr(1);
- return;
- }
-
- const float tw = static_cast<float>(image->mTexWidth);
- const float th = static_cast<float>(image->mTexHeight);
-
- unsigned int vp = 0;
- const unsigned int vLimit = mMaxVertices * 4;
-
- NormalOpenGLGraphicsVertexes &ogl = vert->getOGL();
- ogl.init();
-
- // Draw a set of textured rectangles
-// if (OpenGLImageHelper::mTextureType == GL_TEXTURE_2D)
- {
- float texX1 = static_cast<float>(srcX) / tw;
- float texY1 = static_cast<float>(srcY) / th;
-
- GLfloat *floatTexArray = ogl.switchFloatTexArray();
- GLshort *shortVertArray = ogl.switchShortVertArray();
-
- for (int py = 0; py < h; py += ih)
- {
- const int height = (py + ih >= h) ? h - py : ih;
- const int dstY = y + py;
- for (int px = 0; px < w; px += iw)
- {
- int width = (px + iw >= w) ? w - px : iw;
- int dstX = x + px;
-
- float texX2 = static_cast<float>(srcX + width) / tw;
- float texY2 = static_cast<float>(srcY + height) / th;
-
- floatTexArray[vp + 0] = texX1;
- floatTexArray[vp + 1] = texY1;
-
- floatTexArray[vp + 2] = texX2;
- floatTexArray[vp + 3] = texY1;
-
- floatTexArray[vp + 4] = texX2;
- floatTexArray[vp + 5] = texY2;
-
- floatTexArray[vp + 6] = texX1;
- floatTexArray[vp + 7] = texY1;
-
- floatTexArray[vp + 8] = texX1;
- floatTexArray[vp + 9] = texY2;
-
- floatTexArray[vp + 10] = texX2;
- floatTexArray[vp + 11] = texY2;
-
-
- shortVertArray[vp + 0] = dstX;
- shortVertArray[vp + 1] = dstY;
-
- shortVertArray[vp + 2] = dstX + width;
- shortVertArray[vp + 3] = dstY;
-
- shortVertArray[vp + 4] = dstX + width;
- shortVertArray[vp + 5] = dstY + height;
-
- shortVertArray[vp + 6] = dstX;
- shortVertArray[vp + 7] = dstY;
-
- shortVertArray[vp + 8] = dstX;
- shortVertArray[vp + 9] = dstY + height;
-
- shortVertArray[vp + 10] = dstX + width;
- shortVertArray[vp + 11] = dstY + height;
-
- vp += 12;
- if (vp >= vLimit)
- {
- floatTexArray = ogl.switchFloatTexArray();
- shortVertArray = ogl.switchShortVertArray();
- ogl.switchVp(vp);
- vp = 0;
- }
- }
- }
- }
- ogl.switchVp(vp);
- vert->incPtr(1);
-}
-
void MobileOpenGLGraphics::calcImagePattern(ImageVertexes *const vert,
const Image *const image,
const int x, const int y,