enable alpha blending in drawing by GL/Program

This commit is contained in:
2022-11-12 22:41:08 +09:00
parent c5a357c10c
commit 9038511525

View File

@@ -193,8 +193,14 @@ void Obj_ProgramMeta::ApplyState() const noexcept {
glDepthRange(depth->near, depth->far);
glDepthFunc(gl::ToEnum(depth->func));
}
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
void Obj_ProgramMeta::RevertState() const noexcept {
glBlendFunc(GL_ONE, GL_ZERO);
glDisable(GL_BLEND);
if (depth) {
glDisable(GL_DEPTH_TEST);
}