mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 13:03:27 +02:00
fix walk freeze, fix some texts displaying in pink
This commit is contained in:
@@ -134,5 +134,11 @@ void Painter::setCompositionMode(Painter::CompositionMode compositionMode)
|
||||
case CompositionMode_Add:
|
||||
glBlendFunc(GL_ONE, GL_ONE);
|
||||
break;
|
||||
case CompositionMode_Replace:
|
||||
glBlendFunc(GL_ONE, GL_ZERO);
|
||||
break;
|
||||
case CompositionMode_DestBlending:
|
||||
glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_DST_ALPHA);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -34,7 +34,9 @@ public:
|
||||
enum CompositionMode {
|
||||
CompositionMode_Normal,
|
||||
CompositionMode_Multiply,
|
||||
CompositionMode_Add
|
||||
CompositionMode_Add,
|
||||
CompositionMode_Replace,
|
||||
CompositionMode_DestBlending
|
||||
};
|
||||
|
||||
void init();
|
||||
|
@@ -61,7 +61,7 @@ void UIWidget::drawText(const Rect& screenCoords)
|
||||
m_textFramebuffer->bind();
|
||||
Rect virtualTextRect(0, 0, boxSize);
|
||||
virtualTextRect.translate(m_textOffset);
|
||||
g_painter.setCompositionMode(Painter::CompositionMode_Add);
|
||||
g_painter.setCompositionMode(Painter::CompositionMode_DestBlending);
|
||||
m_font->renderText(m_text, virtualTextRect, m_textAlign, Fw::white);
|
||||
g_painter.resetCompositionMode();
|
||||
m_textFramebuffer->release();
|
||||
|
Reference in New Issue
Block a user