|
@@ -44,7 +44,6 @@ Mesh::Mesh(const std::vector<Vertex> &verts, Mesh::DrawMode mode)
|
|
|
, range_max(-1)
|
|
|
, texture(nullptr)
|
|
|
, colors_enabled(false)
|
|
|
- , wireframe(false)
|
|
|
{
|
|
|
setVertices(verts);
|
|
|
}
|
|
@@ -59,7 +58,6 @@ Mesh::Mesh(int vertexcount, Mesh::DrawMode mode)
|
|
|
, range_max(-1)
|
|
|
, texture(nullptr)
|
|
|
, colors_enabled(false)
|
|
|
- , wireframe(false)
|
|
|
{
|
|
|
if (vertexcount < 1)
|
|
|
throw love::Exception("Invalid number of vertices.");
|
|
@@ -278,16 +276,6 @@ bool Mesh::hasVertexColors() const
|
|
|
return colors_enabled;
|
|
|
}
|
|
|
|
|
|
-void Mesh::setWireframe(bool enable)
|
|
|
-{
|
|
|
- wireframe = enable;
|
|
|
-}
|
|
|
-
|
|
|
-bool Mesh::isWireframe() const
|
|
|
-{
|
|
|
- return wireframe;
|
|
|
-}
|
|
|
-
|
|
|
void Mesh::draw(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky)
|
|
|
{
|
|
|
const size_t pos_offset = offsetof(Vertex, x);
|
|
@@ -326,9 +314,6 @@ void Mesh::draw(float x, float y, float angle, float sx, float sy, float ox, flo
|
|
|
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Vertex), vbo->getPointer(color_offset));
|
|
|
}
|
|
|
|
|
|
- if (wireframe)
|
|
|
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
|
|
-
|
|
|
GLenum mode = getGLDrawMode(draw_mode);
|
|
|
|
|
|
gl.prepareDraw();
|
|
@@ -374,9 +359,6 @@ void Mesh::draw(float x, float y, float angle, float sx, float sy, float ox, flo
|
|
|
glDrawArrays(mode, min, max - min + 1);
|
|
|
}
|
|
|
|
|
|
- if (wireframe)
|
|
|
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
|
|
-
|
|
|
glDisableClientState(GL_VERTEX_ARRAY);
|
|
|
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
|
|
|