mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Cleaned up texture VRAM usage tracking.
--HG-- branch : minor
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "common/pixelformat.h"
|
||||
#include "common/Exception.h"
|
||||
#include "common/Optional.h"
|
||||
#include "common/int.h"
|
||||
#include "Drawable.h"
|
||||
#include "Quad.h"
|
||||
#include "vertex.h"
|
||||
@@ -101,13 +102,15 @@ public:
|
||||
WrapMode r = WRAP_CLAMP;
|
||||
};
|
||||
|
||||
Texture(TextureType texType);
|
||||
virtual ~Texture();
|
||||
|
||||
static Filter defaultFilter;
|
||||
static FilterMode defaultMipmapFilter;
|
||||
static float defaultMipmapSharpness;
|
||||
|
||||
static int64 totalGraphicsMemory;
|
||||
|
||||
Texture(TextureType texType);
|
||||
virtual ~Texture();
|
||||
|
||||
// Drawable.
|
||||
void draw(Graphics *gfx, const Matrix4 &m) override;
|
||||
|
||||
@@ -169,6 +172,7 @@ public:
|
||||
protected:
|
||||
|
||||
void initQuad();
|
||||
void setGraphicsMemorySize(int64 size);
|
||||
|
||||
TextureType texType;
|
||||
|
||||
@@ -194,6 +198,8 @@ protected:
|
||||
|
||||
StrongRef<Quad> quad;
|
||||
|
||||
int64 graphicsMemorySize;
|
||||
|
||||
private:
|
||||
|
||||
static StringMap<TextureType, TEXTURE_MAX_ENUM>::Entry texTypeEntries[];
|
||||
|
||||
Reference in New Issue
Block a user