Added love.graphics.getRendererInfo(infotype). Useful for creating more informative error reports and advanced debugging.

Returned string can be highly system-dependent, so don't rely on its output!

infotype can be "name", "version", "vendor", or "device"
This commit is contained in:
Alex Szpakowski
2013-05-05 16:47:42 -03:00
parent 08d6e658c1
commit 63404f7097
11 changed files with 112 additions and 32 deletions
+9 -4
View File
@@ -88,10 +88,7 @@ struct DisplayState
DisplayState()
{
color.set(255,255,255,255);
backgroundColor.r = 0;
backgroundColor.g = 0;
backgroundColor.b = 0;
backgroundColor.a = 255;
backgroundColor.set(0, 0, 0, 255);
blendMode = Graphics::BLEND_ALPHA;
lineStyle = Graphics::LINE_SMOOTH;
pointSize = 1.0f;
@@ -527,6 +524,14 @@ public:
**/
love::image::ImageData *newScreenshot(love::image::Image *image, bool copyAlpha = true);
/**
* Returns a string containing system-dependent renderer information.
* Returned string can vary greatly between systems! Do not rely on it for
* anything!
* @param infotype The type of information to return.
**/
std::string getRendererInfo(Graphics::RendererInfo infotype) const;
void push();
void pop();
void rotate(float r);