Merged default into minor

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2014-08-21 16:53:43 -03:00
23 changed files with 282 additions and 19 deletions
+27
View File
@@ -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