From 2ecf6008fa1f4a522fa4fefdc3cc4952182988bc Mon Sep 17 00:00:00 2001 From: mzernova Date: Mon, 15 Jul 2024 11:14:36 +0100 Subject: [PATCH] #Fixed bug with GL_COLOR_WRITEMASK --- src/OpenGl/OpenGl_LayerList.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenGl/OpenGl_LayerList.cxx b/src/OpenGl/OpenGl_LayerList.cxx index 65d4bdac2e..7a7c5d0145 100644 --- a/src/OpenGl/OpenGl_LayerList.cxx +++ b/src/OpenGl/OpenGl_LayerList.cxx @@ -884,9 +884,9 @@ void OpenGl_LayerList::UpdateOcclusion( const Handle(OpenGl_Workspace) & theWork // Remember global settings for glDepth mask and write mask - GLboolean aPrevColorMask; + GLboolean aPrevColorMask[4]; GLboolean aPrevDepthMask; - aCtx->core11fwd->glGetBooleanv(GL_COLOR_WRITEMASK, &aPrevColorMask); + aCtx->core11fwd->glGetBooleanv(GL_COLOR_WRITEMASK, aPrevColorMask); aCtx->core11fwd->glGetBooleanv(GL_DEPTH_WRITEMASK, &aPrevDepthMask); // Turn off writing to depth and color buffers @@ -930,7 +930,7 @@ void OpenGl_LayerList::UpdateOcclusion( const Handle(OpenGl_Workspace) & theWork // Back to prev settings aCtx->core11fwd->glDepthMask(aPrevDepthMask); - aCtx->core11fwd->glColorMask(aPrevColorMask, aPrevColorMask, aPrevColorMask, aPrevColorMask); + aCtx->core11fwd->glColorMask(aPrevColorMask[0], aPrevColorMask[1], aPrevColorMask[2], aPrevColorMask[3]); aTimer.Stop(); aStats->ActiveDataFrame()[Graphic3d_FrameStatsTimer_CpuCulling] = aTimer.UserTimeCPU();