Archived issue #0025475
Visualization, TKOpenGl - draw background using primitive arrays
Description
Current implementation of OpenGl_View::DrawBackground() uses deprecated functionality and should be re-written using OpenGl_PrimitiveArray.
Steps to reproduce
Test case name: /bugs/vis/bug25475
Public activity
38 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: aba
Date: Fri Nov 21 18:46:01 2014 +0300
0025475: Visualization, TKOpenGl - draw background using primitive arrays
[revision removed]
Detailed log of new commits:
Author: aba
Date: Fri Nov 21 18:46:01 2014 +0300
0025475: Visualization, TKOpenGl - draw background using primitive arrays
Dear kgv,
please review the git branch CR25475.
please review the git branch CR25475.
+ OpenGl_PrimitiveArray* aTriangleArray = new OpenGl_PrimitiveArray (NULL, Graphic3d_TOPA_TRIANGLES, + anIndices, anAttribs, NULL);
please make array as field of OpenGl_View, and eliminate graphic3d_buffer re-creations - it can be re-used.
Branch [archived branch] has been updated by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sun Nov 23 15:08:00 2014 +0300
avoid memory leak
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sun Nov 23 15:08:00 2014 +0300
avoid memory leak
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: aba
Date: Mon Nov 24 08:44:17 2014 +0300
0025475: Visualization, TKOpenGl - draw background using primitive arrays
[revision removed]
Detailed log of new commits:
Author: aba
Date: Mon Nov 24 08:44:17 2014 +0300
0025475: Visualization, TKOpenGl - draw background using primitive arrays
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been updated by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Dec 9 18:55:17 2014 +0400
OpenGl_View::DrawBackground() - create GLushort index buffer
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Dec 9 18:55:17 2014 +0400
OpenGl_View::DrawBackground() - create GLushort index buffer
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: aba
Date: Thu Dec 11 09:03:48 2014 +0300
0025475: Visualization, TKOpenGl - draw background using primitive arrays
[revision removed]
Detailed log of new commits:
Author: aba
Date: Thu Dec 11 09:03:48 2014 +0300
0025475: Visualization, TKOpenGl - draw background using primitive arrays
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: aba
Date: Wed Jan 14 16:50:55 2015 +0300
Moved background arrays to separate classes
[revision removed]
Detailed log of new commits:
Author: aba
Date: Wed Jan 14 16:50:55 2015 +0300
Moved background arrays to separate classes
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: aba
Date: Fri Jan 16 19:50:22 2015 +0300
create one background array class for texture and gradient
[revision removed]
Detailed log of new commits:
Author: aba
Date: Fri Jan 16 19:50:22 2015 +0300
create one background array class for texture and gradient
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: aba
Date: Wed Jan 28 15:24:38 2015 +0300
0025475: Visualization, TKOpenGl - draw background using primitive arrays:
- moved background arrays to separate class for texture and gradient arrays
[revision removed]
Detailed log of new commits:
Author: aba
Date: Wed Jan 28 15:24:38 2015 +0300
0025475: Visualization, TKOpenGl - draw background using primitive arrays:
- moved background arrays to separate class for texture and gradient arrays
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: aba
Date: Thu Jan 29 11:00:25 2015 +0300
Remarks
[revision removed]
Detailed log of new commits:
Author: aba
Date: Thu Jan 29 11:00:25 2015 +0300
Remarks
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Dear kgv,
please review the Git branch CR25475_3.
please review the Git branch CR25475_3.
Branch [archived branch] has been updated by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Jan 30 17:15:40 2015 +0300
cosmetics
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Jan 30 17:15:40 2015 +0300
cosmetics
Branch [archived branch] has been updated by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Jan 30 17:16:24 2015 +0300
correct test case
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Jan 30 17:16:24 2015 +0300
correct test case
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: aba
Date: Fri Jan 30 17:20:12 2015 +0300
0025475: Visualization, TKOpenGl - draw background using primitive arrays
Move background arrays to separate class OpenGl_BackgroundArray
for texture and gradient arrays.
[revision removed]
Detailed log of new commits:
Author: aba
Date: Fri Jan 30 17:20:12 2015 +0300
0025475: Visualization, TKOpenGl - draw background using primitive arrays
Move background arrays to separate class OpenGl_BackgroundArray
for texture and gradient arrays.
Please test patch in branch CR25475_4.
Dear Commenter 1,
Branch CR25475_4 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 24 (18 on master)
Windows: 0 (0 on master)
There are new additional compilation warnings on Linux platform:
http://jenkins-test-03.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/portlet/dashboard_portlet_17008/job/mnt-CR25475_4-master_build_occt_linux/1/warnings17Result/package.-133837126/
OpenGl_BackgroundArray.cxx:26, GNU C Compiler 4 (gcc), Priority: Normal
when initialized here
OpenGl_View.cxx:53, GNU C Compiler 4 (gcc), Priority: Normal
when initialized here
http://jenkins-test-03.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/portlet/dashboard_portlet_17008/job/mnt-CR25475_4-master_build_occt_linux/1/warnings17Result/package.-671474530/
OpenGl_BackgroundArray.hxx:101, GNU C Compiler 4 (gcc), Priority: Normal
‘Graphic3d_TypeOfBackground OpenGl_BackgroundArray::myType’
OpenGl_BackgroundArray.hxx:104, GNU C Compiler 4 (gcc), Priority: Normal
‘OpenGl_BackgroundArray::myFillMethod’ will be initialized after
OpenGl_View.hxx:290, GNU C Compiler 4 (gcc), Priority: Normal
‘OpenGl_AspectFace* OpenGl_View::myTextureParams’
OpenGl_View.hxx:292, GNU C Compiler 4 (gcc), Priority: Normal
‘OpenGl_View::myBgTextureArray’ will be initialized after
products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
http://occt-tests/CR25475-4-master-occt/Debian60-64/bugs/vis/bug25475.html
http://occt-tests/CR25475-4-master-occt/Windows-32-VC10/bugs/vis/bug25475.html
bugs vis(004) bug25475: OK
Testing on Linux:
occt component :
Total MEMORY difference: 369887944 / 370076844
Total CPU difference: 53390.50999999995 / 49863.81000000002
products component :
Total MEMORY difference: 110931024 / 110877292
Total CPU difference: 16204.519999999991 / 15924.139999999974
Testing on Windows:
occt component :
Total MEMORY difference: 275859392 / 276284192
Total CPU difference: 35454.09375 / 36894.109375
products component :
Total MEMORY difference: 72352720 / 71401072
Total CPU difference: 10443.25 / 11731.96875
There are no differences in images found by testdiff.
Branch CR25475_4 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 24 (18 on master)
Windows: 0 (0 on master)
There are new additional compilation warnings on Linux platform:
http://jenkins-test-03.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/portlet/dashboard_portlet_17008/job/mnt-CR25475_4-master_build_occt_linux/1/warnings17Result/package.-133837126/
OpenGl_BackgroundArray.cxx:26, GNU C Compiler 4 (gcc), Priority: Normal
when initialized here
OpenGl_View.cxx:53, GNU C Compiler 4 (gcc), Priority: Normal
when initialized here
http://jenkins-test-03.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/portlet/dashboard_portlet_17008/job/mnt-CR25475_4-master_build_occt_linux/1/warnings17Result/package.-671474530/
OpenGl_BackgroundArray.hxx:101, GNU C Compiler 4 (gcc), Priority: Normal
‘Graphic3d_TypeOfBackground OpenGl_BackgroundArray::myType’
OpenGl_BackgroundArray.hxx:104, GNU C Compiler 4 (gcc), Priority: Normal
‘OpenGl_BackgroundArray::myFillMethod’ will be initialized after
OpenGl_View.hxx:290, GNU C Compiler 4 (gcc), Priority: Normal
‘OpenGl_AspectFace* OpenGl_View::myTextureParams’
OpenGl_View.hxx:292, GNU C Compiler 4 (gcc), Priority: Normal
‘OpenGl_View::myBgTextureArray’ will be initialized after
products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
http://occt-tests/CR25475-4-master-occt/Debian60-64/bugs/vis/bug25475.html
http://occt-tests/CR25475-4-master-occt/Windows-32-VC10/bugs/vis/bug25475.html
bugs vis(004) bug25475: OK
Testing on Linux:
occt component :
Total MEMORY difference: 369887944 / 370076844
Total CPU difference: 53390.50999999995 / 49863.81000000002
products component :
Total MEMORY difference: 110931024 / 110877292
Total CPU difference: 16204.519999999991 / 15924.139999999974
Testing on Windows:
occt component :
Total MEMORY difference: 275859392 / 276284192
Total CPU difference: 35454.09375 / 36894.109375
products component :
Total MEMORY difference: 72352720 / 71401072
Total CPU difference: 10443.25 / 11731.96875
There are no differences in images found by testdiff.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: aba
Date: Tue Feb 3 13:44:40 2015 +0300
Eliminated warnings on Linux
[revision removed]
Detailed log of new commits:
Author: aba
Date: Tue Feb 3 13:44:40 2015 +0300
Eliminated warnings on Linux
Warnings on Linux were eliminated.
Dear mkv,
please test CR25475_4.
Dear mkv,
please test CR25475_4.
Dear mkv, please just check warnings (compilation) - no need to perform regression testing anew.
Dear Commenter 1,
Branch CR25475_4 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)
products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)
Branch CR25475_4 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)
products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)
Hello, I've tried these changes (Branch CR25475_4) with OpenGL ES on Android. It's don't work with usage:
myView->SetBgGradientColors (myTopBackgroundColor, myBottomBackgroundColor,
Aspect_GFM_VER, Standard_False);
I've debugged OpenGl_BackgroundArray class and found that myIndices is empty. Adding initializing code solve my problem. Review changes again please.
myView->SetBgGradientColors (myTopBackgroundColor, myBottomBackgroundColor,
Aspect_GFM_VER, Standard_False);
I've debugged OpenGl_BackgroundArray class and found that myIndices is empty. Adding initializing code solve my problem. Review changes again please.
>> I've debugged OpenGl_BackgroundArray class and found that myIndices is empty
It is empty for a purpose - the vertices in this primitive array are sorted in natural order and do not require dedicated indices buffer.
It is empty for a purpose - the vertices in this primitive array are sorted in natural order and do not require dedicated indices buffer.
You're right. But I don't see vertical gradient on Android. Moreover, sometimes when use gradient background I've seen:
VBO creation for Primitive Array has failed for xx indices. Out of memory?
in log when showing AIS objects.
VBO creation for Primitive Array has failed for xx indices. Out of memory?
in log when showing AIS objects.
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Related records
- #0025804 · parent of · closedVisualization, TKOpenGl - specify correct primitives type in OpenGl_BackgroundArray
- #0026599 · related to · closedVisualization, TKOpenGl - gradient background should reset model transformation in Core profile
- #0023484 · child of · closedVisualization, TKOpenGl - primitive arrays to become the only way to render geometry
- #0025146 · child of · closedPorting to Android