Alex Szpakowski
113093e4fc
Separated canvas texture creation code from FBO creation code
2014-01-13 01:47:06 -04:00
Alex Szpakowski
fda005c5ff
love.graphics.getScissor now has a proper C++ module method
2014-01-09 22:49:00 -04:00
Alex Szpakowski
c64b3d2527
Renamed love.graphics.getMaxImageSize to love.graphics.getMaxTextureSize (old function is still there, but deprecated.)
2014-01-09 22:18:37 -04:00
Alex Szpakowski
1d3c4e125e
Make love.graphics.reset call love.graphics.origin instead of clearing the internal pixel size stack
2014-01-05 15:52:12 -04:00
Alex Szpakowski
510ed6f11e
Abstracted lua bindings for general Texture methods into wrap_Texture.cpp
2014-01-04 21:19:03 -04:00
Alex Szpakowski
3120a0e650
Goodbye 2013, hello 2014!
2014-01-03 17:28:58 -04:00
Alex Szpakowski
aa69a695d3
Canvases can now be used in SpriteBatches, ParticleSystems, and Meshes (resolves issue #782 ).
...
Canvases and Images are now subclasses of the new Texture class.
Added setTexture and getTexture methods for Meshes, ParticleSystems, and SpriteBatches (the old set/getImage methods are deprecated but not removed.)
Canvas texture coordinates are no longer flipped.
2014-01-03 17:07:12 -04:00
Alex Szpakowski
ab1cf7fdc5
Really fixed setting the scissor and then changing Canvases
2013-12-31 23:37:04 -04:00
Alex Szpakowski
98b258b75f
Fixed font textures in OpenGL returning black RGB values when a shader is active (reverts changeset 69b0b4e)
2013-12-31 22:09:04 -04:00
Alex Szpakowski
f3bd944cf5
Reduced the RAM and VRAM space taken up by TrueType font glyphs by 1/2.
2013-12-31 20:15:55 -04:00
Alex Szpakowski
a00c006c44
The graphics viewport is now properly restored when switching from an active Canvas to no Canvas (resolves issue #817 )
2013-12-30 23:52:46 -04:00
Alex Szpakowski
cd303c7c62
Added Mesh:setWireframe and Mesh:isWireframe.
...
This should *only* be used for debugging: the wireframe lines behave differently from regular love.graphics lines, and the functionality may not work on OpenGL ES.
2013-12-30 01:44:04 -04:00
Alex Szpakowski
27f36455e8
Fixed ParticleSystem:clone not duplicating position and area spread properly
2013-12-28 01:51:50 -04:00
Bart van Strien
90d041ed1b
Patch GLee for missing GLXContextID typedef after upstream (mesa) removal from header
2013-12-27 16:50:07 +01:00
Alex Szpakowski
bccac13432
Added ParticleSystem:clone()
2013-12-25 05:30:07 -04:00
Alex Szpakowski
d0d629a314
Fixed line width after love.graphics.scale with negative numbers (resolves issue #808 )
2013-12-18 03:15:44 -04:00
Alex Szpakowski
2ee869b0e8
Fixed some compiler warnings
2013-12-07 05:07:54 -04:00
Alex Szpakowski
c83e3c33c5
Fixed building as a universal binary on OS X (resolves issue #793 )
2013-11-20 17:55:30 -04:00
Alex Szpakowski
006f4dd600
Fixed
2013-11-17 05:47:38 -04:00
Alex Szpakowski
c0b28f9d07
Only apply an AMD-specific hack when generating mipmaps on AMD GPUs
2013-11-17 05:44:09 -04:00
Alex Szpakowski
0214bab0fe
Reduced initialization time of the graphics module in OS X by ~80ms
2013-11-15 15:41:15 -04:00
Alex Szpakowski
c8f5494900
Images, Canvases, Quads, and Fonts now have the same vertex winding order
2013-11-10 19:57:13 -04:00
Alex Szpakowski
c1b4f31578
Fixed detection for shader support
2013-11-06 01:50:54 -04:00
Alex Szpakowski
83d3eae1e7
Fixed error messages in Shader:send and love.math.newRandomGenerator to include the line number
2013-11-04 15:03:45 -04:00
vrld
3b04eeeec8
Fix #756 : Sending an Image to a shader does not retain it
...
Each shader contains a map of uniform name -> bound retainable Object. After
setting the uniform, sendImage() and sendCanvas() release() the Object with
the requested name (if present) and record the new Image/Canvas.
Related bugfix: Shader::attach() calls retain()/release() on the shader.
2013-11-03 18:27:36 +01:00
Alex Szpakowski
4e321697d3
Renamed Font:hasGlyph to Font:hasGlyphs, and expanded it to accept multiple arguments and full strings. Resolves issue #762 .
2013-10-25 21:56:32 -03:00
Alex Szpakowski
4e1c73c1f2
Removed Quad:flip (resolves issue #770 )
2013-10-24 17:46:21 -03:00
Alex Szpakowski
206a1abd81
Added Mesh:getVertices (resolves issue #771 )
2013-10-23 21:23:24 -03:00
Alex Szpakowski
faf483d156
Fixed error message when an invalid vertex index is given to Mesh:setVertex, Mesh:getVertex, and Mesh:setVertexMap (resolves issue #772 )
2013-10-23 13:52:04 -03:00
Alex Szpakowski
cfd030d4ab
Fixed building on Mac OS 10.9
2013-10-23 06:53:52 -03:00
rude
27de844472
Include <algorithm> when std::min/max is used.
...
It won't build in Visual Studio 2013 unless we do this.
2013-10-23 00:09:12 +02:00
Alex Szpakowski
d9da19d665
Error for misspelled / invalid window attributes in love.window.setMode (resolves issue #736 )
2013-10-20 13:17:57 -03:00
Alex Szpakowski
b556dde3cb
love.graphics.draw(image, quad, x, y, ...) now errors instead of shifting parameters if the quad argument is nil
2013-10-14 03:38:07 -03:00
Alex Szpakowski
43b3629e01
Improved performance of Image:refresh
2013-10-13 16:31:29 -03:00
Alex Szpakowski
2710c6c488
Renamed Source:s/getDistance to Source:s/getAttenuationDistances (resolves issue #632 ).
...
Fixed detection for mipmap sharpness support.
2013-10-10 23:05:45 -03:00
Alex Szpakowski
1c7c72472a
Removed unused wrap_Geometry.cpp file
2013-10-08 17:29:07 -03:00
Alex Szpakowski
206e184cde
love.graphics.print's x and y arguments now default to 0 (resolves issue #638 )
2013-10-07 23:52:30 -03:00
Alex Szpakowski
4fa7347e26
Reduced code duplication in love.graphics.newImage
2013-10-07 22:18:44 -03:00
Alex Szpakowski
fb34f5bc9e
Auto-padded NPOT images' texture coordinates are now scaled at draw time via the texture matrix (fixes auto-padded images with Meshes.) Also fixed love.graphics.newQuad.
...
--HG--
branch : Mesh
2013-10-06 23:25:29 -03:00
Alex Szpakowski
d161d5c0fc
Fixed an uncaught exception in Mesh:getVertexMap
...
--HG--
branch : Mesh
2013-10-01 23:52:20 -03:00
Alex Szpakowski
c426998b04
Fixed Mesh:setVertexMap when the mesh has more than 2^16-1 vertices (still needs more work to make it use smaller data types when available), added Mesh:setVertices
...
--HG--
branch : Mesh
2013-09-30 04:30:17 -03:00
Alex Szpakowski
857296f107
Merged default into Mesh
...
--HG--
branch : Mesh
2013-09-30 04:00:28 -03:00
Alex Szpakowski
95eedcd1be
Using auto for some iterators for less dense-looking code
2013-09-30 02:35:10 -03:00
Alex Szpakowski
b59e3d9c35
Meshes now use vertex buffers for more efficient drawing.
...
--HG--
branch : Mesh
2013-09-29 21:24:19 -03:00
Alex Szpakowski
c63e2ec624
Merged default into Mesh
...
--HG--
branch : Mesh
2013-09-29 04:58:26 -03:00
Alex Szpakowski
5f609c2e2b
OS X: switched to -std=c++11, fixed compilation, cleaned up obsolete files in src/platform/macosx/
2013-09-29 02:50:37 -03:00
Alex Szpakowski
1e696c4505
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
2013-09-28 18:26:47 -03:00
Alex Szpakowski
1be8ac5be4
Removed some unused functions and fixed up some wrap_ headers
2013-09-26 00:48:48 -03:00
Alex Szpakowski
bcee9a222b
Made some float/int/unsigned char conversions explicit, fixed ParticleSystem:getColors, fixed love.mouse.isDown with x1 and x2 buttons
2013-09-26 00:36:50 -03:00
Alex Szpakowski
5de43a7207
The Vertex struct is now recognized as POD by C++, also fixed the name to be consistent with other love structs
2013-09-24 11:09:18 -03:00