View Issue Details

IDProjectCategoryView StatusLast Update
0024131Open CASCADEOCCT:Visualizationpublic2013-12-19 14:00
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Target Version6.7.0Fixed in Version6.7.0 
Summary0024131: TKOpenGL redesign GPU memory management for markers presentation
DescriptionCurrent implementation uses global list of OpenGL resources for markers presentation (display lists). This leads to broken markers presentation in case of multiple graphical drivers usage and their creation / destruction.

Also usage of glBitmap is very slow. Texture-based point sprites should be used instead on modern hardware.
Additional information
and documentation updates
Porting remarks
============================

Graphic3d_Group::Marker() and Graphic3d_Group::MarkerSet() have been removed.
Graphic3d_Group::AddPrimitiveArray() should be used instead to specify marker(s) array.

Graphic3d_AspectMarker3d class has been redesigned. Code of custom markers initialization should be updated. Notice that you can reuse old markers definition code as TColStd_HArray1OfByte, however Image_PixMap is now preferred way (and supports full-color images on modern hardware).
TagsNo tags attached.
Test case numberbugs vis(004) bug24131_markers

Attached Files

  • bug24131_markers_bitmaps.png (35,107 bytes)
  • bug24131_markers_sprites.png (35,972 bytes)

Relationships

duplicate of 0023817 closedbugmaster Open CASCADE Marker primitives presentation in TKOpenGl should be redesigned 
parent of 0024148 closedbugmaster Open CASCADE Test case bugs/vis/bug24131_markers works wrong with software MS OpenGL 
has duplicate 0002840 closedbugmaster Open CASCADE Using Graphic3d_ArrayOfPoints doesn't allow to change the marker color, type 
related to 0024158 closedbugmaster Open CASCADE OpenGl_AspectMarker - debug assert on destruction of Alpha texture shared between multiple RGB texture 
related to 0024368 closedPawel Community Intel HD Graphics 4000: Problem displaying point markers with recent drivers 
child of 0023028 closedbugmaster Open CASCADE Visualization, TKOpenGl - eliminate global static variables 
child of 0023484 closedbugmaster Open CASCADE Visualization, TKOpenGl - primitive arrays to become the only way to render geometry 

Activities

kgv

2013-08-29 00:27

developer   ~0025406

Initial patch is ready for review in CR24131_1 branch (based on CR24123 branch which introduces OpenGl_Caps structure).

kgv

2013-08-29 09:51

developer   ~0025407

Branch CR24131_1 of products repository contains update for 2 samples (migration from MarkerSet() to AddPrimitiveArray()).

kgv

2013-08-29 11:09

developer   ~0025411

vmarkerstest m 0 0 0 MarkerType=3 Scale=5 PointsOnSide=30

Performance comparison (GeForce GT 610):
- Bitmaps, FPS: 8.6; CPU: 117.3 msec
- Sprites, FPS: 61; CPU: 5.3 msec

kgv

2013-08-29 11:15

developer  

bug24131_markers_bitmaps.png (35,107 bytes)

kgv

2013-08-29 11:15

developer  

bug24131_markers_sprites.png (35,972 bytes)

san

2013-08-30 17:06

developer   ~0025420

Branch CR24131_1 reviewed without remarks, ready for testing.

kgv

2013-08-30 17:15

developer   ~0025423

Last edited: 2013-08-30 21:11

Re-based branch CR24131_2 has been prepared for testing (CR24131_1 in products repository).

Branch CR24131_2 has been updated (fix auto-merge broken result).

mkv

2013-09-04 17:19

tester   ~0025454

Dear BugMaster,

Branch CR24131_2 from occt-GIT master was compiled on Linux and Windows platforms and tested.
SHA-1: fca24016c9b79592c00811b05c514e7a43f2d547
Branch CR24131_1 from products-GIT master was compiled on Linux and Windows platforms and tested.
SHA-1: 98e4a4cd537d15d41885f0f1061c0d42fa54a69b

Number of compiler warnings:

occt component :
Linux: 781 (781 on master)
Windows: 392 (386 on master)

products component :
Linux: 189 (191 on master)
Windows: 287 (287 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
http://occt-tests/CR24131-2-CR24131-1-occt/Windows-32-VC9/bugs/vis/bug24131_markers.html
http://occt-tests/CR24131-2-CR24131-1-occt/Debian60-64/bugs/vis/bug24131_markers.html
bugs vis bug24131_markers - OK.

Testing on Linux:
Total MEMORY difference: 364021596 / 363583220
Total CPU difference: 43598.720000001136 / 42444.21000000113

Testing on Windows:
Total MEMORY difference: 427020384 / 428697760
Total CPU difference: 48130.84375 / 31125.640625

There are not differences in images found by testdiff.

Related Changesets

occt: master a577aaab

2013-08-30 16:37:02

kgv


Committer: bugmaster Details Diff
0024131: TKOpenGL redesign GPU memory management for markers presentation

Introduce Point Sprites usage.
Graphic3d_Group - drop Marker(),MarkerSet() methods - markers should be drawn using AddPrimitiveArray.
Added new Draw Harness commands vcaps, vmarkerstest.
Affected Issues
0024131
mod - samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp Diff File
mod - samples/mfc/standard/Common/OCC_2dView.cpp Diff File
mod - samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp Diff File
mod - samples/mfc/standard/Common/Primitive/Sample2D_Markers.h Diff File
mod - src/AIS/AIS_Point.cxx Diff File
mod - src/Aspect/Aspect.cdl Diff File
mod - src/Aspect/Aspect_MarkerStyle.cxx Diff File
mod - src/DsgPrs/DsgPrs.cxx Diff File
mod - src/DsgPrs/DsgPrs_FixPresentation.cxx Diff File
mod - src/DsgPrs/DsgPrs_IdenticPresentation.cxx Diff File
mod - src/DsgPrs/DsgPrs_OffsetPresentation.cxx Diff File
mod - src/DsgPrs/DsgPrs_SymmetricPresentation.cxx Diff File
mod - src/Graphic3d/FILES Diff File
mod - src/Graphic3d/Graphic3d.cdl Diff File
mod - src/Graphic3d/Graphic3d_ArrayOfPoints.cdl Diff File
mod - src/Graphic3d/Graphic3d_ArrayOfPoints.cxx Diff File
mod - src/Graphic3d/Graphic3d_AspectMarker3d.cdl Diff File
mod - src/Graphic3d/Graphic3d_AspectMarker3d.cxx Diff File
mod - src/Graphic3d/Graphic3d_CGroup.hxx Diff File
mod - src/Graphic3d/Graphic3d_GraphicDriver.cdl Diff File
mod - src/Graphic3d/Graphic3d_Group.cdl Diff File
rm - src/Graphic3d/Graphic3d_Group_3.cxx Diff File
mod - src/Graphic3d/Graphic3d_Group_8.cxx Diff File
add - src/Graphic3d/Graphic3d_MarkerImage.cxx Diff File
add - src/Graphic3d/Graphic3d_MarkerImage.hxx Diff File
mod - src/Graphic3d/Graphic3d_Structure.cxx Diff File
mod - src/InterfaceGraphic/InterfaceGraphic_Graphic3d.hxx Diff File
mod - src/MeshVS/MeshVS_MeshPrsBuilder.cxx Diff File
mod - src/MeshVS/MeshVS_TextPrsBuilder.cxx Diff File
mod - src/OpenGl/FILES Diff File
mod - src/OpenGl/OpenGl_AspectMarker.cxx Diff File
mod - src/OpenGl/OpenGl_AspectMarker.hxx Diff File
mod - src/OpenGl/OpenGl_Caps.cxx Diff File
mod - src/OpenGl/OpenGl_Caps.hxx Diff File
mod - src/OpenGl/OpenGl_Display.cxx Diff File
mod - src/OpenGl/OpenGl_Display.hxx Diff File
mod - src/OpenGl/OpenGl_Display_2.cxx Diff File
mod - src/OpenGl/OpenGl_GraphicDriver.hxx Diff File
mod - src/OpenGl/OpenGl_GraphicDriver_3.cxx Diff File
mod - src/OpenGl/OpenGl_GraphicDriver_4.cxx Diff File
rm - src/OpenGl/OpenGl_GraphicDriver_703.cxx Diff File
mod - src/OpenGl/OpenGl_Group.cxx Diff File
mod - src/OpenGl/OpenGl_Group.hxx Diff File
rm - src/OpenGl/OpenGl_Marker.cxx Diff File
rm - src/OpenGl/OpenGl_MarkerSet.cxx Diff File
add - src/OpenGl/OpenGl_PointSprite.cxx Diff File
add - src/OpenGl/OpenGl_PointSprite.hxx Diff File
mod - src/OpenGl/OpenGl_PrimitiveArray.cxx Diff File
mod - src/OpenGl/OpenGl_PrimitiveArray.hxx Diff File
mod - src/OpenGl/OpenGl_Structure.cxx Diff File
mod - src/OpenGl/OpenGl_Structure.hxx Diff File
mod - src/OpenGl/OpenGl_Texture.cxx Diff File
mod - src/OpenGl/OpenGl_Texture.hxx Diff File
mod - src/OpenGl/OpenGl_Workspace.cxx Diff File
mod - src/OpenGl/OpenGl_Workspace_2.cxx Diff File
mod - src/Prs3d/Prs3d_Point.hxx Diff File
mod - src/Prs3d/Prs3d_PointAspect.cdl Diff File
mod - src/Prs3d/Prs3d_PointAspect.cxx Diff File
mod - src/Prs3d/Prs3d_WFShape.cxx Diff File
mod - src/StdSelect/StdSelect_ViewerSelector3d.cxx Diff File
mod - src/V3d/V3d_CircularGrid.cxx Diff File
mod - src/V3d/V3d_RectangularGrid.cxx Diff File
mod - src/V3d/V3d_Viewer_4.cxx Diff File
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File
add - tests/bugs/vis/bug24131_markers Diff File

Issue History

Date Modified Username Field Change
2013-08-27 20:52 kgv New Issue
2013-08-27 20:52 kgv Assigned To => kgv
2013-08-27 20:53 kgv Relationship added child of 0023028
2013-08-29 00:20 kgv Relationship added child of 0023484
2013-08-29 00:26 kgv Additional Information Updated
2013-08-29 00:26 kgv Assigned To kgv => dbv
2013-08-29 00:26 kgv Status new => assigned
2013-08-29 00:27 kgv Note Added: 0025406
2013-08-29 00:27 kgv Assigned To dbv => san
2013-08-29 00:27 kgv Status assigned => resolved
2013-08-29 09:51 kgv Note Added: 0025407
2013-08-29 11:09 kgv Note Added: 0025411
2013-08-29 11:15 kgv File Added: bug24131_markers_bitmaps.png
2013-08-29 11:15 kgv File Added: bug24131_markers_sprites.png
2013-08-29 11:44 kgv Relationship added duplicate of 0023817
2013-08-29 11:45 kgv Relationship added has duplicate 0002840
2013-08-30 17:06 san Note Added: 0025420
2013-08-30 17:06 san Assigned To san => bugmaster
2013-08-30 17:06 san Status resolved => reviewed
2013-08-30 17:15 kgv Note Added: 0025423
2013-08-30 18:49 mkv Assigned To bugmaster => mkv
2013-08-30 21:11 kgv Note Edited: 0025423
2013-09-04 17:19 mkv Note Added: 0025454
2013-09-04 17:22 mkv Test case number => bugs vis(004) bug24131_markers
2013-09-04 17:22 mkv Assigned To mkv => bugmaster
2013-09-04 17:22 mkv Status reviewed => tested
2013-09-06 11:28 apn Relationship added parent of 0024148
2013-09-06 14:36 bugmaster Changeset attached => occt master a577aaab
2013-09-06 14:36 bugmaster Status tested => verified
2013-09-06 14:36 bugmaster Resolution open => fixed
2013-09-10 14:25 kgv Relationship added related to 0024158
2013-11-01 15:41 san Additional Information Updated
2013-11-19 14:38 san Relationship added related to 0024368
2013-12-19 13:50 bugmaster Status verified => closed
2013-12-19 14:00 bugmaster Fixed in Version => 6.7.0