mirror of
https://github.com/edubart/otclient.git
synced 2025-05-02 10:39:21 +02:00
non relevant drawing changes
This commit is contained in:
parent
dc08ba2e17
commit
efd17361f8
@ -133,10 +133,10 @@ void PainterOGL1::drawTexturedRect(const Rect& dest, const TexturePtr& texture,
|
||||
if(dest.isEmpty() || src.isEmpty() || !texture->getId())
|
||||
return;
|
||||
|
||||
setTexture(texture.get());
|
||||
|
||||
m_coordsBuffer.clear();
|
||||
m_coordsBuffer.addQuad(dest, src);
|
||||
|
||||
setTexture(texture.get());
|
||||
drawCoords(m_coordsBuffer, TriangleStrip);
|
||||
}
|
||||
|
||||
@ -145,10 +145,10 @@ void PainterOGL1::drawRepeatedTexturedRect(const Rect& dest, const TexturePtr& t
|
||||
if(dest.isEmpty() || src.isEmpty() || !texture->getId())
|
||||
return;
|
||||
|
||||
setTexture(texture.get());
|
||||
|
||||
m_coordsBuffer.clear();
|
||||
m_coordsBuffer.addRepeatedRects(dest, src);
|
||||
|
||||
setTexture(texture.get());
|
||||
drawCoords(m_coordsBuffer);
|
||||
}
|
||||
|
||||
@ -157,10 +157,10 @@ void PainterOGL1::drawFilledRect(const Rect& dest)
|
||||
if(dest.isEmpty())
|
||||
return;
|
||||
|
||||
setTexture(nullptr);
|
||||
|
||||
m_coordsBuffer.clear();
|
||||
m_coordsBuffer.addRect(dest);
|
||||
|
||||
setTexture(nullptr);
|
||||
drawCoords(m_coordsBuffer);
|
||||
}
|
||||
|
||||
@ -169,10 +169,10 @@ void PainterOGL1::drawBoundingRect(const Rect& dest, int innerLineWidth)
|
||||
if(dest.isEmpty() || innerLineWidth == 0)
|
||||
return;
|
||||
|
||||
setTexture(nullptr);
|
||||
|
||||
m_coordsBuffer.clear();
|
||||
m_coordsBuffer.addBoudingRect(dest, innerLineWidth);
|
||||
|
||||
setTexture(nullptr);
|
||||
drawCoords(m_coordsBuffer);
|
||||
}
|
||||
|
||||
|
@ -113,11 +113,11 @@ void PainterOGL2::drawTexturedRect(const Rect& dest, const TexturePtr& texture,
|
||||
if(dest.isEmpty() || src.isEmpty() || !texture->getId())
|
||||
return;
|
||||
|
||||
m_coordsBuffer.clear();
|
||||
m_coordsBuffer.addQuad(dest, src);
|
||||
|
||||
setDrawProgram(m_shaderProgram ? m_shaderProgram : g_shaders.getDrawTexturedProgram().get());
|
||||
setTexture(texture);
|
||||
|
||||
m_coordsBuffer.clear();
|
||||
m_coordsBuffer.addQuad(dest, src);
|
||||
drawCoords(m_coordsBuffer, TriangleStrip);
|
||||
}
|
||||
|
||||
@ -126,11 +126,11 @@ void PainterOGL2::drawRepeatedTexturedRect(const Rect& dest, const TexturePtr& t
|
||||
if(dest.isEmpty() || src.isEmpty() || !texture->getId())
|
||||
return;
|
||||
|
||||
m_coordsBuffer.clear();
|
||||
m_coordsBuffer.addRepeatedRects(dest, src);
|
||||
|
||||
setDrawProgram(m_shaderProgram ? m_shaderProgram : g_shaders.getDrawTexturedProgram().get());
|
||||
setTexture(texture);
|
||||
|
||||
m_coordsBuffer.clear();
|
||||
m_coordsBuffer.addRepeatedRects(dest, src);
|
||||
drawCoords(m_coordsBuffer);
|
||||
}
|
||||
|
||||
@ -139,10 +139,10 @@ void PainterOGL2::drawFilledRect(const Rect& dest)
|
||||
if(dest.isEmpty())
|
||||
return;
|
||||
|
||||
setDrawProgram(m_shaderProgram ? m_shaderProgram : g_shaders.getDrawSolidColorProgram().get());
|
||||
|
||||
m_coordsBuffer.clear();
|
||||
m_coordsBuffer.addRect(dest);
|
||||
|
||||
setDrawProgram(m_shaderProgram ? m_shaderProgram : g_shaders.getDrawSolidColorProgram().get());
|
||||
drawCoords(m_coordsBuffer);
|
||||
}
|
||||
|
||||
@ -151,9 +151,9 @@ void PainterOGL2::drawBoundingRect(const Rect& dest, int innerLineWidth)
|
||||
if(dest.isEmpty() || innerLineWidth == 0)
|
||||
return;
|
||||
|
||||
setDrawProgram(m_shaderProgram ? m_shaderProgram : g_shaders.getDrawSolidColorProgram().get());
|
||||
|
||||
m_coordsBuffer.clear();
|
||||
m_coordsBuffer.addBoudingRect(dest, innerLineWidth);
|
||||
|
||||
setDrawProgram(m_shaderProgram ? m_shaderProgram : g_shaders.getDrawSolidColorProgram().get());
|
||||
drawCoords(m_coordsBuffer);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user