0031478: Visualization, TKOpenGl - allow uploading Cubemap in compressed DDS format...
[occt.git] / src / Graphic3d / Graphic3d_CubeMapPacked.hxx
index 4a6da46..41a4f94 100644 (file)
@@ -25,23 +25,26 @@ class Graphic3d_CubeMapPacked : public Graphic3d_CubeMap
   DEFINE_STANDARD_RTTIEXT(Graphic3d_CubeMapPacked, Graphic3d_CubeMap)
 public:
 
-  //! Initialization to load cubemef from file.
+  //! Initialization to load cubemap from file.
   //! @theFileName - path to the cubemap image
-  //! @theOrder - array conaining six different indexes of cubemap sides which maps tile grid to cubemap sides
+  //! @theOrder - array containing six different indexes of cubemap sides which maps tile grid to cubemap sides
   Standard_EXPORT Graphic3d_CubeMapPacked (const TCollection_AsciiString&        theFileName,
                                            const Graphic3d_ValidatedCubeMapOrder theOrder = Graphic3d_CubeMapOrder::Default());
 
   //! Initialization to set cubemap directly by PixMap.
   //! @thePixMap - origin PixMap
-  //! @theOrder - array conaining six different indexes of cubemap sides which maps tile grid to cubemap sides
+  //! @theOrder - array containing six different indexes of cubemap sides which maps tile grid to cubemap sides
   Standard_EXPORT Graphic3d_CubeMapPacked (const Handle(Image_PixMap)&           theImage,
                                            const Graphic3d_ValidatedCubeMapOrder theOrder = Graphic3d_CubeMapOrder::Default());
 
+  //! Returns current cubemap side as compressed PixMap.
+  Standard_EXPORT virtual Handle(Image_CompressedPixMap) CompressedValue (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE;
+
   //! Returns current cubemap side as PixMap.
   //! Resulting PixMap is memory wrapper over original image.
   //! Returns null handle if current side or whole cubemap is invalid.
   //! Origin image has to contain six quad tiles having one sizes without any gaps to be valid.  
-  Standard_EXPORT Handle(Image_PixMap) Value() Standard_OVERRIDE;
+  Standard_EXPORT virtual Handle(Image_PixMap) Value (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE;
 
   //! Empty destructor.
   ~Graphic3d_CubeMapPacked() {}
@@ -57,7 +60,8 @@ private:
 
   //! Tries to load image from file and checks it after that.
   //! Does nothing in case of fail.
-  void tryLoadImage (const TCollection_AsciiString &theFilePath);
+  void tryLoadImage (const Handle(Image_SupportedFormats)& theSupported,
+                     const TCollection_AsciiString &theFilePath);
 
 protected: