void PainterOGL2::drawTextureCoords(CoordsBuffer& coordsBuffer, const TexturePtr& texture) { if(texture && texture->isEmpty()) return; setDrawProgram(m_shaderProgram ? m_shaderProgram : m_drawTexturedProgram.get()); setTexture(texture); drawCoords(coordsBuffer); }
void PainterOGL2::drawRepeatedTexturedRect(const Rect& dest, const TexturePtr& texture, const Rect& src) { if(dest.isEmpty() || src.isEmpty() || texture->isEmpty()) return; setDrawProgram(m_shaderProgram ? m_shaderProgram : m_drawTexturedProgram.get()); setTexture(texture); m_coordsBuffer.clear(); m_coordsBuffer.addRepeatedRects(dest, src); drawCoords(m_coordsBuffer); }
void PainterOGL2::drawUpsideDownTexturedRect(const Rect& dest, const TexturePtr& texture, const Rect& src) { if(dest.isEmpty() || src.isEmpty() || texture->isEmpty()) return; setDrawProgram(m_shaderProgram ? m_shaderProgram : m_drawTexturedProgram.get()); setTexture(texture); m_coordsBuffer.clear(); m_coordsBuffer.addUpsideDownQuad(dest, src); drawCoords(m_coordsBuffer, TriangleStrip); }