Allow custom memory management in IImage
This commit is contained in:
parent
a274f217ed
commit
27fcc4e266
@ -98,6 +98,8 @@ public:
|
|||||||
//! fills the surface with given color
|
//! fills the surface with given color
|
||||||
virtual void fill(const SColor &color) =0;
|
virtual void fill(const SColor &color) =0;
|
||||||
|
|
||||||
|
virtual void setDeleteMemory(bool val) = 0;
|
||||||
|
|
||||||
//! get the amount of Bits per Pixel of the given color format
|
//! get the amount of Bits per Pixel of the given color format
|
||||||
static u32 getBitsPerPixelFromFormat(const ECOLOR_FORMAT format)
|
static u32 getBitsPerPixelFromFormat(const ECOLOR_FORMAT format)
|
||||||
{
|
{
|
||||||
|
@ -457,6 +457,10 @@ inline SColor CImage::getPixelBox( s32 x, s32 y, s32 fx, s32 fy, s32 bias ) cons
|
|||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CImage::setDeleteMemory(bool val)
|
||||||
|
{
|
||||||
|
DeleteMemory = val;
|
||||||
|
}
|
||||||
|
|
||||||
} // end namespace video
|
} // end namespace video
|
||||||
} // end namespace irr
|
} // end namespace irr
|
||||||
|
@ -103,6 +103,8 @@ public:
|
|||||||
//! fills the surface with given color
|
//! fills the surface with given color
|
||||||
virtual void fill(const SColor &color);
|
virtual void fill(const SColor &color);
|
||||||
|
|
||||||
|
virtual void setDeleteMemory(bool val);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
//! assumes format and size has been set and creates the rest
|
//! assumes format and size has been set and creates the rest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user