mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Merged default into minor
--HG-- branch : minor
This commit is contained in:
@@ -110,6 +110,17 @@ public:
|
||||
CLEAR_MAX_ENUM
|
||||
};
|
||||
|
||||
enum StatType
|
||||
{
|
||||
STAT_DRAW_CALLS,
|
||||
STAT_CANVAS_SWITCHES,
|
||||
STAT_CANVASES,
|
||||
STAT_IMAGES,
|
||||
STAT_FONTS,
|
||||
STAT_TEXTURE_MEMORY,
|
||||
STAT_MAX_ENUM
|
||||
};
|
||||
|
||||
struct RendererInfo
|
||||
{
|
||||
std::string name;
|
||||
@@ -118,6 +129,16 @@ public:
|
||||
std::string device;
|
||||
};
|
||||
|
||||
struct Stats
|
||||
{
|
||||
int drawCalls;
|
||||
int canvasSwitches;
|
||||
int canvases;
|
||||
int images;
|
||||
int fonts;
|
||||
size_t textureMemory;
|
||||
};
|
||||
|
||||
virtual ~Graphics();
|
||||
|
||||
// Implements Module.
|
||||
@@ -168,6 +189,9 @@ public:
|
||||
static bool getConstant(const char *in, ClearType &out);
|
||||
static bool getConstant(ClearType in, const char *&out);
|
||||
|
||||
static bool getConstant(const char *in, StatType &out);
|
||||
static bool getConstant(StatType in, const char *&out);
|
||||
|
||||
private:
|
||||
|
||||
static StringMap<DrawMode, DRAW_MAX_ENUM>::Entry drawModeEntries[];
|
||||
@@ -197,6 +221,9 @@ private:
|
||||
static StringMap<ClearType, CLEAR_MAX_ENUM>::Entry clearTypeEntries[];
|
||||
static StringMap<ClearType, CLEAR_MAX_ENUM> clearTypes;
|
||||
|
||||
static StringMap<StatType, STAT_MAX_ENUM>::Entry statTypeEntries[];
|
||||
static StringMap<StatType, STAT_MAX_ENUM> statTypes;
|
||||
|
||||
}; // Graphics
|
||||
|
||||
} // graphics
|
||||
|
||||
Reference in New Issue
Block a user