mirror of
https://github.com/glest/glest-source.git
synced 2025-08-13 03:44:00 +02:00
- some decent render improvement for surface terrain rendering (combined willvar's layer idea with visible quad, but no using vbo's at this point only vertex arrays)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "vec.h"
|
||||
#include "types.h"
|
||||
#include <map>
|
||||
#include "checksum.h"
|
||||
#include "leak_dumper.h"
|
||||
|
||||
using std::string;
|
||||
@@ -27,6 +28,7 @@ using Shared::Platform::int32;
|
||||
using Shared::Platform::uint32;
|
||||
using Shared::Platform::uint64;
|
||||
using Shared::Platform::float32;
|
||||
using Shared::Util::Checksum;
|
||||
|
||||
namespace Shared{ namespace Graphics{
|
||||
|
||||
@@ -188,6 +190,7 @@ protected:
|
||||
int components;
|
||||
uint8 *pixels;
|
||||
string path;
|
||||
Checksum crc;
|
||||
|
||||
public:
|
||||
//constructor & destructor
|
||||
@@ -210,6 +213,8 @@ public:
|
||||
void deletePixels();
|
||||
string getPath() const { return path;}
|
||||
uint64 getPixelByteCount() const;
|
||||
|
||||
Checksum * getCRC() { return &crc; }
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
@@ -223,6 +228,8 @@ protected:
|
||||
int components;
|
||||
uint8 *pixels;
|
||||
string path;
|
||||
Checksum crc;
|
||||
|
||||
public:
|
||||
//constructor & destructor
|
||||
Pixmap2D();
|
||||
@@ -289,6 +296,8 @@ public:
|
||||
string getPath() const { return path;}
|
||||
uint64 getPixelByteCount() const;
|
||||
|
||||
Checksum * getCRC() { return &crc; }
|
||||
|
||||
private:
|
||||
bool doDimensionsAgree(const Pixmap2D *pixmap);
|
||||
};
|
||||
@@ -306,6 +315,7 @@ protected:
|
||||
int slice;
|
||||
uint8 *pixels;
|
||||
string path;
|
||||
Checksum crc;
|
||||
|
||||
public:
|
||||
//constructor & destructor
|
||||
@@ -333,6 +343,8 @@ public:
|
||||
void deletePixels();
|
||||
string getPath() const { return path;}
|
||||
uint64 getPixelByteCount() const;
|
||||
|
||||
Checksum * getCRC() { return &crc; }
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
@@ -353,6 +365,7 @@ public:
|
||||
protected:
|
||||
Pixmap2D faces[6];
|
||||
string path[6];
|
||||
Checksum crc;
|
||||
|
||||
public:
|
||||
//init
|
||||
@@ -370,6 +383,8 @@ public:
|
||||
void deletePixels();
|
||||
string getPath(int face) const { return path[face];}
|
||||
uint64 getPixelByteCount() const;
|
||||
|
||||
Checksum * getCRC() { return &crc; }
|
||||
};
|
||||
|
||||
}}//end namespace
|
||||
|
@@ -90,6 +90,8 @@ public:
|
||||
virtual void setForceCompressionDisabled(bool value) { forceCompressionDisabled = value;}
|
||||
virtual bool getForceCompressionDisabled() const {return forceCompressionDisabled;}
|
||||
|
||||
virtual uint32 getCRC() = 0;
|
||||
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
@@ -112,6 +114,7 @@ public:
|
||||
virtual int getTextureWidth() const {return pixmap.getW();}
|
||||
virtual int getTextureHeight() const {return -1;}
|
||||
|
||||
virtual uint32 getCRC() { return pixmap.getCRC()->getSum(); }
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
@@ -133,6 +136,8 @@ public:
|
||||
|
||||
virtual int getTextureWidth() const {return pixmap.getW();}
|
||||
virtual int getTextureHeight() const {return pixmap.getH();}
|
||||
|
||||
virtual uint32 getCRC() { return pixmap.getCRC()->getSum(); }
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
@@ -154,6 +159,8 @@ public:
|
||||
|
||||
virtual int getTextureWidth() const {return pixmap.getW();}
|
||||
virtual int getTextureHeight() const {return pixmap.getH();}
|
||||
|
||||
virtual uint32 getCRC() { return pixmap.getCRC()->getSum(); }
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
@@ -175,6 +182,8 @@ public:
|
||||
|
||||
virtual int getTextureWidth() const {return -1;}
|
||||
virtual int getTextureHeight() const {return -1;}
|
||||
|
||||
virtual uint32 getCRC() { return pixmap.getCRC()->getSum(); }
|
||||
};
|
||||
|
||||
}}//end namespace
|
||||
|
Reference in New Issue
Block a user