DiscussionsIssue archiveOCCT:Visualization

Archived issue #0030748

Visualization - Marker displayed in immediate layer ruins QT Quick view controls

CommunityOCCT:Visualizationclosed13 public notes

Search issues

Description

Get the latest code from git and build for Android.
Use Qt Quick as UI and setup OpenGL ES context as AndroidQt sample.
When moving mouse under the shape with markers, the QT quick controls are filled with black background as picture "Attachment 1 (JPG)" depicted.
An correct image is uploaded to depict the normal case "Attachment 2 (JPG)".

The issue won't occur in current release version occt7.3.0. It also occurs on ios and uwp platform, So this should be an regression.


Public activity

13 archived notes

Participants are labeled by their role within this record.

01Commenter 1
This is unrelated to OCCT, but to Qt/OCCT interoperability of shared OpenGL context. The OpenGL state affecting rendering of Qt elements should be manually restored after OCCT 3D Viewer.
02Author
so i'm curious why it works in occt7.3.0. do you mean it's a new behavior of occt current dev version? would you please give more hint about how to do on qt side? thanks in advance.
03Author
other shape like edge, face works well. if the marker not in immediate layer, it works well too. It just occurs for marker in immediate layer. what's the problem behind it? please guide. thanks.
04Author
Even don't need to draw marker actually, SetGroupPrimitivesAspect/SetPrimitivesAspect with Aspect with marker type will reproduce the issue.

myAspects = new Graphic3d_Aspects();
myAspects->SetMarkerType(Aspect_TOM_O);
aGroup->SetGroupPrimitivesAspect(myAspects);
05Author
Dear kgv, could you please take a look at this issue? It's a regression failure. The same code works for OCCT 7.3.0, but fails in master branch. Thanks.
06Commenter 1
I'm unable reproducing the issue nor find any changes related to this.
Could you please prepare a reproducible sample?
Which version of Qt is used?

> would you please give more hint about how to do on qt side?
Actually this is not Qt, but OpenGL/OpenGL ES global state, which should be smoothed between renderers not knowing anything about each other.

Both Qt and OCCT tries to avoid unnecessary OpenGL state changes, leading to possible rendering issues when wrong state is assumed. There is a plenty of states known to cause issues with Qt like GL_UNPACK_ALIGNMENT, multi-texturing, active GLSL program.

See, for example, similar screenshot for #0030374.

07Author
Dear kgv,

It's rather complicated to prepare a sample to reproduce the issue. could your please check issue #0030571 ? It relates to point marker display. Currently this is the only hint. I will try to prepare a sample to reproduce this, but it may need a little more time.
08Commenter 3
Branch [archived branch] has been created by Commenter 1.

[revision removed]


Detailed log of new commits:

Author: Commenter 1
Date: Sat Jun 22 19:50:10 2019 +0300

    0030748: Visualization - Marker displayed in immediate layer ruins QT Quick view controls
    
    OpenGl_Workspace::ResetAppliedAspect() now resets active texture unit to GL_TEXTURE0.
09Commenter 1
Does patch in branch CR30748 make any difference?

10Author
Dear kgv, It works well. It save me much time to prepare a sample case to reproduce the issue. Thank you so much for the fix.
11Commenter 1
12Commenter 2
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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: 16476.210000000094 / 16513.620000000094 [-0.23%]
Products
Total CPU difference: 10526.460000000054 / 10515.620000000044 [+0.10%]
Windows-64-VC14:
OCCT
Total CPU difference: 17815.421875 / 17822.375 [-0.04%]
Products
Total CPU difference: 12104.4375 / 12126.671875 [-0.18%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
13Commenter 3
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records