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
+2 -2
View File
@@ -680,14 +680,14 @@ StringMap<Type, TYPE_MAX_ENUM>::Entry typeEntries[] =
// Graphics
{"Drawable", GRAPHICS_DRAWABLE_ID},
{"DrawGable", GRAPHICS_DRAWGABLE_ID},
{"Image", GRAPHICS_IMAGE_ID},
{"Geometry", GRAPHICS_GEOMETRY_ID},
{"Quad", GRAPHICS_QUAD_ID},
{"Font", GRAPHICS_FONT_ID},
{"ParticleSystem", GRAPHICS_PARTICLE_SYSTEM_ID},
{"SpriteBatch", GRAPHICS_SPRITE_BATCH_ID},
{"Canvas", GRAPHICS_CANVAS_ID},
{"Shader", GRAPHICS_SHADER_ID},
{"Mesh", GRAPHICS_MESH_ID},
// Image
{"ImageData", IMAGE_IMAGE_DATA_ID},