Improved performance of Image:refresh

This commit is contained in:
Alex Szpakowski
2013-10-13 16:31:29 -03:00
parent e068aab6ea
commit 43b3629e01
3 changed files with 49 additions and 61 deletions
+7 -7
View File
@@ -70,8 +70,8 @@ public:
**/
virtual ~Image();
float getWidth() const;
float getHeight() const;
int getWidth() const;
int getHeight() const;
const Vertex *getVertices() const;
@@ -166,7 +166,10 @@ private:
love::image::CompressedData *cdata;
// Width and height of the hardware texture.
float width, height;
int width, height;
// Real dimensions of the texture, if it was auto-padded to POT size.
int paddedWidth, paddedHeight;
// OpenGL texture identifier.
GLuint texture;
@@ -174,9 +177,6 @@ private:
// The source vertices of the image.
Vertex vertices[4];
// The scale applied to texcoords for NPOT images without NPOT support.
love::Vector texCoordScale;
// Mipmap texture LOD bias (sharpness) value.
float mipmapSharpness;
@@ -198,7 +198,7 @@ private:
void preload();
void uploadTexturePadded(float p2width, float p2height);
void uploadTexturePadded();
void uploadTexture();
void uploadCompressedMipmaps();