Add a flag to ImTextureID that disables alpha test
This commit is contained in:
@@ -270,6 +270,16 @@ void GLImmediateDrawer::End() {
|
||||
}
|
||||
}
|
||||
|
||||
void GLImmediateDrawer::EnableAlphaTest(bool enable) {
|
||||
if (enable) {
|
||||
glEnablei(GL_BLEND, 0);
|
||||
glBlendEquationi(0, GL_FUNC_ADD);
|
||||
glBlendFunci(0, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
} else {
|
||||
glDisablei(GL_BLEND, 0);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace gl
|
||||
} // namespace ui
|
||||
} // namespace xe
|
||||
|
||||
@@ -37,6 +37,8 @@ class GLImmediateDrawer : public ImmediateDrawer {
|
||||
void EndDrawBatch() override;
|
||||
void End() override;
|
||||
|
||||
void EnableAlphaTest(bool enable);
|
||||
|
||||
private:
|
||||
void InitializeShaders();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user