mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
0031457: Visualization - interface to find an active frame buffer
This commit is contained in:
@@ -916,6 +916,18 @@ public: //! @name methods to alter or retrieve current state
|
|||||||
//! Bind default Vertex Array Object
|
//! Bind default Vertex Array Object
|
||||||
Standard_EXPORT void BindDefaultVao();
|
Standard_EXPORT void BindDefaultVao();
|
||||||
|
|
||||||
|
//! Active Frame Buffer Object.
|
||||||
|
const Handle(OpenGl_FrameBuffer)& ActiveFrameBuffer() const
|
||||||
|
{
|
||||||
|
return myActiveFbo;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Setup Active Frame Buffer Object.
|
||||||
|
Standard_EXPORT void SetActiveFrameBuffer (const Handle(OpenGl_FrameBuffer)& theFbo)
|
||||||
|
{
|
||||||
|
myActiveFbo = theFbo;
|
||||||
|
}
|
||||||
|
|
||||||
//! Default Frame Buffer Object.
|
//! Default Frame Buffer Object.
|
||||||
const Handle(OpenGl_FrameBuffer)& DefaultFrameBuffer() const
|
const Handle(OpenGl_FrameBuffer)& DefaultFrameBuffer() const
|
||||||
{
|
{
|
||||||
@@ -1173,6 +1185,7 @@ private: //! @name fields tracking current state
|
|||||||
//!< currently active sampler objects
|
//!< currently active sampler objects
|
||||||
Standard_Integer myActiveMockTextures; //!< currently active mock sampler objects
|
Standard_Integer myActiveMockTextures; //!< currently active mock sampler objects
|
||||||
Handle(OpenGl_FrameBuffer) myDefaultFbo; //!< default Frame Buffer Object
|
Handle(OpenGl_FrameBuffer) myDefaultFbo; //!< default Frame Buffer Object
|
||||||
|
Handle(OpenGl_FrameBuffer) myActiveFbo; //!< active Frame Buffer Object
|
||||||
Handle(OpenGl_LineAttributes) myHatchStyles; //!< resource holding predefined hatch styles patterns
|
Handle(OpenGl_LineAttributes) myHatchStyles; //!< resource holding predefined hatch styles patterns
|
||||||
Standard_Integer myActiveHatchType; //!< currently activated type of polygon hatch
|
Standard_Integer myActiveHatchType; //!< currently activated type of polygon hatch
|
||||||
Standard_Boolean myHatchIsEnabled; //!< current enabled state of polygon hatching rasterization
|
Standard_Boolean myHatchIsEnabled; //!< current enabled state of polygon hatching rasterization
|
||||||
|
@@ -692,6 +692,8 @@ void OpenGl_FrameBuffer::BindBuffer (const Handle(OpenGl_Context)& theGlCtx)
|
|||||||
{
|
{
|
||||||
theGlCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, myGlFBufferId);
|
theGlCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, myGlFBufferId);
|
||||||
theGlCtx->SetFrameBufferSRGB (true);
|
theGlCtx->SetFrameBufferSRGB (true);
|
||||||
|
|
||||||
|
theGlCtx->SetActiveFrameBuffer (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
|
Reference in New Issue
Block a user