Exemplo n.º 1
0
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);
}
Exemplo n.º 2
0
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);
}
Exemplo n.º 3
0
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);
}