mirror of
https://github.com/glest/glest-source.git
synced 2025-08-11 10:54:01 +02:00
- added new default PNG format for doing screenshots AND the saving to disk is queued in a background thread allowing almost no delay when saving many screenshots!
This commit is contained in:
@@ -33,7 +33,7 @@ namespace Shared{ namespace Graphics{
|
||||
// class PixmapIo
|
||||
// =====================================================
|
||||
|
||||
class PixmapIo{
|
||||
class PixmapIo {
|
||||
protected:
|
||||
int w;
|
||||
int h;
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
// class PixmapIoTga
|
||||
// =====================================================
|
||||
|
||||
class PixmapIoTga: public PixmapIo{
|
||||
class PixmapIoTga: public PixmapIo {
|
||||
private:
|
||||
FILE *file;
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
// class PixmapIoBmp
|
||||
// =====================================================
|
||||
|
||||
class PixmapIoBmp: public PixmapIo{
|
||||
class PixmapIoBmp: public PixmapIo {
|
||||
private:
|
||||
FILE *file;
|
||||
|
||||
@@ -94,6 +94,27 @@ public:
|
||||
virtual void write(uint8 *pixels);
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
// class PixmapIoBmp
|
||||
// =====================================================
|
||||
|
||||
class PixmapIoPng: public PixmapIo {
|
||||
private:
|
||||
FILE *file;
|
||||
string path;
|
||||
|
||||
public:
|
||||
PixmapIoPng();
|
||||
virtual ~PixmapIoPng();
|
||||
|
||||
virtual void openRead(const string &path);
|
||||
virtual void read(uint8 *pixels);
|
||||
virtual void read(uint8 *pixels, int components);
|
||||
|
||||
virtual void openWrite(const string &path, int w, int h, int components);
|
||||
virtual void write(uint8 *pixels);
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
// class Pixmap1D
|
||||
// =====================================================
|
||||
@@ -157,7 +178,7 @@ public:
|
||||
void save(const string &path);
|
||||
void saveBmp(const string &path);
|
||||
void saveTga(const string &path);
|
||||
|
||||
void savePng(const string &path);
|
||||
|
||||
//get
|
||||
int getW() const {return w;}
|
||||
|
Reference in New Issue
Block a user