optimize graphics performance

This commit is contained in:
Eduardo Bart
2012-04-08 16:28:03 -03:00
parent c93732a44a
commit 92bd1aba54
14 changed files with 121 additions and 83 deletions

View File

@@ -77,8 +77,10 @@ void Painter::drawTexturedRect(const Rect& dest, const TexturePtr& texture, cons
return;
m_coordsBuffer.clear();
m_coordsBuffer.addRect(dest, src);
drawTextureCoords(m_coordsBuffer, texture);
m_coordsBuffer.addQuad(dest, src);
PainterShaderProgramPtr& program = m_customProgram ? m_customProgram : m_drawTexturedProgram;
program->setTexture(texture);
drawProgram(program, m_coordsBuffer, PainterShaderProgram::TriangleStrip);
}
void Painter::drawRepeatedTexturedRect(const Rect& dest, const TexturePtr& texture, const Rect& src)