summaryrefslogtreecommitdiff
path: root/src/openglgraphics.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-07-22 21:17:15 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-08-05 17:14:29 +0200
commit10c75a337be97c93b6de839402461fd400baf128 (patch)
tree3541977d993b4f45f176a001cac4f80ddbb2c84f /src/openglgraphics.cpp
parent6c686562f03c14a51b32cb65111f0636abd5373b (diff)
downloadmana-10c75a337be97c93b6de839402461fd400baf128.tar.gz
mana-10c75a337be97c93b6de839402461fd400baf128.tar.bz2
mana-10c75a337be97c93b6de839402461fd400baf128.tar.xz
mana-10c75a337be97c93b6de839402461fd400baf128.zip
Some cleanups in OpenGL code
* Removed empty and unused function `setTargetPlane` * Removed duplicated enabling of `GL_VERTEX_ARRAY` * Removed strange smoothing code from `drawRescaledImage` Reviewed-by: Erik Schilling
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r--src/openglgraphics.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index 6148b367..66d0d0fc 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -290,19 +290,6 @@ bool OpenGLGraphics::drawRescaledImage(Image *image, int srcX, int srcY,
int desiredWidth, int desiredHeight,
bool useColor)
{
- return drawRescaledImage(image, srcX, srcY,
- dstX, dstY,
- width, height,
- desiredWidth, desiredHeight,
- useColor, true);
-}
-
-bool OpenGLGraphics::drawRescaledImage(Image *image, int srcX, int srcY,
- int dstX, int dstY,
- int width, int height,
- int desiredWidth, int desiredHeight,
- bool useColor, bool smooth)
-{
if (!image)
return false;
@@ -313,11 +300,6 @@ bool OpenGLGraphics::drawRescaledImage(Image *image, int srcX, int srcY,
width, height, useColor);
}
- // When the desired image is smaller than the current one,
- // disable smooth effect.
- if (width > desiredWidth && height > desiredHeight)
- smooth = false;
-
srcX += image->mBounds.x;
srcY += image->mBounds.y;
@@ -332,20 +314,6 @@ bool OpenGLGraphics::drawRescaledImage(Image *image, int srcX, int srcY,
drawRescaledQuad(image, srcX, srcY, dstX, dstY, width, height,
desiredWidth, desiredHeight);
- if (smooth) // A basic smooth effect...
- {
- glColor4f(1.0f, 1.0f, 1.0f, 0.2f);
- drawRescaledQuad(image, srcX, srcY, dstX - 1, dstY - 1, width, height,
- desiredWidth + 1, desiredHeight + 1);
- drawRescaledQuad(image, srcX, srcY, dstX + 1, dstY + 1, width, height,
- desiredWidth - 1, desiredHeight - 1);
-
- drawRescaledQuad(image, srcX, srcY, dstX + 1, dstY, width, height,
- desiredWidth - 1, desiredHeight);
- drawRescaledQuad(image, srcX, srcY, dstX, dstY + 1, width, height,
- desiredWidth, desiredHeight - 1);
- }
-
if (!useColor)
{
glColor4ub(static_cast<GLubyte>(mColor.r),
@@ -652,7 +620,6 @@ void OpenGLGraphics::_beginDraw()
glLoadIdentity();
glEnable(GL_SCISSOR_TEST);
- glEnableClientState(GL_VERTEX_ARRAY);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -791,10 +758,6 @@ void OpenGLGraphics::fillRectangle(const gcn::Rectangle& rect)
drawRectangle(rect, true);
}
-void OpenGLGraphics::setTargetPlane(int width, int height)
-{
-}
-
void OpenGLGraphics::setTexturingAndBlending(bool enable)
{
if (enable)