mirror of
				https://github.com/edubart/otclient.git
				synced 2025-11-04 12:46:22 +01:00 
			
		
		
		
	Merge with 'master'
This commit is contained in:
		@@ -135,6 +135,12 @@ void PainterOGL1::drawCoords(CoordsBuffer& coordsBuffer, DrawMode drawMode)
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void PainterOGL1::drawFillCoords(CoordsBuffer& coordsBuffer)
 | 
			
		||||
{
 | 
			
		||||
    setTexture(nullptr);
 | 
			
		||||
    drawCoords(coordsBuffer);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void PainterOGL1::drawTextureCoords(CoordsBuffer& coordsBuffer, const TexturePtr& texture)
 | 
			
		||||
{
 | 
			
		||||
    if(texture->isEmpty())
 | 
			
		||||
 
 | 
			
		||||
@@ -50,6 +50,7 @@ public:
 | 
			
		||||
    void refreshState();
 | 
			
		||||
 | 
			
		||||
    void drawCoords(CoordsBuffer& coordsBuffer, DrawMode drawMode = Triangles);
 | 
			
		||||
    void drawFillCoords(CoordsBuffer& coordsBuffer);
 | 
			
		||||
    void drawTextureCoords(CoordsBuffer& coordsBuffer, const TexturePtr& texture);
 | 
			
		||||
    void drawTexturedRect(const Rect& dest, const TexturePtr& texture, const Rect& src);
 | 
			
		||||
    void drawUpsideDownTexturedRect(const Rect& dest, const TexturePtr& texture, const Rect& src);
 | 
			
		||||
 
 | 
			
		||||
@@ -120,6 +120,13 @@ void PainterOGL2::drawCoords(CoordsBuffer& coordsBuffer, DrawMode drawMode)
 | 
			
		||||
        PainterShaderProgram::enableAttributeArray(PainterShaderProgram::TEXCOORD_ATTR);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void PainterOGL2::drawFillCoords(CoordsBuffer& coordsBuffer)
 | 
			
		||||
{
 | 
			
		||||
    setDrawProgram(m_shaderProgram ? m_shaderProgram : m_drawSolidColorProgram.get());
 | 
			
		||||
    setTexture(nullptr);
 | 
			
		||||
    drawCoords(coordsBuffer);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void PainterOGL2::drawTextureCoords(CoordsBuffer& coordsBuffer, const TexturePtr& texture)
 | 
			
		||||
{
 | 
			
		||||
    if(texture && texture->isEmpty())
 | 
			
		||||
 
 | 
			
		||||
@@ -41,6 +41,7 @@ public:
 | 
			
		||||
    void unbind();
 | 
			
		||||
 | 
			
		||||
    void drawCoords(CoordsBuffer& coordsBuffer, DrawMode drawMode = Triangles);
 | 
			
		||||
    void drawFillCoords(CoordsBuffer& coordsBuffer);
 | 
			
		||||
    void drawTextureCoords(CoordsBuffer& coordsBuffer, const TexturePtr& texture);
 | 
			
		||||
    void drawTexturedRect(const Rect& dest, const TexturePtr& texture, const Rect& src);
 | 
			
		||||
    void drawUpsideDownTexturedRect(const Rect& dest, const TexturePtr& texture, const Rect& src);
 | 
			
		||||
 
 | 
			
		||||
@@ -62,6 +62,7 @@ public:
 | 
			
		||||
    virtual void clear(const Color& color) = 0;
 | 
			
		||||
 | 
			
		||||
    virtual void drawCoords(CoordsBuffer& coordsBuffer, DrawMode drawMode = Triangles) = 0;
 | 
			
		||||
    virtual void drawFillCoords(CoordsBuffer& coordsBuffer) = 0;
 | 
			
		||||
    virtual void drawTextureCoords(CoordsBuffer& coordsBuffer, const TexturePtr& texture) = 0;
 | 
			
		||||
    virtual void drawTexturedRect(const Rect& dest, const TexturePtr& texture, const Rect& src) = 0;
 | 
			
		||||
    void drawTexturedRect(const Rect& dest, const TexturePtr& texture) { drawTexturedRect(dest, texture, Rect(Point(0,0), texture->getSize())); }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user