Alex Szpakowski
ed3f419747
Prevent redundant calls to glEnable/DisableVertexAttribArray. This should hopefully fix a performance regression compared to 0.9.2 as well.
2015-06-23 20:55:23 -03:00
Alex Szpakowski
c82ccbb89b
love.graphics.setColor no longer uses the main per-vertex color attribute. This lets it affect the color of ParticleSystems, and SpriteBatches and Meshes even when they use custom per-vertex colors.
2015-06-21 11:20:26 -03:00
Alex Szpakowski
33e1d2736d
Removed restrictions preventing sRGB and non-sRGB canvases from being used together when doing multi-canvas rendering.
2015-04-25 21:32:10 -03:00
Alex Szpakowski
d8a68d6ce1
Updated iOS-specific graphics code to use the latest SDL changes.
2015-04-13 12:26:54 -03:00
Alex Szpakowski
d31168c0e0
Cleaned up some graphics code.
2015-03-20 00:16:36 -03:00
Alex Szpakowski
a36dbc3d49
Only update the shader point size in OpenGL ES 2 when it's been modified, rather than before every draw.
2015-03-17 17:24:45 -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
4ef0d257e9
Added an optional font hinting argument to love.graphics.newFont / love.font.newRasterizer when loading TrueType fonts. Resolves issue #963 .
...
Accepted values are "normal", "light", "mono", and "none".
2015-03-07 22:05:37 -04:00
Alex Szpakowski
4dc73959a6
Hopefully fixed a major bug related to using Shader:send with textures.
2015-03-06 02:08:33 -04:00
Alex Szpakowski
06fa7bd7a4
Don't enable SDL_GL_FRAMEBUFFER_SRGB_CAPABLE in Linux when creating the window, to work around a potential bug. sRGB windows are still possible even without that.
2015-03-03 17:48:19 -04:00
Alex Szpakowski
8277eb9abd
Renamed the internal OpenGL buffer class from VertexBuffer to GLBuffer.
2015-03-03 02:21:28 -04:00
Alex Szpakowski
3fea174008
Cleaned up some shader code.
...
--HG--
branch : minor
2015-03-02 15:18:12 -04:00
Alex Szpakowski
b9c90e8a6f
Fixed the background color for the error screen, and updated LodePNG to the latest version.
...
--HG--
branch : minor
2015-02-27 21:20:31 -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
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
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
67aede6bc0
Merged default into minor
...
--HG--
branch : minor
2015-02-02 01:13:21 -04:00
Alex Szpakowski
ea2e45f4e2
Renamed love.mouse.setRelative to love.mouse.setRelativeMode, removed some unused OpenGL code.
2015-01-31 23:17:37 -04:00
Alex Szpakowski
6c11443a04
Fixed graphics initialization crashing love when OpenGL ES 2 is used.
...
--HG--
branch : minor
2015-01-30 04:24:31 -04:00
Alex Szpakowski
5df56d041a
Added GLSL ES 1.00 (OpenGL ES 2) shader support.
...
--HG--
branch : minor
2015-01-20 22:31:54 -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
60eceadc0a
Added "mirroredrepeat" wrap mode.
2014-12-22 19:16:36 -04:00
Alex Szpakowski
5eb37d30f7
Cleaned up and simplified some graphics code.
...
--HG--
branch : minor
2014-10-26 15:31:32 -03:00
Alex Szpakowski
6f6bf6a2bb
Merged default into minor
...
--HG--
branch : minor
2014-08-30 22:08:10 -03:00
Alex Szpakowski
40c6821048
Removed some dead code and fixed luax_pushtype when the object argument is null.
2014-08-28 00:48:32 -03:00
Alex Szpakowski
b59e088d6c
Hopefully fixed the Windows build (see issue #921.)
...
--HG--
branch : minor
2014-08-27 08:17:40 -03:00
Alex Szpakowski
626701fc2b
Merged default into minor
...
--HG--
branch : minor
2014-08-26 23:23:17 -03:00
Alex Szpakowski
1449a81bdf
Removed some dead code.
2014-08-26 22:16:01 -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
d6cd2e2e7e
Prettied up some code.
2014-08-26 00:05:08 -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
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
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
9e746c56fa
love.graphics.getBlendMode no longer does several glGetInteger function calls
2014-01-30 21:51:17 -04:00
Alex Szpakowski
d70023e350
Enable OpenGL’s debug output when the LOVE_GRAPHICS_DEBUG environment variable is ‘1’. Resolves issue #607 .
2014-01-27 23:30:16 -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
73f1ce0d40
Added instancing support to Meshes via Mesh:setInstanceCount. Added a new built-in variable to vertex shaders: int love_InstanceID.
...
love.graphics.draw(mesh) will draw the mesh instancecount times, using hardware instancing when available. The only way to draw individual instances differently from each other is to use the love_InstanceID variable in a vertex shader.
Added love.graphics.isSupported(“instancing”). Hardware instancing is supported if true, otherwise a (slower) pseudo-instancing fallback is used internally when drawing instanced meshes.
2014-01-21 06:01:50 -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
2ee869b0e8
Fixed some compiler warnings
2013-12-07 05:07:54 -04:00
Alex Szpakowski
006f4dd600
Fixed
2013-11-17 05:47:38 -04:00