vrld
e9d0204cdc
Disallow concave shapes as geometry.
2013-05-12 13:01:05 +02:00
Alex Szpakowski
3b05ec0635
Geometries now automatically use per-vertex colors when drawing if any vertex has a custom color set, otherwise the constant color is used.
...
Still not a perfect solution, but it works better than before
2013-04-23 23:25:45 -07:00
vrld
1e54049fbb
Fix SpriteBatch.
...
Broken in my last commit (6e0f6a4).
2013-04-21 20:01:03 +02:00
vrld
71317c4359
Add Geometries (replaces Quads).
...
A Geometry is a collection of vertices describing a non self-intersecting
(simple) polygon. In addition to screen coordinates, the vertices have
attributes for texture coordinates (s,t) and color (r,g,b,a).
It can be used as a quad, to display distorted images, or anything in between.
Added:
^^^^^^
-- geometry from table, where table has the format:
-- info = {
-- {x,y, s,t, [r = 255, g = 255, b = 255, a = 255]}
-- {x,y, s,t, [r = 255, g = 255, b = 255, a = 255]}
-- ...
-- }
geom = love.graphics.newGeometry(info)
-- convenience wrapper for quads (same as before)
geom = love.graphics.newQuad(x,y, w,h, sw,sh)
-- retrieve vertex i (1-indexed)
x,y,s,t,r,g,b,a = geom:getVertex(i)
-- set vertex i (1-indexed)
geom:setVertex(i, x,y, s,t, [r,g,b,a])
-- flip geometry
geom:flip(x, y)
Renamed:
^^^^^^^^
love.graphics.drawq() -> love.graphics.drawg()
Removed:
^^^^^^^^
quad:setViewport()
quad:getViewport()
2013-04-21 18:53:13 +02:00
Alex Szpakowski
6fd3038405
Improved clarity/readability of internal OpenGL state shadowing functions
2013-04-17 01:06:33 -03:00
Alex Szpakowski
6a27e1aa2f
Ensure the current color is set properly after drawing particlesystems and spritebatches
2013-04-12 15:40:53 -03:00
Alex Szpakowski
d3cdb7d609
Added SpriteBatch:isEmpty() and SpriteBatch:isFull()
2013-03-01 17:32:38 -04:00
Alex Szpakowski
1d34dda48b
Removed SpriteBatch:remove(id) (reverted commit 2ca82dd)
...
The implementation had issues with sprite draw order when SpriteBatch:add used indices in the vertex buffer previously freed with SpriteBatch:remove
2013-02-24 09:47:03 -04:00
Alex Szpakowski
77ab120424
Fixed SpriteBatch file includes
2013-02-11 20:27:29 -04:00
Alex Szpakowski
ceb0ee6c7e
Added SpriteBatch:remove(id)
2013-02-11 18:27:57 -04:00
Alex Szpakowski
96161c66f6
Updated copyright text for the new year
2013-02-05 05:32:49 -04:00
Alexander Szpakowski
3e3f5c6bdd
Minor tweaks, balanced disable/enable clientstate calls in SpriteBatches
2013-01-08 05:33:22 -04:00
Alexander Szpakowski
6560019829
opengl graphics module files now always include OpenGL.h rather than GLee.h
2013-01-01 17:54:14 -04:00
vrld
b2f1408b12
Fix issue #495 : Large spritebatches doesn't render properly
2012-11-23 10:23:44 +01:00
Bart van Strien
7793e7f02f
CRLF to LF
2012-07-04 14:40:24 +02:00
rude
81c38e22d0
Applied the new style guidelines.
...
Well, sort of. Lot's more to be done, but this is a start.
2012-06-28 23:52:33 +02:00
vrld
3f365857ee
Replace glMapBufferARB() with temp memory + glBufferSubDataARB().
...
Instead of letting OpenGL manage the memory mapping, allocate a temporary
block of memory upon VBO:map(). Upon VBO::unmap() the block is copied to
graphics memory using glBufferSubDataARB() and then released.
Hopefully this will fix some weird error with Windows XP + old drivers, where
VBOs can be created, but the mapped memory cannot be allocated resulting in
the sprite batch drawing nothing at all.
According to the interwebs this could actually faster than using OpenGL mapped
memory, because there is no unnecessary syncing involved.
2012-03-07 23:24:29 +01:00
vrld
4947498488
Add VertexBuffer::Mapper for RAII vbo mapping
2012-03-07 22:59:23 +01:00
vrld
17dc8760b9
Replace VertexArray with VertexBuffer in SpriteBatch (less confusing).
2012-03-07 22:35:21 +01:00
Bill Meltsner
be55579a22
Happy New Year, have an enormous diff
2012-01-09 02:41:11 -06:00
Bart van Strien
1509403ca7
Add SpriteBatch:getImage (issue #321 )
2012-01-08 13:46:01 +01:00
Bart van Strien
0aae9684b3
Automated formatting fix
2011-11-16 11:32:41 +01:00
Bart van Strien
dc66ea20c1
Add SpriteBatch:set(q) and make add(q) return the index
2011-10-20 20:19:01 +02:00
Bart van Strien
b14ca78109
Add string mapping for spritebatch usage parameter (issue #264 )
2011-08-24 12:11:08 +02:00
rude
480f936815
Added 'VertexBuffer' abstraction. SpriteBatches are now always supported.
...
Also improved memory usage in SpriteBatch. (No need to retain full copy of
sprites in memory. Can read that data back later to save data from OpenGL
context destruction).
2011-08-12 11:35:14 +02:00
Bart van Strien
3c5c4ee604
Add SpriteBatch support to love.graphics.isSupported
2011-07-24 15:37:02 +02:00
rude
387a8ab2dc
Issue #262 : Add per-sprite colors.
2011-07-23 17:12:29 +02:00
vrld
6ea187b2f1
Use *ARB versions for VBOs in SpriteBatch. Throw error if SpriteBatch not
...
supported. Prettier overloading of SpriteBatch:add[q]().
2011-07-05 16:06:14 +02:00
vrld
d420d68048
Add shear transformation and transform object (issue #152 ).
...
Add origin parameters to love.graphics.print.
New shear parameters kx,ky for:
- love.graphics.draw,
- love.graphics.drawq,
- love.graphics.print,
- SpriteBatch:add,
- SpriteBatch:addq.
Transform objects apply to:
- love.graphics.draw,
- love.graphics.drawq,
- love.graphics.print.
2011-07-05 14:33:34 +02:00
Bart van Strien
bd158faaaa
Revise spritebatch locking (binding now) (issue #231 )
2011-06-10 14:40:37 +02:00
José Romero
dc2d87a90f
Apply patch for issue #219
2011-04-27 16:35:14 +02:00
Bill Meltsner
fde708160e
bringing in the new year by changing every 2010 to 2011
2011-01-15 14:40:27 -06:00
Bill Meltsner
944a1a6e8b
SpriteBatches are now affected by love.graphics.setColor()
2010-08-27 08:52:14 -05:00
rude
9c4926b7da
Fixed double-transform spritebatch bug.
2010-02-20 18:19:16 +01:00
rude
b94b5e6a9d
Fixed SpriteBatch using the wrong type for GL_ELEMENT_ARRAY_BUFFER.
2010-02-06 13:50:52 +01:00
rude
aa01c984b9
Updated all dates to 2010.
2010-01-31 16:54:47 +01:00
rude
d58182c4c2
SpriteBatch is now Volatile and can deal with display resolution changes.
2009-08-18 18:43:59 +02:00
rude
c52c218ba1
Renamed Frame to Quad; added drawq/addq; fixed some bugs.
2009-08-17 23:35:04 +02:00
rude
5c068db487
Added locking to SpriteBatch, and conf.lua.
2009-07-27 15:17:54 +02:00
rude
4f32377efa
Added working SpriteBatch.
2009-07-27 02:10:51 +02:00
rude
84bf839872
Removed classes which should be implemented in Lua (or need of re-implementation).
2009-07-26 23:08:40 +02:00
rude
dcb3dfd83d
Initial Mercurial commit.
2009-07-26 15:46:49 +02:00