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
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
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
1449a81bdf
Removed some dead code.
2014-08-26 22:16:01 -03:00
Alex Szpakowski
d6cd2e2e7e
Prettied up some code.
2014-08-26 00:05:08 -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
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
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
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
f41a2ed910
Reverted commit 8c64a0c (love.graphics.setCanvas(nil) erroring)
2013-07-19 19:53:39 -03:00
Alex Szpakowski
dd9cca1a55
Added Data:getString to GlyphData
2013-06-16 04:10:09 -03:00
Alex Szpakowski
d286f78ec7
Improved error messages when canvas/image creation fails because the size is too big for the system
2013-06-09 18:24:19 -03:00
Alex Szpakowski
c0998cd996
Fixed love.graphics.setScissor when love.graphics.setCanvas is called directly after a setScissor call
2013-06-07 03:31:30 -03:00
Alex Szpakowski
6c6cb270de
Fixed Canvas:clear
2013-05-30 04:31:32 -03:00
Alex Szpakowski
8de3a7c708
Fixed love.graphics.getColor before setColor is called
2013-04-22 23:34:28 -07:00
Alex Szpakowski
9d62d0044c
Macro hard, microsoft
2013-04-19 16:11:39 -03:00
Alex Szpakowski
bf6d1c258b
Misc. code cosmetics and improvements
2013-04-18 02:14:35 -03:00
Alex Szpakowski
6fd3038405
Improved clarity/readability of internal OpenGL state shadowing functions
2013-04-17 01:06:33 -03:00
Alex Szpakowski
3edf033498
Internally keep track of the value of the current color (issue #564 )
2013-04-12 15:24:21 -03:00
Alex Szpakowski
5301026f3c
Added support for DXT1/3/5 and BC5/7 compressed textures via love.image.CompressedData. Some internals are still iffy.
...
- added a new CompressedData type to love.image
- added love.image.isCompressed(file or data)
- love.graphics.newImage automatically tests for compression when loading a file
- added love.graphics.isSupported strings for DXT, BC5, and BC7
Compressed textures meant to be used on the GPU offer huge performance gains when
- loading the texture from a file
- loading the texture from RAM to VRAM
- loading mipmaps
- rendering
--HG--
branch : image-CompressedData
2013-04-04 19:09:18 -03:00
Alex Szpakowski
2009124cf9
Reworked internal anisotropic filtering code to be more concise and intuitive
2013-03-21 12:21:13 -03:00
Alex Szpakowski
5bf78f891d
Fixed OpenGL vertex buffer function usage (issue #489.)
...
The functions will be assigned to their core version counterparts if the extension version isn't supported but the core version is.
2013-02-19 03:17:05 -04:00
Alex Szpakowski
eba8cbc0b5
Removed internal code support for multitexturing without shaders, since it's not currently used and there are no plans to do so
2013-02-16 01:04:00 -04:00
Alex Szpakowski
96161c66f6
Updated copyright text for the new year
2013-02-05 05:32:49 -04:00
Alex Szpakowski
7a16e4cb49
Made Visual Studio play nice with the C++ STL min/max functions in the new shader code
2013-01-29 13:01:34 -04:00
Alexander Szpakowski
9f8f493aed
Texel (texture2D) calls in shaders now return pure white instead of pure black when drawing untextured graphics primitives. This prevents the need for separate "passthrough" shaders to be used when drawing graphics primitives vs images.
2013-01-17 04:18:38 -04:00
Alexander Szpakowski
331c883c77
Improved clarity of some comments, variable names, and functions
2013-01-15 20:20:35 -04:00
Alexander Szpakowski
8fdd6cbbb2
Merged in from main repository (originally from love-mipmap fork)
2013-01-12 18:07:14 -05:00
Alexander Szpakowski
f1e72efd30
Cleaned up graphics.lua script a bit
2013-01-08 23:59:48 -04:00
Alexander Szpakowski
e5388ff73b
Removed more unnecessary tabs in blank lines
2013-01-07 07:11:40 -04:00
Alexander Szpakowski
eb98e8cc48
Removed unnecessary tabs in empty lines, fixed texture filtering when the minification and mipmap filter are the same
2013-01-07 06:56:59 -04:00
Alexander Szpakowski
88af7239c3
Removed unnecessary tabs from empty lines
2013-01-07 06:21:15 -04:00
Alexander Szpakowski
0968fa6f11
More cleanup and some overdone comments
2013-01-05 15:59:01 -04:00
Alexander Szpakowski
37191a5953
Minor cleanup
2013-01-04 05:05:25 -04:00
Alexander Szpakowski
ab98b0de45
Added mipmap support to Image filter struct and OpenGL texture filter helper functions
2013-01-01 21:44:27 -04:00
Alexander Szpakowski
1678252b7a
Applied patch from issue #542 (texture filtering inconsistencies) in main LÖVE repository
2013-01-01 21:29:38 -04:00
Alexander Szpakowski
8bae828924
Don't override texture binding check when calling bindTexture with a texture id of 0
2013-01-01 04:03:26 -04:00
Alexander Szpakowski
b55de47fb9
misc cleanup
2012-12-22 05:37:34 -04:00
Alexander Szpakowski
79fa42d207
made ShaderEffects individully handle texture units for sent images/canvases, added GL helper function for quickly binding a texture to a specific texture unit, hopefully made ShaderEffects load and unload volatile better
2012-12-22 00:29:11 -04:00
Alexander Szpakowski
16f925affa
improved GL texture binding api to take texture units into consideration
2012-12-21 20:35:32 -04:00