0031478: Visualization, TKOpenGl - allow uploading Cubemap in compressed DDS format...
[occt.git] / src / XCAFPrs / XCAFPrs_Texture.cxx
index 798cbab..3c5519c 100644 (file)
@@ -35,11 +35,22 @@ XCAFPrs_Texture::XCAFPrs_Texture (const Image_Texture& theImageSource,
               || theUnit == Graphic3d_TextureUnit_Emissive;
 }
 
+//=======================================================================
+//function : GetCompressedImage
+//purpose  :
+//=======================================================================
+Handle(Image_CompressedPixMap) XCAFPrs_Texture::GetCompressedImage (const Handle(Image_SupportedFormats)& theSupported)
+{
+  return myImageSource.ReadCompressedImage (theSupported);
+}
+
 //=======================================================================
 //function : GetImage
 //purpose  :
 //=======================================================================
-Handle(Image_PixMap) XCAFPrs_Texture::GetImage() const
+Handle(Image_PixMap) XCAFPrs_Texture::GetImage (const Handle(Image_SupportedFormats)& theSupported)
 {
-  return myImageSource.ReadImage();
+  Handle(Image_PixMap) anImage = myImageSource.ReadImage (theSupported);
+  convertToCompatible (theSupported, anImage);
+  return anImage;
 }