Alex Szpakowski
2cc53bb85c
Added Canvas MSAA support in OpenGL ES 2 on iOS and when ANGLE is used on Windows.
...
--HG--
branch : minor
2015-02-24 03:07:46 -04:00
Alex Szpakowski
517ee44e84
Fixed Canvases on iOS, added support for Canvas MSAA on OpenGL ES 3.
...
--HG--
branch : minor
2015-02-24 02:36:32 -04:00
Alex Szpakowski
1aaa8737ab
Merged default into minor
...
--HG--
branch : minor
2015-02-22 02:38:09 -04:00
Alex Szpakowski
59e1cf23e8
Probably fixed the Windows build
2015-02-22 02:30:26 -04:00
Alex Szpakowski
622b737019
Merged default into minor
...
--HG--
branch : minor
2015-02-21 03:53:33 -04:00
Alex Szpakowski
813061c0e0
Fix the stencil buffer in Canvases when the graphics driver uses a MSAA value for the Canvas' buffers that's greater than the number of requested MSAA samples.
...
Fixes https://love2d.org/forums/viewtopic.php?f=4&t=79701
2015-02-21 01:56:17 -04:00
Alex Szpakowski
ebc68023a7
Fix many warnings about implicit integer conversions when compiling for 64 bits.
...
--HG--
branch : minor
2015-02-20 01:20:08 -04:00
Alex Szpakowski
5b98083e01
Merged default into minor
...
--HG--
branch : minor
2015-01-22 02:18:56 -04:00
Alex Szpakowski
e71c15e650
Fixed a minor memory leak caused by certain rare error conditions in love.graphics.newCanvas.
2015-01-22 02:16:49 -04:00
Alex Szpakowski
9de0e49b19
Optimized canvas performance when ANGLE is used.
...
--HG--
branch : minor
2015-01-22 02:12:26 -04:00
Alex Szpakowski
8067d42df2
Canvases now have OpenGL ES support, updated Texture:setWrap to return false for repeat wrap modes in non-power-of-two textures if OpenGL ES 2 is used and the implementation doesn't have support for repeat on NPOT textures.
...
--HG--
branch : minor
2015-01-20 15:13:59 -04:00
Alex Szpakowski
1124612c1f
Some work towards OpenGL ES 2+ support for love 0.10.
...
--HG--
branch : minor
2015-01-19 23:32:16 -04:00
Alex Szpakowski
a7e4148869
Merged default into minor
...
--HG--
branch : minor
2015-01-16 15:47:26 -04:00
Alex Szpakowski
c7b45b3505
Updated copyright for the new year
2014-12-31 19:32:43 -04:00
Alex Szpakowski
d1bdc9a7e2
Images and Canvases are now drawn using GL_TRIANGLE_FAN instead of GL_QUADS, for future compatibility with GLES and core GL3+.
...
--HG--
branch : minor
2014-09-07 13:19:27 -03:00
Alex Szpakowski
3a51f0ad08
Changed the love.graphics internal code to always use a default shader when none is set externally, and replaced the deprecated OpenGL vertex attribute code with the equivalent generic vertex attribute functions.
...
This will simplify the code and make it more maintainable when OpenGL ES 2+ support is added, compared to using the deprecated VA functions on desktop GL and the generic VA functions on GLES.
--HG--
branch : minor
2014-08-26 03:24:42 -03:00
Alex Szpakowski
71c71985d3
Merged default into minor
...
--HG--
branch : minor
2014-08-21 16:53:43 -03:00
Alex Szpakowski
8ffe610659
Added love.graphics.getStats. It returns a table with performance-related graphics statistics. Currently it contains these fields:
...
drawcalls: The number of internal draw calls made so far in the current frame.
canvasswitches: The number of times the active Canvas has been changed so far in the current frame.
texturememory: The approximate amount of video memory (in bytes) used by OpenGL textures created by Images, Canvases, and Fonts.
images: The number of active Image objects.
canvases: The number of active Canvas objects.
fonts: The number of active Font objects.
2014-08-21 15:01:29 -03:00
Alex Szpakowski
5f6ee50541
Replaced the GLee OpenGL function loader with a modified version of GLAD (resolves issue #728.)
...
--HG--
branch : minor
2014-08-18 21:35:52 -03:00
Alex Szpakowski
df5e48a082
Merged default into minor
...
--HG--
branch : minor
2014-08-13 01:50:52 -03:00
Alex Szpakowski
1798115858
Error if the coordinates given to Canvas:getPIxel are not within [0, dimensions).
2014-08-10 03:09:16 -03:00
Alex Szpakowski
2b70d84611
Replaced the old stencil API with love.graphics.drawStencil(stencilfunc), love.graphics.setStencilTest(enable, invert), and love.graphics.getStencilTest.
...
Draw to the stencil buffer (rather than the color buffer) using love.graphics.drawStencil with a function which draws geometry. Once the stencil buffer has been drawn to, use love.graphics.setStencilTest before drawing to let drawn geometry be affected by it.
love.graphics.clear (and Canvas:clear) will clear both the color and stencil buffers by default. love.graphics.clear("stencil") will clear only the stencil buffer.
--HG--
branch : stencil-functions
2014-08-08 00:25:44 -03:00
Alex Szpakowski
53e63d48c9
Merged default into minor
...
--HG--
branch : minor
2014-08-07 18:10:19 -03:00
Alex Szpakowski
afc505e183
Added stack type enums to love.graphics.push (resolves issue #906.) Current enums are "transform" and "all". "transform" is the default (for compatibility.) When love.graphics.push("all") is used, love.graphics.pop() will restore all love.graphics module state to what it was when push was called.
...
Updated the graphics code to use a custom matrix stack rather than OpenGL1's APIs.
2014-08-06 22:25:29 -03:00
Alex Szpakowski
2bfa8dbfb5
Merged default into minor
...
--HG--
branch : minor
2014-06-16 03:09:04 -03:00
Alex Szpakowski
23d3cbc2e2
Renamed all cases of FSAA to the more accurately-named MSAA. The FSAA names (canvas:getFSAA, t.window.fsaa, etc.) still exist for now, for backwards-compatibility.
2014-06-13 23:28:00 -03:00
Alex Szpakowski
8483ea31a1
Changed love.graphics.newImage's optional second argument to be a table of flags. Current flags are 'mipmaps' and 'srgb'.
...
If mipmaps are enabled on image creation, the image will use the default mipmap filter (now 'nearest' by default.) Image:setMipmapFilter will error if the image was not created with mipmaps enabled.
--HG--
branch : minor
2014-06-05 17:19:31 -03:00
Alex Szpakowski
53b20b63a5
Merged default into minor
...
--HG--
branch : minor
2014-05-21 21:16:37 -03:00
Alex Szpakowski
976c26aa21
Removed an unnecessary extension dependency for support of the rg11b10f canvas format
2014-05-14 16:45:16 -03:00
Alex Szpakowski
5658a2440b
Added some comments describing the formats in the Canvas::Format enum.
...
--HG--
branch : Canvas-formats
2014-05-14 01:38:33 -03:00
Alex Szpakowski
4aeba24e94
Fixed the rg11b10f canvas format, removed rgb9e5 due to lack of real support, improved love.graphics.hasCanvasFormat to do extra checks
...
--HG--
branch : Canvas-formats
2014-05-13 21:59:24 -03:00
Alex Szpakowski
febbecddf7
Fixed the texture type of the rgb9e5 canvas format
...
--HG--
branch : Canvas-formats
2014-05-13 21:22:29 -03:00
Alex Szpakowski
408a593113
Added support for several specific Canvas formats. Also added love.graphics.hasCanvasFormat.
...
The list includes RGBA with 4-bit components, RGBA with 10-bit R, G, and B components and a 2-bit alpha component, RGB with 9-bit RGB components and a 5-bit exponent component (for HDR rendering), and several more.
--HG--
branch : Canvas-formats
2014-05-13 20:54:58 -03:00
Alex Szpakowski
caa61563cc
OpenGL 2.1 is now required to use love.graphics (resolves issue #779.)
...
Removed love.graphics.isSupported("canvas", "shader", "npot", "subtractive", and "mipmap"), since those features are all guaranteed by the minimum system requirements.
--HG--
branch : minor
2014-03-12 02:26:32 -03:00
Alex Szpakowski
d5096840ba
Fixed Canvas:clear not working properly with antialiased Canvases
2014-03-02 15:49:29 -04:00
Alex Szpakowski
fe5e7c17e7
Added Body:setUserData and Body:getUserData (resolves issue #853_
2014-02-26 20:47:05 -04:00
Alex Szpakowski
94aa39116e
Fixed stencils used when an antialiased Canvas is active
2014-02-16 14:54:33 -04:00
Alex Szpakowski
ce4fdf4ac9
Added sRGB (gamma-correct) support for Images, Canvases, and the main screen.
...
love.graphics.newImage(path, “srgb”) creates a new Image whose texels are treated as being in the sRGB color space, so they are linearized when drawing/sampling from the image.
love.graphics.newCanvas(w, h, “srgb”) creates a new Canvas whose texels are treated as being in the sRGB color space, so drawing to the Canvas does a linear->sRGB conversion (but blends linearly), and sampling from it (drawing it or using it in a shader) converts from sRGB to linear space.
The "srgb" window flag does the same as Canvases for the main screen.
2014-02-02 18:31:41 -04:00
Alex Szpakowski
40242689b1
Fixed rendering to multiple canvases, removed some redundant OpenGL calls when switching between canvases
2014-01-30 21:09:13 -04:00
Alex Szpakowski
988404e4ca
Added love.graphics.getSystemLimit (resolves issue #840 ). Deprecated love.graphics.getMaxPointSize.
...
love.graphics.getSystemLimit currently accepts these enum strings: “pointsize”, “texturesize”, “multicanvas”, and “canvasfsaa”.
2014-01-27 02:19:30 -04:00
Alex Szpakowski
7556fde5e6
Added antialiasing (MSAA) support to Canvases via a new optional parameter. Added Canvas:getFSAA.
2014-01-27 01:31:41 -04:00
Alex Szpakowski
113093e4fc
Separated canvas texture creation code from FBO creation code
2014-01-13 01:47:06 -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
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
c8f5494900
Images, Canvases, Quads, and Fonts now have the same vertex winding order
2013-11-10 19:57:13 -04: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
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
Alex Szpakowski
9834897372
Fixed Canvas:clear on GL3+ systems
2013-08-13 16:05:20 -03:00
Alex Szpakowski
5a3055dd3b
Replaced internal calls to luaL_register (deprecated in Lua 5.2) with an alternative
2013-07-16 23:23:58 -03:00