//! constructor\r
IImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size, bool deleteMemory) :\r
Format(format), Size(size), Data(0), MipMapsData(0), BytesPerPixel(0), Pitch(0), DeleteMemory(deleteMemory), DeleteMipMapsMemory(false)\r
+#if defined(IRRLICHT_sRGB)\r
+ ,Format_sRGB(1)\r
+#endif\r
{\r
BytesPerPixel = getBitsPerPixelFromFormat(Format) / 8;\r
Pitch = BytesPerPixel * Size.Width;\r
return Format;\r
}\r
\r
+#if defined(IRRLICHT_sRGB)\r
+ //! Texture is linear/sRGB (should be part of ColorFormat: default yes)\r
+ int get_sRGB() const\r
+ {\r
+ return Format_sRGB;\r
+ }\r
+ void set_sRGB(int val)\r
+ {\r
+ Format_sRGB = val;\r
+ }\r
+#endif\r
+\r
//! Returns width and height of image data.\r
const core::dimension2d<u32>& getDimension() const\r
{\r
return false;\r
}\r
\r
+#if defined(PATCH_SUPERTUX_8_0_1_with_1_9_0)\r
+ static bool isRenderTargetOnlyFormat(const ECOLOR_FORMAT format)\r
+ {\r
+ switch (format)\r
+ {\r
+ case ECF_A1R5G5B5:\r
+ case ECF_R5G6B5:\r
+ case ECF_R8G8B8:\r
+ case ECF_A8R8G8B8:\r
+ return false;\r
+ default:\r
+ return true;\r
+ }\r
+ }\r
+#endif\r
+\r
protected:\r
ECOLOR_FORMAT Format;\r
core::dimension2d<u32> Size;\r
bool DeleteMipMapsMemory;\r
\r
core::irrAllocator<u8> Allocator;\r
+#if defined(IRRLICHT_sRGB)\r
+ int Format_sRGB;\r
+#endif\r
};\r
\r
+\r
} // end namespace video\r
} // end namespace irr\r
\r