Added Mesh objects and love.graphics.newMesh. Mesh objects are similar to Geometry but they're drawables (the relationship between meshes and images is the opposite of geometry and images.)

Removed Geometry objects and re-added Quads.

example:
local vertices = {{0, 0, 0, 0}, {100, 0, 1, 0}, {100, 100, 1, 1}, {0, 100, 0, 1}}
mesh = love.graphics.newMesh(vertices, image, "fan")
..
love.graphics.draw(mesh, 0, 0)

--HG--
branch : Mesh
This commit is contained in:
Alex Szpakowski
2013-09-28 18:26:47 -03:00
parent 5de43a7207
commit 1e696c4505
28 changed files with 1141 additions and 956 deletions
+3 -4
View File
@@ -84,9 +84,9 @@ public:
void draw(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) const;
/**
* @copydoc DrawGable::drawg()
* @copydoc DrawQable::drawq()
**/
void drawg(love::graphics::Geometry *geom, float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) const;
void drawq(Quad *quad, float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) const;
/**
* Sets the filter mode.
@@ -145,10 +145,9 @@ public:
private:
Vertex *scaleNPOT(const Vertex *v, size_t count) const;
void uploadDefaultTexture();
void drawv(const Matrix &t, const Vertex *v, GLsizei count = 4, GLenum mode = GL_QUADS, const uint16 *e = 0, GLsizei ecount = 0) const;
void drawv(const Matrix &t, const Vertex *v) const;
friend class Shader;
GLuint getTextureName() const