MantisBT - Community
View Issue Details
0026122Community[OCCT] OCCT:Visualizationpublic2015-04-22 16:582016-08-01 23:56
solomin_s 
bugmaster 
normalminor 
closedfixed 
LinuxUbuntu14.04
[OCCT] 6.9.0 
[OCCT] 7.0.0[OCCT] 7.0.0 
demo samples dimensionsglsl, v3d glsl texture_trsf
0026122: Visualization, TKOpenGl - clipping and capping is broken when ffp is disabled on Linux
If ffp is disabled on linux, the adding of clip plane cut all objects on the scene depending of camera position (only on Ubuntu), capping don't render at all.
pload MODELING VISUALIZATION
vcaps -ffp off
vinit View1
vclear
vclipplane create pln1
vclipplane set pln1 view Driver1/Viewer1/View1
vclipplane change pln1 equation 1 1 1 0
box b -50 -50 -50 100 100 100
vdisplay b
vfit


Rotate object
No tags attached.
parent of 0027123closed bugmaster Open CASCADE Visualization, TKOpenGl - fix environment texture GLSL program 
related to 0026688closed bugmaster Community Visualization, TKOpenGl - apply transparency within GLSL programs 
related to 0027735closed bugmaster Open CASCADE Visualization, OpenGl_ShaderManager - fix clipping state management 
child of 0024838closed bugmaster Open CASCADE Visualization, TKOpenGl - make general rendering path compatible with OpenGL 3.1+ core profiles 
child of 0025282closed bugmaster Open CASCADE Visualization, OpenGl_PrimitiveArray - provide built-in GLSL programs as alternative to FFP 
png ffp_disable.png (5,863) 2015-04-23 10:04
https://tracker.dev.opencascade.org/
png ffp_enable.png (6,486) 2015-04-23 10:04
https://tracker.dev.opencascade.org/
png texture_trsf_ref.png (2,608) 2015-10-15 11:47
https://tracker.dev.opencascade.org/
Issue History
2015-04-22 16:58solomin_sNew Issue
2015-04-22 16:58solomin_sAssigned To => kgv
2015-04-22 16:58solomin_sFile Added: shading_mode.png
2015-04-22 16:58solomin_sFile Added: original_mode.png
2015-04-22 16:59solomin_sNote Added: 0040112
2015-04-22 17:40solomin_sNote Added: 0040121
2015-04-22 17:44solomin_sNote Edited: 0040121bug_revision_view_page.php?bugnote_id=40121#r10155
2015-04-22 22:59gitNote Added: 0040137
2015-04-23 08:46kgvNote Added: 0040146
2015-04-23 08:46kgvAssigned Tokgv => solomin_s
2015-04-23 08:46kgvStatusnew => feedback
2015-04-23 08:47kgvTarget Version6.9.0 => 7.1.0
2015-04-23 08:47kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=10165#r10165
2015-04-23 08:48kgvNote Edited: 0040146bug_revision_view_page.php?bugnote_id=40146#r10167
2015-04-23 09:29solomin_sSummaryClipping is broken with shading on linux => Clipping and capping is broken when ffp disable on linux
2015-04-23 09:29solomin_sDescription Updatedbug_revision_view_page.php?rev_id=10169#r10169
2015-04-23 09:33solomin_sNote Added: 0040147
2015-04-23 09:34solomin_sAssigned Tosolomin_s => kgv
2015-04-23 09:40kgvNote Added: 0040148
2015-04-23 09:40kgvAssigned Tokgv => solomin_s
2015-04-23 09:49solomin_sNote Added: 0040149
2015-04-23 09:50solomin_sAssigned Tosolomin_s => kgv
2015-04-23 10:03solomin_sFile Deleted: shading_mode.png
2015-04-23 10:03solomin_sFile Deleted: original_mode.png
2015-04-23 10:04solomin_sFile Added: ffp_disable.png
2015-04-23 10:04solomin_sFile Added: ffp_enable.png
2015-04-23 19:39kgvStatusfeedback => assigned
2015-04-23 20:05kgvNote Added: 0040187
2015-04-23 20:11solomin_sNote Added: 0040188
2015-09-15 13:31TimoIssue cloned: 0026688
2015-09-15 13:31TimoRelationship addedrelated to 0026688
2015-09-28 20:57kgvRelationship addedchild of 0024838
2015-10-15 11:45gitNote Added: 0046771
2015-10-15 11:46kgvRelationship addedchild of 0025282
2015-10-15 11:47kgvFile Added: texture_trsf_ref.png
2015-10-15 11:49kgvNote Added: 0046772
2015-10-15 11:49kgvTarget Version7.1.0 => 7.0.0
2015-10-15 11:49kgvSummaryClipping and capping is broken when ffp disable on linux => Visualization, TKOpenGl - clipping and capping is broken when ffp is disabled on Linux
2015-10-15 11:51kgvNote Added: 0046773
2015-10-15 11:51kgvAssigned Tokgv => apl
2015-10-15 11:51kgvStatusassigned => resolved
2015-10-15 20:50aplNote Added: 0046812
2015-10-15 20:50aplAssigned Toapl => kgv
2015-10-15 20:50aplStatusresolved => reviewed
2015-10-15 20:51aplAssigned Tokgv => bugmaster
2015-10-15 20:51aplNote Added: 0046813
2015-10-16 08:51gitNote Added: 0046820
2015-10-16 08:52kgvNote Added: 0046821
2015-10-16 12:47mkvAssigned Tobugmaster => mkv
2015-10-16 16:29gitNote Added: 0046960
2015-10-19 16:09mkvNote Added: 0047167
2015-10-19 16:10mkvNote Added: 0047168
2015-10-19 16:10gitNote Added: 0047169
2015-10-19 16:11mkvNote Added: 0047170
2015-10-19 16:11mkvAssigned Tomkv => bugmaster
2015-10-19 16:11mkvStatusreviewed => tested
2015-10-19 16:11mkvTest case number => demo samples dimensionsglsl, v3d glsl texture_trsf
2015-10-23 12:30bugmasterChangeset attached => occt master 79f4f036
2015-10-23 12:30bugmasterStatustested => verified
2015-10-23 12:30bugmasterResolutionopen => fixed
2016-01-30 18:25kgvRelationship addedrelated to 0027123
2016-01-30 18:27kgvRelationship replacedparent of 0027123
2016-04-17 14:42gitNote Added: 0053215
2016-04-17 14:42gitNote Added: 0053216
2016-04-17 14:42gitNote Added: 0053217
2016-04-20 15:42aivFixed in Version => 7.0.0
2016-04-20 15:51aivStatusverified => closed
2016-08-01 23:56kgvRelationship addedrelated to 0027735

Notes
(0040112)
solomin_s   
2015-04-22 16:59   
Not reproduced on Windows.
(0040121)
solomin_s   
2015-04-22 17:40   
(edited on: 2015-04-22 17:44)
Code in src/OpenGl/OpenGl_Clipping.cxx which inside
#if !defined(GL_ES_VERSION_2_0)
must not be executed with shaders also.

(0040137)
git   
2015-04-22 22:59   
Branch CR26122 has been created by solomin_s.

SHA-1: efa83b8169e81a4bcea86a51c8777a033dcbf3b9


Detailed log of new commits:

Author: Sergey Solomin
Date: Wed Apr 22 22:54:33 2015 +0300

    0026122: Clipping is broken with shading on linux
    
    Don't call ffp functions if ffp is disabled
(0040146)
kgv   
2015-04-23 08:46   
(edited on: 2015-04-23 08:48)
If shading is enable by default on linux, the adding of clip plane cut all objects on the scene depending 
of camera position. 

what kind of shading is mentioned here? There is no shading in the test case nor on attached screenshots...

> Clipping is broken with shading on linux
> Not reproduced on Windows. 

please provide more details concerning used hardware and graphical drivers.

+  aContext->ChangeClipping().SetFfpEnable(aContext->caps->ffpEnable);

does patch affects somehow your issue at all?
Since the state is changed only within capping, it should be never called within test case specified in description.

(0040147)
solomin_s   
2015-04-23 09:33   
Description was wrong. I've updated it. Capping don't work when ffp disable and shaders (built-in GLSL programs, not shading, my typo) is used for rendering.
(0040148)
kgv   
2015-04-23 09:40   
> please provide more details concerning used hardware and graphical drivers.
but what about drivers and hardware? Mesa, proprietary drivers, GPU family and so on...
(0040149)
solomin_s   
2015-04-23 09:49   
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
07:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 740M] (rev a1)
Used first. Mesa drivers.

The main problem (this tracker): capping don't work with built-in GLSL programs on desktop. As I understand "glClipPlane" cuts capping plane. On Linux I also see side effect (see screenshots).
(0040187)
kgv   
2015-04-23 20:05   
> Used first. Mesa drivers.
there is the straightforward way to report the GL driver version - to copy text printed by vglinfo Draw Harness command.
(0040188)
solomin_s   
2015-04-23 20:11   
Draw[6]> vglinfo
OpenGL info:
  GLvendor = 'Intel Open Source Technology Center'
  GLdevice = 'Mesa DRI Intel(R) Haswell Mobile '
  GLversion = '3.0 Mesa 10.1.3'
  GLSLversion = '1.30'
(0046771)
git   
2015-10-15 11:45   
Branch CR26122_1 has been created by kgv.

SHA-1: 606ae1176c952c6a53435e06ebb41482d59cffbc


Detailed log of new commits:

Author: kgv
Date: Thu Oct 15 11:42:07 2015 +0300

    Add test case v3d/glsl/texture_trsf applying texture transformation

Author: kgv
Date: Thu Oct 15 11:39:10 2015 +0300

    OpenGl_ShaderManager - apply 2d texture coordinates transformation in GLSL programs.
    OpenGl_Context::SetTextureMatrix() - move texture matrix assignment from OpenGl_Workspace::setTextureParams() to OpenGl_Context.
    
    Add test case demo/samples/dimensionsglsl with FFP turned OFF.

Author: kgv
Date: Thu Oct 15 11:12:44 2015 +0300

    0026122: Visualization, TKOpenGl - clipping and capping is broken when ffp is disabled on Linux
    
    OpenGl_Clipping - do not setup clipping planes using FFP when it is disabled.
(0046772)
kgv   
2015-10-15 11:49   
New test case v3d/glsl/texture_trsf uses image file "texture_trsf_ref.png" attached to this issue.
(0046773)
kgv   
2015-10-15 11:51   
Patch is ready for review.
(0046812)
apl   
2015-10-15 20:50   
Patch is reviewed.
(0046813)
apl   
2015-10-15 20:51   
Dear bugmaster,

Please test the patch.
(0046820)
git   
2015-10-16 08:51   
Branch CR26122_2 has been created by kgv.

SHA-1: bf47259788f66cd14ab8f316652f3e93360f8988


Detailed log of new commits:

Author: kgv
Date: Fri Oct 16 08:50:46 2015 +0300

    0026122: Visualization, TKOpenGl - clipping and capping is broken when ffp is disabled on Linux
    
    OpenGl_Clipping - do not setup clipping planes using FFP when it is disabled.
    
    OpenGl_ShaderManager - apply 2d texture coordinates transformation in GLSL programs.
    OpenGl_Context::SetTextureMatrix() - move texture matrix assignment from OpenGl_Workspace::setTextureParams() to OpenGl_Context.
    
    Add test case demo/samples/dimensionsglsl with FFP turned OFF.
    Add test case v3d/glsl/texture_trsf applying texture transformation.
(0046821)
kgv   
2015-10-16 08:52   
Please use branch CR26122_2 for testing (squashed and rebased onto IR).
Please don't forget to add data file "texture_trsf_ref.png".
(0046960)
git   
2015-10-16 16:29   
Branch CR26122_2 has been updated forcibly by mkv.

SHA-1: 8c5829c9f8fe00d1f6e64c6f027df9f9bc1fe650
(0047167)
mkv   
2015-10-19 16:09   
Dear BugMaster,
Branch CR26122_2 was rebased on current master of occt git-repository.
SHA-1: 8c5829c9f8fe00d1f6e64c6f027df9f9bc1fe650
(0047168)
mkv   
2015-10-19 16:10   
Dear BugMaster,
Branch CR26122_2 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 8c5829c9f8fe00d1f6e64c6f027df9f9bc1fe650

Number of compiler warnings:

occt component :
Linux: 8 (8 on master)
Windows: 0 (0 on master)

products component :
Linux: 39 (39 on master)
Windows: 0 (0 on master)

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR26122-2-master-occt-64/Debian70-64/demo/samples/dimensionsglsl.html [^]
http://occt-tests/CR26122-2-master-occt-64/Windows-64-VC10/demo/samples/dimensionsglsl.html [^]
demo samples dimensionsglsl: OK
http://occt-tests/CR26122-2-master-occt-64/Debian70-64/v3d/glsl/texture_trsf.html [^]
http://occt-tests/CR26122-2-master-occt-64/Windows-64-VC10/v3d/glsl/texture_trsf.html [^]
v3d glsl texture_trsf: OK

Testing on Linux:
occt component :
Total MEMORY difference: 92439804 / 92267848 [+0.19%]
Total CPU difference: 19735.599999999802 / 19657.58999999973 [+0.40%]
products component :
Total MEMORY difference: 26235342 / 26295062 [-0.23%]
Total CPU difference: 7886.399999999987 / 7414.720000000001 [+6.36%]

Testing on Windows:
occt component :
Total MEMORY difference: 58067107 / 58086434 [-0.03%]
Total CPU difference: 18333.64312259909 / 18302.69252419895 [+0.17%]
products component :
Total MEMORY difference: 17163002 / 17167618 [-0.03%]
Total CPU difference: 5634.038515399967 / 5655.301451699955 [-0.38%]

There are no differences in images found by testdiff.
(0047169)
git   
2015-10-19 16:10   
Branch CR26122_2 has been updated by mkv.

SHA-1: ea87fb3f86756d93f44d4c0023d0b2fc0bb448c1


Detailed log of new commits:

Author: mkv
Date: Mon Oct 19 16:07:56 2015 +0300

    Small correction of test case for issue CR26122

(0047170)
mkv   
2015-10-19 16:11   
Dear BugMaster,
Branch CR26122_2 is TESTED.
(0053215)
git   
2016-04-17 14:42   
Branch CR26122 has been deleted by kgv.

SHA-1: efa83b8169e81a4bcea86a51c8777a033dcbf3b9
(0053216)
git   
2016-04-17 14:42   
Branch CR26122_1 has been deleted by kgv.

SHA-1: 606ae1176c952c6a53435e06ebb41482d59cffbc
(0053217)
git   
2016-04-17 14:42   
Branch CR26122_2 has been deleted by kgv.

SHA-1: ea87fb3f86756d93f44d4c0023d0b2fc0bb448c1