]> OCCT Git - occt-copy.git/commitdiff
0029529: Volume Rendering - crash on re-displaying the object
authorkgv <kgv@opencascade.com>
Thu, 1 Mar 2018 17:10:46 +0000 (20:10 +0300)
committerkgv <kgv@opencascade.com>
Sat, 17 Mar 2018 12:30:10 +0000 (15:30 +0300)
Added missing getters: OpenGl_TextureBufferArb::TextureFormat() and OpenGl_ShaderManager::OitState().

src/OpenGl/OpenGl_ShaderManager.hxx
src/OpenGl/OpenGl_TextureBufferArb.hxx

index 17add9fcbd3746fcddef5bfd89fca24c1cbf9549..6b49ebef53ac21cc0fbc1e29a424b73ad07796a0 100644 (file)
@@ -282,6 +282,9 @@ public:
 
 public:
 
+  //! Returns state of OIT uniforms.
+  const OpenGl_OitState& OitState() const { return myOitState; }
+
   //! Set the state of OIT rendering pass.
   //! @param theToEnableOitWrite [in] flag indicating whether the special output should be written for OIT algorithm.
   //! @param theDepthFactor [in] the scalar factor of depth influence to the fragment's coverage.
index 9ffcb5de76127b2a725b61d18f74a37177f117de..fe8bf81097d793a6a37083ca76f8a654d4979e56 100644 (file)
@@ -30,7 +30,7 @@
 //! are declared in this class.
 class OpenGl_TextureBufferArb : public OpenGl_VertexBuffer
 {
-
+  DEFINE_STANDARD_RTTIEXT(OpenGl_TextureBufferArb, OpenGl_VertexBuffer)
 public:
 
   //! Helpful constants
@@ -99,20 +99,16 @@ public:
                                       const Graphic3d_TextureUnit   theTextureUnit) const;
 
   //! Returns name of TBO.
-  GLuint TextureId() const
-  {
-    return myTextureId;
-  }
+  GLuint TextureId() const { return myTextureId; }
+
+  //! Returns internal texture format.
+  GLenum TextureFormat() const { return myTexFormat; }
 
 protected:
 
   GLuint myTextureId; //!< texture id
   GLenum myTexFormat; //!< internal texture format
 
-public:
-
-  DEFINE_STANDARD_RTTIEXT(OpenGl_TextureBufferArb,OpenGl_VertexBuffer) // Type definition
-
 };
 
 DEFINE_STANDARD_HANDLE(OpenGl_TextureBufferArb, OpenGl_VertexBuffer)