mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user