Archived issue #0025893
Visualization, TKOpenGl - do not use uninitialized memory to track Clipping Planes state
Description
Within current code of OpenGl_View::Render(), the clipping planes are managed in weird way:
while plane equation is retrieved from context, enabled state is not (moreover if MMGT_CLEAR will be set to false the flag will be uninitialized).
for (Standard_Integer aClipPlaneId = aOldPlanes.Lower(); aClipPlaneId <= aOldPlanes.Upper(); ++aClipPlaneId)
{
OPENGL_CLIP_PLANE& aPlane = aOldPlanes.ChangeValue (aClipPlaneId);
aContext->core11->glGetClipPlane (aClipPlaneId, aPlane.Equation);
if (aPlane.isEnabled)
while plane equation is retrieved from context, enabled state is not (moreover if MMGT_CLEAR will be set to false the flag will be uninitialized).
Steps to reproduce
N/A
Public activity
12 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: isk
Date: Mon Apr 6 18:25:04 2015 +0300
0025893: Visualization, TKOpenGl - do not use uninitialized memory to track Clipping Planes state
[revision removed]
Detailed log of new commits:
Author: isk
Date: Mon Apr 6 18:25:04 2015 +0300
0025893: Visualization, TKOpenGl - do not use uninitialized memory to track Clipping Planes state
It is suggested to drop code for retrieving and restoring clipping planes from context and keep only disabling.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: isk
Date: Tue Apr 7 10:04:17 2015 +0300
Drop code for retrieving and restoring clipping planes
[revision removed]
Detailed log of new commits:
Author: isk
Date: Tue Apr 7 10:04:17 2015 +0300
Drop code for retrieving and restoring clipping planes
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: isk
Date: Tue Apr 7 10:57:48 2015 +0300
0025893: Visualization, TKOpenGl - do not use uninitialized memory to track Clipping Planes state
[revision removed]
Detailed log of new commits:
Author: isk
Date: Tue Apr 7 10:57:48 2015 +0300
0025893: Visualization, TKOpenGl - do not use uninitialized memory to track Clipping Planes state
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: isk
Date: Tue Apr 7 11:14:57 2015 +0300
0025893: Visualization, TKOpenGl - do not use uninitialized memory to track Clipping Planes state
[revision removed]
Detailed log of new commits:
Author: isk
Date: Tue Apr 7 11:14:57 2015 +0300
0025893: Visualization, TKOpenGl - do not use uninitialized memory to track Clipping Planes state
Please test the patch in branch CR25893_2.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been rebased on the current master
Dear Commenter 1,
Branch CR25893_2 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 18 (18 on master)
Windows: 0 (0 on master)
products component:
Linux: 4 (4 on master)
Windows: 0 (0 on master)
Regressions/Differences:
Not detected
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 93718510 / 93951977 [-0.25%]
Total CPU difference: 54592.32999999897 / 52005.719999999616 [+4.97%]
Testing on Windows:
Total MEMORY difference: 57065540 / 57074762 [-0.02%]
Total CPU difference: 16163.232409798904 / 16635.463036899022 [-2.84%]
Branch CR25893_2 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 18 (18 on master)
Windows: 0 (0 on master)
products component:
Linux: 4 (4 on master)
Windows: 0 (0 on master)
Regressions/Differences:
Not detected
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 93718510 / 93951977 [-0.25%]
Total CPU difference: 54592.32999999897 / 52005.719999999616 [+4.97%]
Testing on Windows:
Total MEMORY difference: 57065540 / 57074762 [-0.02%]
Total CPU difference: 16163.232409798904 / 16635.463036899022 [-2.84%]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]