Commit Graph

42 Commits

Author SHA1 Message Date
Alex Szpakowski 146b3cff19 Added blend mode "screen". 2014-03-27 23:28:36 -03: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 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 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
vrld be205544b3 Issue #659: Add line joins.
Added:

love.graphics.setLineJoin(linejoin)
linejoin = love.graphics.getLineJoin()

where linjoin is one of:

- none
- miter
- bevel

Bevel and miter drawing is slightly faster than the 0.8 default (miter), while
the `none` join mode will be slower when overdraw is enabled.
2013-08-07 21:48:21 +02:00
Alex Szpakowski d7802b053b Removed love.graphics.setAlphaTest: incompatible with OpenGL ES 2+, core OpenGL 3+, and Direct3D 10+. Shaders can accomplish the same things and more. 2013-08-01 12:55:46 -03:00
Alex Szpakowski 0a36c41ba0 Removed support for BC7-compressed DDS images (only *very* modern systems support it right now); updated the ddsparse library 2013-06-09 16:31:02 -03:00
Alex Szpakowski 264948690c Renamed BlendMode "none" to "replace" and updated changelog 2013-05-22 04:26:29 -03:00
Alex Szpakowski 7ab3809165 Fixed Object:typeOf for love.physics objects new to 0.8.0, removed vestigial ColorMode code 2013-05-07 15:23:26 -03:00
Alex Szpakowski 63404f7097 Added love.graphics.getRendererInfo(infotype). Useful for creating more informative error reports and advanced debugging.
Returned string can be highly system-dependent, so don't rely on its output!

infotype can be "name", "version", "vendor", or "device"
2013-05-05 16:47:42 -03:00
Alex Szpakowski c7838b78b6 Added love.graphics.setAlphaTest (issue #534) 2013-04-10 13:17:54 -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 a55c7e871e fixed canvas:clear() when multi-canvas rendering is active, changed some names and wording
--HG--
branch : MRTs
2013-03-26 04:58:43 -03:00
Alex Szpakowski 2ea065c68b Added MRT support to canvases via love.graphics.setCanvases(c1, c2, ...), and an 'effects' callback function in shaders.
- Simultanious rendering to multiple canvases requires all canvases to be the same size (limitation of pre-GL3.0 framebuffers)
- love.graphics.isSupported("mrtcanvas") was added
- love_Canvases[n] (0-based array of active canvases) can be written to in pixel shaders in the 'effects' callback function
- everything drawn to multiple canvases at once will be duplicated to all canvases if no shader is active or the standard 'effect' shader function is used

--HG--
branch : MRTs
2013-03-24 02:20:15 -03:00
Alex Szpakowski 2d7dd87eb5 Removed PixelEffect compatibility functions (love.graphics.newPixelEffect is now love.graphics.newShader, etc)
Also removed love.graphics.isSupported("pixeleffect") in favor of love.graphics.isSupported("shader")
2013-03-04 14:01:04 -04:00
Alex Szpakowski 96161c66f6 Updated copyright text for the new year 2013-02-05 05:32:49 -04:00
Alexander Szpakowski ce75b3af69 Merge from root 2013-01-17 20:29:48 -04:00
Bart van Strien 501beb7d02 Add blend mode 'none' (issue #536) 2013-01-18 00:48:36 +01:00
Alexander Szpakowski e24d721381 Renamed all instances of 'ShaderEffect' (previously 'PixelEffect') to 'Shader'. 2013-01-16 07:21:41 -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 1de26ea1fa Added "mipmap" love.graphics.isSupported string 2013-01-02 05:55:50 -04:00
Alexander Szpakowski 15a1fd3552 Re-added "pixeleffect" graphics isSupported string for compatibility 2012-12-31 06:18:43 -04:00
Alexander Szpakowski 0611234067 changed PixelEffect name to ShaderEffect, added lua-side support for vert/frag shader combinations with love.graphics.newShaderEffect, added tentative support for single-file vertex+fragment shaders 2012-12-20 21:51:31 -04:00
vrld ccdf6e1c00 Fix Issue #476: Add HDR Canvas (thanks, Alexander Szpakowski!).
* Add `love.graphics.isSupported("hdrcanvas")' to query whether the hardware
  actually supports HDR canvases.

* Add optional third argument to `love.graphics.newCanvas(w,h, type)', where
  `type' is one of "normal" or "hdr" and defaults to "normal". HDR canvases
  use floating point that can have values > 1 to store pixels, allowing for
  HDR rendering and other higher level lighting techniques when combined with
  pixel effects.

* Add `canvas:getType()'.
2012-10-11 22:22:10 +02:00
vrld 6d02057864 Close issue #408: printf-justify alignment.
Add letter_spacing argument to Font::print(). Might be worth to expose to Lua
at some point. Justify alignment may result in mushy/blurred glyphs.
2012-07-08 13:37:09 +02:00
Bart van Strien 7793e7f02f CRLF to LF 2012-07-04 14:40:24 +02:00
rude 81c38e22d0 Applied the new style guidelines.
Well, sort of. Lot's more to be done, but this is a start.
2012-06-28 23:52:33 +02:00
Bill Meltsner 57b4d2c5b9 Add support for falling back to glBlendEquationEXT if necessary.
This should help keep LÖVE from crashing on old cards with crappy drivers.
2012-03-03 19:25:42 -05:00
Bill Meltsner 8f781e9f13 Add "combine" color mode, for colorizing images (see https://love2d.org/forums/viewtopic.php?f=4&t=7648 ) 2012-01-26 15:00:40 -05:00
Bill Meltsner be55579a22 Happy New Year, have an enormous diff 2012-01-09 02:41:11 -06:00
Bart van Strien d8b1d67a34 Centralize NPOT support check for image, export it to isSupported 2011-10-24 17:43:56 +02:00
Bart van Strien bee9d49515 Add premultiplied blending 2011-10-06 15:17:21 +02:00
vrld cbe2d12db7 Use singular in l.g.isSupported() 2011-08-12 15:11:04 +02:00
vrld af1e8761fa Change l.g.isSupported('framebuffer') to l.g.isSupported('canvas') 2011-08-12 14:45:55 +02:00
rude 480f936815 Added 'VertexBuffer' abstraction. SpriteBatches are now always supported.
Also improved memory usage in SpriteBatch. (No need to retain full copy of
sprites in memory. Can read that data back later to save data from OpenGL
context destruction).
2011-08-12 11:35:14 +02:00
Bart van Strien 3c5c4ee604 Add SpriteBatch support to love.graphics.isSupported 2011-07-24 15:37:02 +02:00
Bart van Strien bd2b190a19 Add love.graphics.isSupported
Replaces love.graphics.hasPixelEffects and also does framebuffer support.

Also fixed 4 compiler warnings.
2011-07-24 15:21:52 +02:00
Bill Meltsner fde708160e bringing in the new year by changing every 2010 to 2011 2011-01-15 14:40:27 -06:00
Bart van Strien 9ba06d65f6 Added subtractive and multiplicative blend modes (thanks vrld) 2010-08-28 17:27:35 +02:00
rude aa01c984b9 Updated all dates to 2010. 2010-01-31 16:54:47 +01:00
rude 87e3c4131c Finally abstracted constants properly. Changed how the event module works; wasn't really abstract before. Removed libs we're not going to use: native, signal. 2009-10-10 11:11:04 +02:00