View Issue Details

IDProjectCategoryView StatusLast Update
0031705Open CASCADEOCCT:Visualizationpublic2020-12-19 15:23
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityintegration request 
Status closedResolutionfixed 
Target Version7.6.0Fixed in Version7.6.0 
Summary0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage
DescriptionCurrently, the logic defining standard marker images is built in into OpenGl_AspectsSprite. This is suboptimal location of this logic, as it prevents reusing definitions across different graphic drivers.

Therefore, it is proposed moving definition to Graphic3d_MarkerImage class (an interface to be defined).
Steps To ReproduceNot required
TagsNo tags attached.
Test case numberNot required

Relationships

related to 0031704 closedbugmaster Visualization - add an interactive object AIS_LightSource representing a light source 
related to 0026791 assignedvpozdyayev Visualization, TKOpenGl - apply view resolution to built-in markers 
child of 0030631 newvpozdyayev Visualization - Vulkan graphic driver prototype 

Activities

git

2020-11-06 15:56

administrator   ~0096595

Branch CR31705_6 has been created by mkrylova.

SHA-1: 9df5ab1ed76a7ff0087e1fb687f123879d59e674


Detailed log of new commits:

Author: mkrylova
Date: Tue Sep 8 17:50:28 2020 +0300

    0031704: Visualization - add an interactive object AIS_LightSource representing a light source
    
    - Added new class AIS_LightSource - object representing a light source
    - Represented position, name, direction, Cut-off range and spot light source cone shape
    - Assigned Local Transformation to interactive object
    - Updated function vlight with opportunities of presentation via AIS_LightSource tools
    - Added ability to turn on/off light
    - Added Transformation-persistence mode

git

2020-11-09 11:34

administrator   ~0096613

Branch CR31705_6 has been updated forcibly by mkrylova.

SHA-1: 25272fa4bd0288b8feca924ad7a75ca9124c4d02

git

2020-11-09 11:57

administrator   ~0096615

Branch CR31705_6 has been deleted by mkrylova.

SHA-1: 25272fa4bd0288b8feca924ad7a75ca9124c4d02

git

2020-11-20 15:09

administrator   ~0096917

Branch CR31705 has been created by mkrylova.

SHA-1: 70f5ceb85fda1cb5a5e3023767df61be6d0dcf06


Detailed log of new commits:

Author: mkrylova
Date: Fri Nov 20 15:10:23 2020 +0300

    0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage
    
    - moved default markers and functions GetTextureImage and GetMarkerBitMapParam from OpenGl_AspectsSprite to Graphic3d_MarkerImage

git

2020-11-25 15:44

administrator   ~0097070

Branch CR31705 has been updated forcibly by mkrylova.

SHA-1: c4cb1181316844266c306f0e232660ee689926e8

git

2020-11-25 15:45

administrator   ~0097071

Branch CR31705_1 has been created by mkrylova.

SHA-1: 915c6d7e1f1a6dcb47859e9199c87b0c5bc7bd75


Detailed log of new commits:

Author: mkrylova
Date: Fri Nov 20 15:10:23 2020 +0300

    0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage
    
    - moved default markers and functions GetTextureImage and GetMarkerBitMapParam from OpenGl_AspectsSprite to Graphic3d_MarkerImage

kgv

2020-11-25 17:52

developer   ~0097076

Please make sure that the following test cases pass testing and show no image difference comparing to current master:
> testgrid bugs vis bug23654_MarkersRecompute,bug24131_markers_bitmap,bug24131_markers_core,bug24131_markers_glsl,bug24131_markers_sprites

+  Standard_EXPORT static Handle(Image_PixMap) MergeImages (
...
+  Standard_EXPORT static void GetMarkerBitMapParam (const Aspect_TypeOfMarker theMarkerType,

MergeImages() and GetMarkerBitMapParam() are internal details - there is no need making them public.

+  switch (theMarkerType)
+  {
+  case Aspect_TOM_O_POINT:
+  {

Please fix indentation - cases in switch should be indented.

+}
\ No newline at end of file

Please keep empty line at end of file.

git

2020-11-26 14:00

administrator   ~0097094

Branch CR31705_1 has been updated by mkrylova.

SHA-1: 1fa975019b4dc861fff706a8b55482a9a9deca0a


Detailed log of new commits:

Author: mkrylova
Date: Thu Nov 26 14:02:20 2020 +0300

    kgv remarks:
    - fixed mistakes with BitMap values
    - fixed code style

git

2020-11-26 14:37

administrator   ~0097095

Branch CR31705_1 has been updated by mkrylova.

SHA-1: 87025d4bc61f05bdbbbecda11caabf4cd9dcdf73


Detailed log of new commits:

Author: mkrylova
Date: Thu Nov 26 14:36:41 2020 +0300

    kgv remarks:
    - moved functions MergeImages and GetMarkerBitMapParam to anonymous namespace

git

2020-11-26 17:18

administrator   ~0097099

Branch CR31705_1 has been updated by mkrylova.

SHA-1: a1cb5c72f7db818b615f5478034c1acf7f122898


Detailed log of new commits:

Author: mkrylova
Date: Thu Nov 26 16:44:06 2020 +0300

    - fixed displaying of complex textures

git

2020-11-26 17:20

administrator   ~0097100

Branch CR31705_2 has been created by mkrylova.

SHA-1: 2bb615b9391e72fc0df6f5fa3a4c3462e9495ca8


Detailed log of new commits:

Author: mkrylova
Date: Fri Nov 20 15:10:23 2020 +0300

    0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage
    
    - moved default markers and functions GetTextureImage and GetMarkerBitMapParam from OpenGl_AspectsSprite to Graphic3d_MarkerImage

git

2020-12-08 18:18

administrator   ~0097429

Branch CR31705_2 has been updated forcibly by mkrylova.

SHA-1: ae1b8426d1a5bff53f5f58cd6536180655a0c8cc

git

2020-12-08 18:20

administrator   ~0097430

Branch CR31705_3 has been created by mkrylova.

SHA-1: 582e47f733fa88e0134c496532a55e4f87445ce5


Detailed log of new commits:

Author: mkrylova
Date: Fri Nov 20 15:10:23 2020 +0300

    0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage
    
    - moved default markers and functions GetTextureImage and GetMarkerBitMapParam from OpenGl_AspectsSprite to Graphic3d_MarkerImage
    - simplified the logic of drawing sprites
    - replaced glBitmap by glDrawPixels

kgv

2020-12-09 12:42

developer   ~0097440

+        glBitmap (0, 0, 0, 0, -aWidth / 2, -aHeight / 2, NULL);
+        glDrawPixels (aWidth, aHeight, GL_RGBA, GL_UNSIGNED_BYTE, (const GLubyte*)&aPixelsArray->Value (aPixelsArray->Lower()));

Why dummy glBitmap is called before glDrawPixels?
Why not using glRasterPos() and similar?

+        Handle(TColStd_HArray1OfByte) aPixelsArray = new TColStd_HArray1OfByte (0, aWidth * aHeight * 4);

There should be no need in copying image pixmap.
Image_PixMap could be passed to glDrawPixels() directly with properly given pixel format as in case of texture initialization (OpenGl_TextureFormat).
Don't forget about glPixelStorei GL_UNPACK_ALIGNMENT/GL_UNPACK_ROW_LENGTH (see OpenGl_Texture.cxx)

git

2020-12-09 18:13

administrator   ~0097448

Branch CR31705_3 has been updated by mkrylova.

SHA-1: 44ed4d514cbc485751c122a4885def384063d025


Detailed log of new commits:

Author: mkrylova
Date: Wed Dec 9 18:15:11 2020 +0300

    kgv remarks:
    - added function FlipY() to flip Image_PixMap
    - modified flipping the image

kgv

2020-12-10 10:55

developer   ~0097455

+  Standard_EXPORT bool FlipY();

Please follow existing convention and define a static method like
> static bool SwapRgbaBgra (Image_PixMap& theImage);
and necessary description.

+        glBitmap (0, 0, 0, 0, -aWidth / 2, -aHeight / 2, NULL); // make offsets that will be added     to the current raster position

Redundant spaces in comments.

+        glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);

Please put necessary #ifdef's for GLES builds.

+        glDrawPixels (aWidth, aHeight,
+                      OpenGl_TextureFormat::FindFormat (theCtx, anImageCopy->Format(), Standard_True).Format(), GL_UNSIGNED_BYTE,
+                      anImageCopy->Data());

Please verify if OpenGl_TextureFormat::FindFormat() has found a compatible format before calling glDrawPixels().
Use GetBitMapArray() fallback in case of unknown/unsupported format as in case of Image_Format_Gray/Image_Format_Alpha check (hence, reorder logic).

git

2020-12-10 16:06

administrator   ~0097468

Branch CR31705_3 has been updated by mkrylova.

SHA-1: e9a39de329a79a50675bfebfd2a5090516290a60


Detailed log of new commits:

Author: mkrylova
Date: Thu Dec 10 16:08:27 2020 +0300

    kgv remarks:
    - modified definition of FlipY
    - added description for FlipY
    - reordered logic of drawing sprites

git

2020-12-11 12:36

administrator   ~0097483

Branch CR31705_4 has been created by mkrylova.

SHA-1: bb8570212e197165000688200350c6b5fbdb4780


Detailed log of new commits:

Author: mkrylova
Date: Fri Nov 20 15:10:23 2020 +0300

    0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage
    
    - moved default markers and functions GetTextureImage and GetMarkerBitMapParam from OpenGl_AspectsSprite to Graphic3d_MarkerImage
    - simplified the logic of drawing sprites
    - replaced glBitmap by glDrawPixels
    - added function FlipY() to flip Image_PixMap

git

2020-12-11 16:45

administrator   ~0097495

Branch CR31705_3 has been updated forcibly by kgv.

SHA-1: 7423173f0645041e80ccad7d1234164cf9d9e980

git

2020-12-11 17:15

administrator   ~0097499

Branch CR31705_3 has been updated forcibly by kgv.

SHA-1: 04fc94272999e7233fd22fda55006cf8cc7979d2

git

2020-12-11 20:45

administrator   ~0097511

Branch CR31705_5 has been created by kgv.

SHA-1: aa95be07b0f1f9203b9bf84cdeb2f3460031dd7b


Detailed log of new commits:

Author: mkrylova
Date: Fri Nov 20 15:10:23 2020 +0300

    0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage
    
    Built-in markers definition has been moved from OpenGl_AspectsSprite to Graphic3d_MarkerImage and generalized.
    RGBA8 pixel format is now preferred over BGRA8.
    Fallback OpenGL 1.1 rendering code now supports drawing of colored markers using glDrawPixels().
    
    Added function Image_PixMap::FlipY() flipping image rows.

kgv

2020-12-12 11:42

developer   ~0097517

Please raise the patch
- OCCT branch: CR31705_5.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31705_5-master-KGV/

The patch has been corrected:
- Fixed highlighting of colored markers drawn by glDrawPixels (initialize spriteAlpha as glBitmap in addition to main sprite)
- Fixed no alpha-testing in glDrawPixels mode.
- Redundant public methods have been moved inside Graphic3d_MarkerImage.cxx - only single Graphic3d_MarkerImage::StandardMarker() has been left.
- Flipping bitmap for glBitmap is now done by Graphic3d_MarkerImage::GetBitMapArray() method.
- Further unification and code simplification.

bugmaster

2020-12-19 14:48

administrator   ~0097740

Combination -
OCCT branch : IR-2020-12-18
master SHA - 04114fd201c20efe9fbe85f00bec9a99ae3747ad
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-12-18 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17709.570000000054 / 17744.450000000124 [-0.20%]
Products
Total CPU difference: 12258.480000000121 / 12330.210000000125 [-0.58%]
Windows-64-VC14:
OCCT
Total CPU difference: 19272.796875 / 19429.1875 [-0.80%]
Products
Total CPU difference: 13712.859375 / 13755.5 [-0.31%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2020-12-19 15:23

administrator   ~0097786

Branch CR31705_5 has been deleted by inv.

SHA-1: aa95be07b0f1f9203b9bf84cdeb2f3460031dd7b

git

2020-12-19 15:23

administrator   ~0097788

Branch CR31705_3 has been deleted by inv.

SHA-1: 04fc94272999e7233fd22fda55006cf8cc7979d2

git

2020-12-19 15:23

administrator   ~0097789

Branch CR31705_4 has been deleted by inv.

SHA-1: bb8570212e197165000688200350c6b5fbdb4780

git

2020-12-19 15:23

administrator   ~0097792

Branch CR31705_2 has been deleted by inv.

SHA-1: ae1b8426d1a5bff53f5f58cd6536180655a0c8cc

git

2020-12-19 15:23

administrator   ~0097798

Branch CR31705_1 has been deleted by inv.

SHA-1: a1cb5c72f7db818b615f5478034c1acf7f122898

git

2020-12-19 15:23

administrator   ~0097799

Branch CR31705 has been deleted by inv.

SHA-1: c4cb1181316844266c306f0e232660ee689926e8

Related Changesets

occt: master 59500bb2

2020-11-20 12:10:23

mkrylova


Committer: bugmaster Details Diff
0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage

Built-in markers definition has been moved from OpenGl_AspectsSprite to Graphic3d_MarkerImage and generalized.
RGBA8 pixel format is now preferred over BGRA8.
Fallback OpenGL 1.1 rendering code now supports drawing of colored markers using glDrawPixels().

Added function Image_PixMap::FlipY() flipping image rows.
Affected Issues
0031705
mod - src/Graphic3d/FILES Diff File
mod - src/Graphic3d/Graphic3d_MarkerImage.cxx Diff File
mod - src/Graphic3d/Graphic3d_MarkerImage.hxx Diff File
add - src/Graphic3d/Graphic3d_MarkerImage.pxx Diff File
mod - src/Image/Image_PixMap.cxx Diff File
mod - src/Image/Image_PixMap.hxx Diff File
mod - src/OpenGl/OpenGl_AspectsSprite.cxx Diff File
mod - src/OpenGl/OpenGl_PointSprite.hxx Diff File
mod - src/OpenGl/OpenGl_PrimitiveArray.cxx Diff File
mod - src/OpenGl/OpenGl_Texture.hxx Diff File

Issue History

Date Modified Username Field Change
2020-08-11 09:42 kgv New Issue
2020-08-11 09:42 kgv Assigned To => kgv
2020-08-11 09:42 kgv Assigned To kgv => mkrylova
2020-08-11 09:42 kgv Status new => assigned
2020-08-11 09:42 kgv Relationship added related to 0031704
2020-08-11 09:43 kgv Relationship added child of 0030631
2020-09-21 17:42 kgv Target Version 7.5.0 => 7.6.0
2020-11-06 15:56 git Note Added: 0096595
2020-11-09 11:34 git Note Added: 0096613
2020-11-09 11:57 git Note Added: 0096615
2020-11-20 15:09 git Note Added: 0096917
2020-11-25 15:44 git Note Added: 0097070
2020-11-25 15:45 git Note Added: 0097071
2020-11-25 15:46 mkrylova Assigned To mkrylova => osa
2020-11-25 15:46 mkrylova Status assigned => resolved
2020-11-25 15:46 mkrylova Steps to Reproduce Updated
2020-11-25 17:52 kgv Note Added: 0097076
2020-11-25 17:52 kgv Assigned To osa => mkrylova
2020-11-25 17:52 kgv Status resolved => assigned
2020-11-26 14:00 git Note Added: 0097094
2020-11-26 14:37 git Note Added: 0097095
2020-11-26 17:18 git Note Added: 0097099
2020-11-26 17:20 git Note Added: 0097100
2020-12-08 18:18 git Note Added: 0097429
2020-12-08 18:20 git Note Added: 0097430
2020-12-09 12:36 mkrylova Assigned To mkrylova => kgv
2020-12-09 12:36 mkrylova Status assigned => resolved
2020-12-09 12:42 kgv Note Added: 0097440
2020-12-09 12:42 kgv Assigned To kgv => mkrylova
2020-12-09 12:42 kgv Status resolved => assigned
2020-12-09 18:13 git Note Added: 0097448
2020-12-10 10:55 kgv Note Added: 0097455
2020-12-10 16:06 git Note Added: 0097468
2020-12-11 12:36 git Note Added: 0097483
2020-12-11 12:41 mkrylova Assigned To mkrylova => kgv
2020-12-11 12:41 mkrylova Status assigned => resolved
2020-12-11 16:45 git Note Added: 0097495
2020-12-11 17:15 git Note Added: 0097499
2020-12-11 20:45 git Note Added: 0097511
2020-12-12 11:42 kgv Note Added: 0097517
2020-12-12 11:42 kgv Assigned To kgv => bugmaster
2020-12-12 11:42 kgv Status resolved => reviewed
2020-12-14 17:15 kgv Relationship added related to 0026791
2020-12-19 14:48 bugmaster Note Added: 0097740
2020-12-19 14:48 bugmaster Status reviewed => tested
2020-12-19 14:54 bugmaster Test case number => Not required
2020-12-19 15:06 bugmaster Changeset attached => occt master 59500bb2
2020-12-19 15:06 bugmaster Status tested => verified
2020-12-19 15:06 bugmaster Resolution open => fixed
2020-12-19 15:23 git Note Added: 0097786
2020-12-19 15:23 git Note Added: 0097788
2020-12-19 15:23 git Note Added: 0097789
2020-12-19 15:23 git Note Added: 0097792
2020-12-19 15:23 git Note Added: 0097798
2020-12-19 15:23 git Note Added: 0097799