|
@@ -34,7 +34,7 @@ bool Graphics::getConstant(const char *in, DrawMode &out)
|
|
|
return drawModes.find(in, out);
|
|
|
}
|
|
|
|
|
|
-bool Graphics::getConstant(DrawMode in, const char *&out)
|
|
|
+bool Graphics::getConstant(DrawMode in, const char *&out)
|
|
|
{
|
|
|
return drawModes.find(in, out);
|
|
|
}
|
|
@@ -44,7 +44,7 @@ bool Graphics::getConstant(const char *in, BlendMode &out)
|
|
|
return blendModes.find(in, out);
|
|
|
}
|
|
|
|
|
|
-bool Graphics::getConstant(BlendMode in, const char *&out)
|
|
|
+bool Graphics::getConstant(BlendMode in, const char *&out)
|
|
|
{
|
|
|
return blendModes.find(in, out);
|
|
|
}
|
|
@@ -54,7 +54,7 @@ bool Graphics::getConstant(const char *in, LineStyle &out)
|
|
|
return lineStyles.find(in, out);
|
|
|
}
|
|
|
|
|
|
-bool Graphics::getConstant(LineStyle in, const char *&out)
|
|
|
+bool Graphics::getConstant(LineStyle in, const char *&out)
|
|
|
{
|
|
|
return lineStyles.find(in, out);
|
|
|
}
|
|
@@ -64,7 +64,7 @@ bool Graphics::getConstant(const char *in, LineJoin &out)
|
|
|
return lineJoins.find(in, out);
|
|
|
}
|
|
|
|
|
|
-bool Graphics::getConstant(LineJoin in, const char *&out)
|
|
|
+bool Graphics::getConstant(LineJoin in, const char *&out)
|
|
|
{
|
|
|
return lineJoins.find(in, out);
|
|
|
}
|
|
@@ -74,7 +74,7 @@ bool Graphics::getConstant(const char *in, Support &out)
|
|
|
return support.find(in, out);
|
|
|
}
|
|
|
|
|
|
-bool Graphics::getConstant(Support in, const char *&out)
|
|
|
+bool Graphics::getConstant(Support in, const char *&out)
|
|
|
{
|
|
|
return support.find(in, out);
|
|
|
}
|
|
@@ -111,76 +111,77 @@ bool Graphics::getConstant(StatType in, const char *&out)
|
|
|
|
|
|
StringMap<Graphics::DrawMode, Graphics::DRAW_MAX_ENUM>::Entry Graphics::drawModeEntries[] =
|
|
|
{
|
|
|
- { "line", Graphics::DRAW_LINE },
|
|
|
- { "fill", Graphics::DRAW_FILL },
|
|
|
+ { "line", DRAW_LINE },
|
|
|
+ { "fill", DRAW_FILL },
|
|
|
};
|
|
|
|
|
|
StringMap<Graphics::DrawMode, Graphics::DRAW_MAX_ENUM> Graphics::drawModes(Graphics::drawModeEntries, sizeof(Graphics::drawModeEntries));
|
|
|
|
|
|
StringMap<Graphics::BlendMode, Graphics::BLEND_MAX_ENUM>::Entry Graphics::blendModeEntries[] =
|
|
|
{
|
|
|
- { "alpha", Graphics::BLEND_ALPHA },
|
|
|
- { "add", Graphics::BLEND_ADD },
|
|
|
- { "subtract", Graphics::BLEND_SUBTRACT },
|
|
|
- { "multiply", Graphics::BLEND_MULTIPLY },
|
|
|
- { "premultiplied", Graphics::BLEND_PREMULTIPLIED },
|
|
|
- { "screen", Graphics::BLEND_SCREEN },
|
|
|
- { "replace", Graphics::BLEND_REPLACE },
|
|
|
+ { "alpha", BLEND_ALPHA },
|
|
|
+ { "add", BLEND_ADD },
|
|
|
+ { "subtract", BLEND_SUBTRACT },
|
|
|
+ { "multiply", BLEND_MULTIPLY },
|
|
|
+ { "premultiplied", BLEND_PREMULTIPLIED },
|
|
|
+ { "screen", BLEND_SCREEN },
|
|
|
+ { "replace", BLEND_REPLACE },
|
|
|
};
|
|
|
|
|
|
StringMap<Graphics::BlendMode, Graphics::BLEND_MAX_ENUM> Graphics::blendModes(Graphics::blendModeEntries, sizeof(Graphics::blendModeEntries));
|
|
|
|
|
|
StringMap<Graphics::LineStyle, Graphics::LINE_MAX_ENUM>::Entry Graphics::lineStyleEntries[] =
|
|
|
{
|
|
|
- { "smooth", Graphics::LINE_SMOOTH },
|
|
|
- { "rough", Graphics::LINE_ROUGH }
|
|
|
+ { "smooth", LINE_SMOOTH },
|
|
|
+ { "rough", LINE_ROUGH }
|
|
|
};
|
|
|
|
|
|
StringMap<Graphics::LineStyle, Graphics::LINE_MAX_ENUM> Graphics::lineStyles(Graphics::lineStyleEntries, sizeof(Graphics::lineStyleEntries));
|
|
|
|
|
|
StringMap<Graphics::LineJoin, Graphics::LINE_JOIN_MAX_ENUM>::Entry Graphics::lineJoinEntries[] =
|
|
|
{
|
|
|
- { "none", Graphics::LINE_JOIN_NONE },
|
|
|
- { "miter", Graphics::LINE_JOIN_MITER },
|
|
|
- { "bevel", Graphics::LINE_JOIN_BEVEL }
|
|
|
+ { "none", LINE_JOIN_NONE },
|
|
|
+ { "miter", LINE_JOIN_MITER },
|
|
|
+ { "bevel", LINE_JOIN_BEVEL }
|
|
|
};
|
|
|
|
|
|
StringMap<Graphics::LineJoin, Graphics::LINE_JOIN_MAX_ENUM> Graphics::lineJoins(Graphics::lineJoinEntries, sizeof(Graphics::lineJoinEntries));
|
|
|
|
|
|
StringMap<Graphics::Support, Graphics::SUPPORT_MAX_ENUM>::Entry Graphics::supportEntries[] =
|
|
|
{
|
|
|
- { "multicanvas", Graphics::SUPPORT_MULTI_CANVAS },
|
|
|
- { "srgb", Graphics::SUPPORT_SRGB },
|
|
|
+ { "multicanvas", SUPPORT_MULTI_CANVAS },
|
|
|
+ { "multicanvasformats", SUPPORT_MULTI_CANVAS_FORMATS },
|
|
|
+ { "srgb", SUPPORT_SRGB },
|
|
|
};
|
|
|
|
|
|
StringMap<Graphics::Support, Graphics::SUPPORT_MAX_ENUM> Graphics::support(Graphics::supportEntries, sizeof(Graphics::supportEntries));
|
|
|
|
|
|
StringMap<Graphics::SystemLimit, Graphics::LIMIT_MAX_ENUM>::Entry Graphics::systemLimitEntries[] =
|
|
|
{
|
|
|
- {"pointsize", Graphics::LIMIT_POINT_SIZE},
|
|
|
- {"texturesize", Graphics::LIMIT_TEXTURE_SIZE},
|
|
|
- {"multicanvas", Graphics::LIMIT_MULTI_CANVAS},
|
|
|
- {"canvasmsaa", Graphics::LIMIT_CANVAS_MSAA},
|
|
|
+ { "pointsize", LIMIT_POINT_SIZE },
|
|
|
+ { "texturesize", LIMIT_TEXTURE_SIZE },
|
|
|
+ { "multicanvas", LIMIT_MULTI_CANVAS },
|
|
|
+ { "canvasmsaa", LIMIT_CANVAS_MSAA },
|
|
|
};
|
|
|
|
|
|
StringMap<Graphics::SystemLimit, Graphics::LIMIT_MAX_ENUM> Graphics::systemLimits(Graphics::systemLimitEntries, sizeof(Graphics::systemLimitEntries));
|
|
|
|
|
|
StringMap<Graphics::StackType, Graphics::STACK_MAX_ENUM>::Entry Graphics::stackTypeEntries[] =
|
|
|
{
|
|
|
- {"all", Graphics::STACK_ALL},
|
|
|
- {"transform", Graphics::STACK_TRANSFORM},
|
|
|
+ { "all", STACK_ALL },
|
|
|
+ { "transform", STACK_TRANSFORM },
|
|
|
};
|
|
|
|
|
|
StringMap<Graphics::StackType, Graphics::STACK_MAX_ENUM> Graphics::stackTypes(Graphics::stackTypeEntries, sizeof(Graphics::stackTypeEntries));
|
|
|
|
|
|
StringMap<Graphics::StatType, Graphics::STAT_MAX_ENUM>::Entry Graphics::statTypeEntries[] =
|
|
|
{
|
|
|
- {"drawcalls", Graphics::STAT_DRAW_CALLS},
|
|
|
- {"canvasswitches", Graphics::STAT_CANVAS_SWITCHES},
|
|
|
- {"canvases", Graphics::STAT_CANVASES},
|
|
|
- {"images", Graphics::STAT_IMAGES},
|
|
|
- {"fonts", Graphics::STAT_FONTS},
|
|
|
- {"texturememory", Graphics::STAT_TEXTURE_MEMORY},
|
|
|
+ { "drawcalls", STAT_DRAW_CALLS },
|
|
|
+ { "canvasswitches", STAT_CANVAS_SWITCHES },
|
|
|
+ { "canvases", STAT_CANVASES },
|
|
|
+ { "images", STAT_IMAGES },
|
|
|
+ { "fonts", STAT_FONTS },
|
|
|
+ { "texturememory", STAT_TEXTURE_MEMORY },
|
|
|
};
|
|
|
|
|
|
StringMap<Graphics::StatType, Graphics::STAT_MAX_ENUM> Graphics::statTypes(Graphics::statTypeEntries, sizeof(Graphics::statTypeEntries));
|