1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

#Fixed bug with GL_COLOR_WRITEMASK

This commit is contained in:
mzernova 2024-07-15 11:14:36 +01:00
parent 783cdc351b
commit 2ecf6008fa

View File

@ -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();