MantisBT - Open CASCADE
View Issue Details
0031457Open CASCADE[OCCT] OCCT:Visualizationpublic2020-03-21 20:122020-09-21 17:46
nds 
kgv 
normalintegration request 
assignedopen 
 
[OCCT] 7.6.0* 
0031457: Visualization, TKOpenGl - interface to find an active frame buffer
OpenGl_FrameBuffer has a functionality to bind/unbind itself into context.

If we have some buffer in the context before Bind and want to restore it after Unbind, we need to get it. It's proposed to add this interface into OpenGl_Context.
No tags attached.
Issue History
2020-03-21 20:12ndsNew Issue
2020-03-21 20:12ndsAssigned To => nds
2020-03-27 09:31kgvSummaryVisualization - interface to find an active frame buffer => Visualization, OpenGl_Context - interface to find an active frame buffer
2020-03-27 09:31kgvSummaryVisualization, OpenGl_Context - interface to find an active frame buffer => Visualization, TKOpenGl - interface to find an active frame buffer
2020-04-11 10:16gitNote Added: 0091507
2020-09-04 09:24gitNote Added: 0094007
2020-09-04 11:43ndsAssigned Tonds => kgv
2020-09-04 11:43ndsSeverityminor => integration request
2020-09-04 11:43ndsStatusnew => resolved
2020-09-05 09:24ndsNote Added: 0094041
2020-09-06 12:09kgvNote Added: 0094167
2020-09-06 12:09kgvAssigned Tokgv => nds
2020-09-06 12:09kgvStatusresolved => assigned
2020-09-07 20:42gitNote Added: 0094212
2020-09-07 20:44gitNote Added: 0094213
2020-09-08 12:56ndsNote Added: 0094243
2020-09-08 12:56ndsAssigned Tonds => kgv
2020-09-21 17:46kgvTarget Version7.5.0 => 7.6.0*

Notes
(0091507)
git   
2020-04-11 10:16   
Branch CR31457 has been created by nds.

SHA-1: 4d21b76dbad8c16dd0b4c51da09bd7b0cb45df79


Detailed log of new commits:

Author: nds
Date: Sat Mar 21 20:13:55 2020 +0300

    0031457: Visualization - interface to find an active frame buffer
(0094007)
git   
2020-09-04 09:24   
Branch CR31457 has been updated forcibly by nds.

SHA-1: 2b0f19182b04dcb37a749a33ad472a4eab900bf0
(0094041)
nds   
2020-09-05 09:24   
Dear Kirill,
could you please review.
Jenkins job is: http://jenkins-test-12.nnov.opencascade.com/view/CR31457-master-nds/ [^]

Thank you in advance, Natalia
(0094167)
kgv   
2020-09-06 12:09   
It is expected introduced API to be used in existing occurrences using GL_FRAMEBUFFER_BINDING as work-around - e.g. VolumeRender and PrsPointCloud packages (OCC Products), which apart from removing workaround would allow testing new patch.

+  Standard_EXPORT void SetActiveFrameBuffer (const Handle(OpenGl_FrameBuffer)& theFbo)

Redundant Standard_EXPORT.

--- a/src/OpenGl/OpenGl_FrameBuffer.cxx
+++ b/src/OpenGl/OpenGl_FrameBuffer.cxx
@@ -692,6 +692,8 @@ void OpenGl_FrameBuffer::BindBuffer (const Handle(OpenGl_Context)& theGlCtx)
 
{
   theGlCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, myGlFBufferId);
   theGlCtx->SetFrameBufferSRGB (true);
+  
+  theGlCtx->SetActiveFrameBuffer (this)

This doesn't handle BindDrawBuffer(), BindReadBuffer() and
> aCtx->arbFBO->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, OpenGl_FrameBuffer::NO_FRAMEBUFFER);
used in OCCT.
(0094212)
git   
2020-09-07 20:42   
Branch CR31457 has been updated forcibly by nds.

SHA-1: bf5b2a475323b2c14043fcaa11f56599fb35136e
(0094213)
git   
2020-09-07 20:44   
Branch CR31457_1 has been created by nds.

SHA-1: 1f7f051ed48a1d2bae9f2b77ac8df898f4b97e8e


Detailed log of new commits:

Author: nds
Date: Mon Sep 7 20:47:21 2020 +0300

    0031457: Visualization - interface to find an active frame buffer
(0094243)
nds   
2020-09-08 12:56   
Dear Kirill,

I've tried to implement patch on OCCT and product as recommended. But tests have failed. Could you please have a look at proposed patch (on both) and lead what's wrong from your point of view.

I've prepared two jobs on jenkins(sorry for confusing names) (<OCCT> to <Products> branches):

- job for 'CR31457_1' to 'CR31457_1': http://jenkins-test-12.nnov.opencascade.com/view/CR31457-master-nds/ [^]

- job for 'CR31457_1' to 'master': http://jenkins-test-12.nnov.opencascade.com/view/CR31457_1-master-nds/ [^]


As you see, the first job(required) has failed.

If this patch needs to be enriched a lot, isn't it worth to postpone it to 7.6?

Thank you for help, Natalia