mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-25 23:29:24 +00:00
STBImage
STB used for loading and writing images.
This commit is contained in:
parent
d671f2611e
commit
108ba34c08
21 changed files with 20355 additions and 1737 deletions
|
|
@ -71,10 +71,10 @@ public:
|
|||
struct Registration
|
||||
{
|
||||
/// The read function prototype.
|
||||
typedef bool(*ReadFunc)(Stream &stream, GBitmap *bitmap);
|
||||
typedef bool(*ReadFunc)(const Torque::Path& path, GBitmap* bitmap);
|
||||
|
||||
/// The write function prototype. Compression levels are image-specific - see their registration declaration for details.
|
||||
typedef bool(*WriteFunc)(GBitmap *bitmap, Stream &stream, U32 compressionLevel);
|
||||
typedef bool(*WriteFunc)(const Torque::Path& path, GBitmap* bitmap, U32 compressionLevel);
|
||||
|
||||
/// Used to sort the registrations so that
|
||||
/// lookups occur in a fixed order.
|
||||
|
|
@ -241,13 +241,13 @@ public:
|
|||
/// Read a bitmap from a stream
|
||||
/// @param bmType This is a file extension to describe the type of the data [i.e. "png" for PNG file, etc]
|
||||
/// @param ioStream The stream to read from
|
||||
bool readBitmap( const String &bmType, Stream &ioStream );
|
||||
bool readBitmap(const String& bmType, const Torque::Path& path);
|
||||
|
||||
/// Write a bitmap to a stream
|
||||
/// @param bmType This is a file extension to describe the type of the data [i.e. "png" for PNG file, etc]
|
||||
/// @param ioStream The stream to read from
|
||||
/// @param compressionLevel Image format-specific compression level. If set to U32_MAX, we use the default compression defined when the format was registered.
|
||||
bool writeBitmap( const String &bmType, Stream &ioStream, U32 compressionLevel = U32_MAX );
|
||||
bool writeBitmap( const String &bmType, const Torque::Path& path, U32 compressionLevel = U32_MAX );
|
||||
|
||||
bool readMNG(Stream& io_rStream); // located in bitmapMng.cc
|
||||
bool writeMNG(Stream& io_rStream) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue