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