mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 06:23:26 +02:00
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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user