Alex Szpakowski
cf0968fc6d
Avoid some VC++ compiler warnings
2015-04-02 00:28:09 -03:00
Alex Szpakowski
2a6bffaa5a
Prevent sRGB and non-sRGB Canvas formats from being used together in multi-canvas rendering (MRTs), due to driver bugs.
2015-03-29 23:51:08 -03:00
Alex Szpakowski
06ef263537
Added OpenGL debug groups for most graphics operations when love is built in debug mode for iOS. The Xcode frame capture tool uses them to create nice visual groups for OpenGL function calls.
2015-03-16 22:55:58 -03:00
Alex Szpakowski
d00773b974
Updated GLAD for the latest GL and GLES extensions.
2015-03-15 23:45:08 -03:00
Alex Szpakowski
275a9a300f
Multi-canvas rendering (love.graphics.setCanvas with multiple canvases) now allows canvases with different formats, if the system supports it. Added 'multicanvasformats' to the table returned by love.graphics.getSupported.
...
--HG--
branch : minor
2015-03-02 23:43:09 -04:00
Alex Szpakowski
3ced9ca38f
Added one- and two-channel Canvas formats: r8, rg8, r16f, rg16f, r32f, and rg32f.
...
--HG--
branch : minor
2015-03-02 18:06:14 -04:00
Alex Szpakowski
3fea174008
Cleaned up some shader code.
...
--HG--
branch : minor
2015-03-02 15:18:12 -04:00
Alex Szpakowski
3830a0969c
Moved the Texture and Quad Lua wrapper files out of the opengl graphics implementation folder.
...
--HG--
branch : minor
2015-03-01 03:51:44 -04:00
Alex Szpakowski
faa4a33fe9
Use triangle strips rather than triangle fans when possible.
...
--HG--
branch : minor
2015-02-28 02:32:34 -04:00
Alex Szpakowski
3efcf3901b
Removed Canvas:clear. love.graphics.clear now accepts r,g,b,a values (and defaults to 0,0,0,0 with no arguments given.) love.graphics.clear clears the content of the currently active Canvas(es.)
...
--HG--
branch : minor
2015-02-27 03:47:25 -04:00
Alex Szpakowski
f83c2db471
Cleaned up the Canvas code.
...
--HG--
branch : minor
2015-02-26 17:06:09 -04:00
Alex Szpakowski
a66a7b7ce9
Prevent invalid stencil buffer contents from being used when switching to a Canvas on mobile.
...
--HG--
branch : minor
2015-02-26 01:00:38 -04:00
Alex Szpakowski
e8ce59038f
Renamed Canvas:getImageData to Canvas:newImageData (see issue #1001.)
...
--HG--
branch : minor
2015-02-26 00:13:46 -04:00
Alex Szpakowski
8239d472d4
Removed Canvas:getPixel and added optional x/y/width/height arguments to Canvas:getImageData to specify a sub-rectangle (see issue #1001.)
...
--HG--
branch : minor
2015-02-25 23:27:35 -04:00
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