Added love.graphics.getSystemLimit (resolves issue #840). Deprecated love.graphics.getMaxPointSize.

love.graphics.getSystemLimit currently accepts these enum strings: “pointsize”, “texturesize”, “multicanvas”, and “canvasfsaa”.
This commit is contained in:
Alex Szpakowski
2014-01-27 02:19:30 -04:00
parent 7556fde5e6
commit 988404e4ca
9 changed files with 119 additions and 38 deletions
+20
View File
@@ -109,6 +109,16 @@ bool Graphics::getConstant(RendererInfo in, const char *&out)
return rendererInfo.find(in, out);
}
bool Graphics::getConstant(const char *in, SystemLimit &out)
{
return systemLimits.find(in, out);
}
bool Graphics::getConstant(SystemLimit in, const char *&out)
{
return systemLimits.find(in, out);
}
StringMap<Graphics::DrawMode, Graphics::DRAW_MAX_ENUM>::Entry Graphics::drawModeEntries[] =
{
{ "line", Graphics::DRAW_LINE },
@@ -190,5 +200,15 @@ StringMap<Graphics::RendererInfo, Graphics::RENDERER_INFO_MAX_ENUM>::Entry Graph
StringMap<Graphics::RendererInfo, Graphics::RENDERER_INFO_MAX_ENUM> Graphics::rendererInfo(Graphics::rendererInfoEntries, sizeof(Graphics::rendererInfoEntries));
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},
{"canvasfsaa", Graphics::LIMIT_CANVAS_FSAA},
};
StringMap<Graphics::SystemLimit, Graphics::LIMIT_MAX_ENUM> Graphics::systemLimits(Graphics::systemLimitEntries, sizeof(Graphics::systemLimitEntries));
} // graphics
} // love