mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 13:08:49 -05:00
Fix bug introduced by setting different blend modes for individual render targets
This commit is contained in:
@@ -710,7 +710,7 @@ void RenderableBillboardsCloud::renderBillboards(const RenderData& data,
|
||||
glDepthMask(false);
|
||||
|
||||
// Saving current OpenGL state
|
||||
GLboolean blendEnabled = glIsEnabled(GL_BLEND);
|
||||
GLboolean blendEnabled = glIsEnabledi(GL_BLEND, 0);
|
||||
GLenum blendEquationRGB;
|
||||
GLenum blendEquationAlpha;
|
||||
GLenum blendDestAlpha;
|
||||
@@ -725,7 +725,7 @@ void RenderableBillboardsCloud::renderBillboards(const RenderData& data,
|
||||
glGetIntegerv(GL_BLEND_SRC_ALPHA, &blendSrcAlpha);
|
||||
glGetIntegerv(GL_BLEND_SRC_RGB, &blendSrcRGB);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glEnablei(GL_BLEND, 0);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
|
||||
//glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
@@ -807,7 +807,7 @@ void RenderableBillboardsCloud::renderBillboards(const RenderData& data,
|
||||
glBlendFuncSeparate(blendSrcRGB, blendDestRGB, blendSrcAlpha, blendDestAlpha);
|
||||
|
||||
if (!blendEnabled) {
|
||||
glDisable(GL_BLEND);
|
||||
glDisablei(GL_BLEND, 0);
|
||||
}
|
||||
|
||||
glDepthMask(true);
|
||||
|
||||
@@ -458,7 +458,7 @@ void RenderableDUMeshes::renderMeshes(const RenderData&,
|
||||
GLfloat lineWidth = 1.0f;
|
||||
glGetFloatv(GL_LINE_WIDTH, &lineWidth);
|
||||
|
||||
GLboolean blendEnabled = glIsEnabled(GL_BLEND);
|
||||
GLboolean blendEnabled = glIsEnabledi(GL_BLEND, 0);
|
||||
GLenum blendEquationRGB;
|
||||
GLenum blendEquationAlpha;
|
||||
GLenum blendDestAlpha;
|
||||
@@ -473,7 +473,7 @@ void RenderableDUMeshes::renderMeshes(const RenderData&,
|
||||
glGetIntegerv(GL_BLEND_SRC_ALPHA, &blendSrcAlpha);
|
||||
glGetIntegerv(GL_BLEND_SRC_RGB, &blendSrcRGB);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glEnablei(GL_BLEND, 0);
|
||||
//glBlendFunc(GL_SRC_ALPHA, GL_ONE);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glDepthMask(false);
|
||||
@@ -516,7 +516,7 @@ void RenderableDUMeshes::renderMeshes(const RenderData&,
|
||||
glDepthMask(true);
|
||||
|
||||
if (!blendEnabled) {
|
||||
glDisable(GL_BLEND);
|
||||
glDisablei(GL_BLEND, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -578,7 +578,7 @@ void RenderablePlanesCloud::renderPlanes(const RenderData&,
|
||||
const float fadeInVariable)
|
||||
{
|
||||
// Saving current OpenGL state
|
||||
GLboolean blendEnabled = glIsEnabled(GL_BLEND);
|
||||
GLboolean blendEnabled = glIsEnabledi(GL_BLEND, 0);
|
||||
GLenum blendEquationRGB;
|
||||
GLenum blendEquationAlpha;
|
||||
GLenum blendDestAlpha;
|
||||
@@ -593,7 +593,7 @@ void RenderablePlanesCloud::renderPlanes(const RenderData&,
|
||||
glGetIntegerv(GL_BLEND_SRC_ALPHA, &blendSrcAlpha);
|
||||
glGetIntegerv(GL_BLEND_SRC_RGB, &blendSrcRGB);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glEnablei(GL_BLEND, 0);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
|
||||
//glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glDepthMask(false);
|
||||
@@ -671,7 +671,7 @@ void RenderablePlanesCloud::renderPlanes(const RenderData&,
|
||||
glDepthMask(true);
|
||||
|
||||
if (!blendEnabled) {
|
||||
glDisable(GL_BLEND);
|
||||
glDisablei(GL_BLEND, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user