some optimizations and compilation changes

* speedup render of widget images on low end devices using mipmaps
* changes in CMakeLists.txt to allow usage of distcc and crosscompiling
This commit is contained in:
Eduardo Bart
2012-02-20 11:10:54 -02:00
parent ba24e7ce39
commit 27b83fa722
4 changed files with 17 additions and 11 deletions

View File

@@ -160,6 +160,11 @@ void UIWidget::drawImage(const Rect& screenCoords)
}
m_imageTexture->setSmooth(m_imageSmooth);
// this will increase fps when rendering larger images, like the background, and improve image quality
if(m_imageSmooth && !m_imageTexture->hasMipmaps())
m_imageTexture->generateMipmaps();
g_painter.setColor(m_imageColor);
g_painter.drawTextureCoords(m_imageCoordsBuffer, m_imageTexture);
}