moved Mesh:setWireframe to love.graphics.setWireframe (affects all draws until it's disabled.)

Wireframe mode should only be used for debugging: the wireframe lines behave differently than regular lines, their widths aren't affected by the graphics scale, and the mode isn't available on OpenGL ES.
This commit is contained in:
Alex Szpakowski
2014-02-03 04:59:58 -04:00
parent ce4fdf4ac9
commit b625bb6624
8 changed files with 47 additions and 47 deletions
+17
View File
@@ -81,6 +81,8 @@ struct DisplayState
// Color mask.
bool colorMask[4];
bool wireframe;
// Default values.
DisplayState()
{
@@ -93,6 +95,7 @@ struct DisplayState
pointStyle = Graphics::POINT_SMOOTH;
scissor = false;
colorMask[0] = colorMask[1] = colorMask[2] = colorMask[3] = true;
wireframe = false;
}
};
@@ -334,6 +337,19 @@ public:
**/
PointStyle getPointStyle() const;
/**
* Sets whether graphics will be drawn as wireframe lines instead of filled
* triangles (has no effect for drawn points.)
* This should only be used as a debugging tool. The wireframe lines do not
* behave the same as regular love.graphics lines.
**/
void setWireframe(bool enable);
/**
* Gets whether wireframe drawing mode is enabled.
**/
bool isWireframe() const;
/**
* Draws text at the specified coordinates, with rotation and
* scaling along both axes.
@@ -460,6 +476,7 @@ private:
GLint matrixLimit;
GLint userMatrices;
bool colorMask[4];
bool wireframe;
int width;
int height;