MantisBT - Open CASCADE
View Issue Details
0032461Open CASCADE[OCCT] OCCT:Visualizationpublic2021-06-26 23:542021-09-18 09:54
nds 
smoskvin 
normalfeature 
verifiedfixed 
 
[OCCT] 7.6.0* 
Not required
0032461: Visualization, OpenGl_Text - expensive call of glGetTexEnviv/glTexEnvi within OpenGL Compatible Profile
Viewer that has lots of OpenGl_Text instances requires much more time on redraw when calls 'glGetTexEnviv/glTexEnvi' are performed during each such instance render.
If possible, it's proposed to cover this call by some flag for some of text instances or handle it by some general property.
pload ALL
vinit -height 900 -width 1000
vcaps -vsync 0
set t [time {for {set i -250} {$i < 250} {incr i} { vdrawtext text_$i text_$i -pos [expr {30*$i}] [expr {2*$i}] 0}}]
set t [time {for {set i -100} {$i < 100} {incr i} { vdrawtext text2_$i text2_$i -pos [expr {2*$i}] [expr {30*$i}] 0}}]
set t [time {for {set i -100} {$i < 100} {incr i} { vdrawtext text3_$i text3_$i -pos [expr {30*$i}] [expr {30*$i}] 0}}]
set t [time {for {set i -100} {$i < 100} {incr i} { vdrawtext text4_$i text4_$i -pos [expr {-45*$i}] [expr {45*$i}] 0}}]

vfps 1000

View - 32461_view.PNG
No tags attached.
child of 0025978closed bugmaster Visualization - setup font aliases for Android 
png 32461_view.PNG (143,458) 2021-09-15 10:57
https://tracker.dev.opencascade.org/
png 32461_perf.PNG (13,283) 2021-09-15 10:57
https://tracker.dev.opencascade.org/
Issue History
2021-06-26 23:54ndsNew Issue
2021-06-26 23:54ndsAssigned To => kgv
2021-06-27 00:56gitNote Added: 0102102
2021-06-28 09:04kgvSummaryVisualization - expensive call of glGetTexEnviv/glTexEnvi in each render of OpenGl_Text => Visualization, OpenGl_Text - expensive call of glGetTexEnviv/glTexEnvi within OpenGL Compatible Profile
2021-06-28 11:12kgvRelationship addedchild of 0025978
2021-06-28 11:58bugmasterProjectInternal => Open CASCADE
2021-06-28 12:00kgvAssigned Tokgv => mkrylova
2021-06-28 12:00kgvSeverityminor => feature
2021-06-28 12:00kgvStatusnew => assigned
2021-09-06 16:21kgvAssigned Tomkrylova => sshutina
2021-09-15 10:51gitNote Added: 0104089
2021-09-15 10:56sshutinaNote Added: 0104091
2021-09-15 10:57sshutinaFile Added: 32461_view.PNG
2021-09-15 10:57sshutinaFile Added: 32461_perf.PNG
2021-09-15 13:48gitNote Added: 0104093
2021-09-15 13:49gitNote Added: 0104094
2021-09-15 16:17gitNote Added: 0104096
2021-09-15 16:17sshutinaNote Added: 0104097
2021-09-15 16:17sshutinaAssigned Tosshutina => kgv
2021-09-15 16:17sshutinaStatusassigned => resolved
2021-09-15 16:18sshutinaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25737#r25737
2021-09-15 16:18sshutinaNote Edited: 0104091bug_revision_view_page.php?bugnote_id=104091#r25739
2021-09-15 16:18sshutinaTest case number => Not required
2021-09-15 16:23gitNote Added: 0104098
2021-09-15 16:25kgvAssigned Tokgv => bugmaster
2021-09-15 16:25kgvStatusresolved => reviewed
2021-09-18 09:37bugmasterStatusreviewed => tested
2021-09-18 09:37bugmasterNote Added: 0104186
2021-09-18 09:43smoskvinChangeset attached => occt master 58f2990b
2021-09-18 09:43smoskvinAssigned Tobugmaster => smoskvin
2021-09-18 09:43smoskvinStatustested => verified
2021-09-18 09:43smoskvinResolutionopen => fixed
2021-09-18 09:54gitNote Added: 0104208
2021-09-18 09:54gitNote Added: 0104209
2021-09-18 09:54gitNote Added: 0104210

Notes
(0102102)
git   
2021-06-27 00:56   
Branch CR32461 has been created by nds.

SHA-1: 709a657363abee1b3092eb72f906dd87409303d3


Detailed log of new commits:

Author: Natalia Ermolaeva
Date: Sun Jun 27 00:56:46 2021 +0300

    0032461: Visualization - expensive call of glGetTexEnviv/glTexEnvi in each render of OpenGl_Text
(0104089)
git   
2021-09-15 10:51   
Branch CR32461_1 has been created by svetlana.shutina_170290.

SHA-1: e12b108c1c9bf84a676f80daaf466f503de1e7ea


Detailed log of new commits:

Author: sshutina
Date: Wed Sep 15 10:46:56 2021 +0300

    0032461: Visualization - expensive call of glGetTexEnviv/glTexEnvi in each render of OpenGl_Text
    
     - removed the call of glGetTexEnviv, glTexEnvi
     - replaced on the OpenGl_Sampler::applyGlobalTextureParams/resetGlobalTextureParams
     - added the method in OpenGl_Font returning first texture
(0104091)
sshutina   
2021-09-15 10:56   
(edited on: 2021-09-15 16:18)
Reproduced results

View - 32461_view.PNG

Results are on 32461_perf.PNG

(0104093)
git   
2021-09-15 13:48   
Branch CR32461_1 has been updated by svetlana.shutina_170290.

SHA-1: 42c5ebc0ded331aa82ffa0f120f6caff4e3cfc72


Detailed log of new commits:

Author: sshutina
Date: Wed Sep 15 12:56:54 2021 +0300

    #fix remarks

(0104094)
git   
2021-09-15 13:49   
Branch CR32461_2 has been created by svetlana.shutina_170290.

SHA-1: 301113fdbaff9934cfb5b12dc59bc61caad5fc36


Detailed log of new commits:

Author: sshutina
Date: Wed Sep 15 13:48:51 2021 +0300

    0032461: Visualization - expensive call of glGetTexEnviv/glTexEnvi in each render of OpenGl_Text
    
     - removed the call of glGetTexEnviv, glTexEnvi
     - replaced on the OpenGl_Sampler::applyGlobalTextureParams/resetGlobalTextureParams
     - added the method in OpenGl_Font returning first texture
(0104096)
git   
2021-09-15 16:17   
Branch CR32461_2 has been updated forcibly by svetlana.shutina_170290.

SHA-1: 7c98ab4aefb1e37dae5816fbf4e245a492d0c7e9
(0104097)
sshutina   
2021-09-15 16:17   
Patch is ready for review:
- OCCT: branch CR32461_2

Tests are successfully: http://jenkins-test-occt/view/CR32461-master-sshutina/view/ALL/ [^]
(0104098)
git   
2021-09-15 16:23   
Branch CR32461_2 has been updated forcibly by svetlana.shutina_170290.

SHA-1: ff0df1a6dbaae2241d5d70ec97fda61abeb233bc
(0104186)
bugmaster   
2021-09-18 09:37   
Combination -
OCCT branch : IR-2021-09-17
master SHA - 812ee2c9bec89902de2ff85201cb314e0de894cc
49e51745631c52b6c452c65adae4d6dfa21a1b1e
Products branch : IR-2021-09-17 SHA - 1127e31e32f90ff63544b0516092694f1a36932f
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: 17390.540000000547 / 17358.370000000414 [+0.19%]
Products
Total CPU difference: 11364.740000000118 / 11411.36000000011 [-0.41%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19327.15625 [-0.03%]
Products
Total CPU difference: 12746.171875 / 12747.78125 [-0.01%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0104208)
git   
2021-09-18 09:54   
Branch CR32461 has been deleted by mnt.

SHA-1: 709a657363abee1b3092eb72f906dd87409303d3
(0104209)
git   
2021-09-18 09:54   
Branch CR32461_1 has been deleted by mnt.

SHA-1: 42c5ebc0ded331aa82ffa0f120f6caff4e3cfc72
(0104210)
git   
2021-09-18 09:54   
Branch CR32461_2 has been deleted by mnt.

SHA-1: ff0df1a6dbaae2241d5d70ec97fda61abeb233bc