mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-26 09:02:44 -06:00
Fix logic ops not being enabled in the OpenGL renderer
This commit is contained in:
parent
dc48deaecc
commit
350082ab75
2 changed files with 3 additions and 4 deletions
|
@ -168,6 +168,8 @@ RasterizerOpenGL::RasterizerOpenGL() : shader_dirty(true) {
|
||||||
glActiveTexture(TextureUnits::ProcTexDiffLUT.Enum());
|
glActiveTexture(TextureUnits::ProcTexDiffLUT.Enum());
|
||||||
glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA32F, proctex_diff_lut_buffer.handle);
|
glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA32F, proctex_diff_lut_buffer.handle);
|
||||||
|
|
||||||
|
glEnable(GL_BLEND);
|
||||||
|
|
||||||
// Sync fixed function OpenGL state
|
// Sync fixed function OpenGL state
|
||||||
SyncClipEnabled();
|
SyncClipEnabled();
|
||||||
SyncClipCoef();
|
SyncClipCoef();
|
||||||
|
|
|
@ -33,7 +33,7 @@ OpenGLState::OpenGLState() {
|
||||||
stencil.action_depth_pass = GL_KEEP;
|
stencil.action_depth_pass = GL_KEEP;
|
||||||
stencil.action_stencil_fail = GL_KEEP;
|
stencil.action_stencil_fail = GL_KEEP;
|
||||||
|
|
||||||
blend.enabled = false;
|
blend.enabled = true;
|
||||||
blend.rgb_equation = GL_FUNC_ADD;
|
blend.rgb_equation = GL_FUNC_ADD;
|
||||||
blend.a_equation = GL_FUNC_ADD;
|
blend.a_equation = GL_FUNC_ADD;
|
||||||
blend.src_rgb_func = GL_ONE;
|
blend.src_rgb_func = GL_ONE;
|
||||||
|
@ -148,9 +148,6 @@ void OpenGLState::Apply() const {
|
||||||
if (blend.enabled != cur_state.blend.enabled) {
|
if (blend.enabled != cur_state.blend.enabled) {
|
||||||
if (blend.enabled) {
|
if (blend.enabled) {
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
|
|
||||||
cur_state.logic_op = GL_COPY;
|
|
||||||
glLogicOp(cur_state.logic_op);
|
|
||||||
glDisable(GL_COLOR_LOGIC_OP);
|
glDisable(GL_COLOR_LOGIC_OP);
|
||||||
} else {
|
} else {
|
||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
|
|
Loading…
Reference in a new issue