mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
#Fixed bug with GL_COLOR_WRITEMASK
This commit is contained in:
@@ -884,9 +884,9 @@ void OpenGl_LayerList::UpdateOcclusion( const Handle(OpenGl_Workspace) & theWork
|
|||||||
|
|
||||||
|
|
||||||
// Remember global settings for glDepth mask and write mask
|
// Remember global settings for glDepth mask and write mask
|
||||||
GLboolean aPrevColorMask;
|
GLboolean aPrevColorMask[4];
|
||||||
GLboolean aPrevDepthMask;
|
GLboolean aPrevDepthMask;
|
||||||
aCtx->core11fwd->glGetBooleanv(GL_COLOR_WRITEMASK, &aPrevColorMask);
|
aCtx->core11fwd->glGetBooleanv(GL_COLOR_WRITEMASK, aPrevColorMask);
|
||||||
aCtx->core11fwd->glGetBooleanv(GL_DEPTH_WRITEMASK, &aPrevDepthMask);
|
aCtx->core11fwd->glGetBooleanv(GL_DEPTH_WRITEMASK, &aPrevDepthMask);
|
||||||
|
|
||||||
// Turn off writing to depth and color buffers
|
// 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
|
// Back to prev settings
|
||||||
aCtx->core11fwd->glDepthMask(aPrevDepthMask);
|
aCtx->core11fwd->glDepthMask(aPrevDepthMask);
|
||||||
aCtx->core11fwd->glColorMask(aPrevColorMask, aPrevColorMask, aPrevColorMask, aPrevColorMask);
|
aCtx->core11fwd->glColorMask(aPrevColorMask[0], aPrevColorMask[1], aPrevColorMask[2], aPrevColorMask[3]);
|
||||||
|
|
||||||
aTimer.Stop();
|
aTimer.Stop();
|
||||||
aStats->ActiveDataFrame()[Graphic3d_FrameStatsTimer_CpuCulling] = aTimer.UserTimeCPU();
|
aStats->ActiveDataFrame()[Graphic3d_FrameStatsTimer_CpuCulling] = aTimer.UserTimeCPU();
|
||||||
|
Reference in New Issue
Block a user