Commit Graph

1889 Commits

Author SHA1 Message Date
Alex Szpakowski 4edebe1789 Updated changelog 2014-02-05 02:21:16 -04:00
Alex Szpakowski e54d771be4 Added love.math.gammaToLinear and love.math.linearToGamma for converting RGB color values from the sRGB color-space to linear and vice-versa. 2014-02-04 19:45:50 -04:00
Alex Szpakowski 823b1babc8 Specifying the srgb window flag should now cause it to fall back to srgb=false in all situations if an srgb-capable system framebuffer isn't supported, instead of failing to create the window 2014-02-04 02:02:54 -04:00
Alex Szpakowski b625bb6624 moved Mesh:setWireframe to love.graphics.setWireframe (affects all draws until it's disabled.)
Wireframe mode should only be used for debugging: the wireframe lines behave differently than regular lines, their widths aren't affected by the graphics scale, and the mode isn't available on OpenGL ES.
2014-02-03 04:59:58 -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 9e746c56fa love.graphics.getBlendMode no longer does several glGetInteger function calls 2014-01-30 21:51:17 -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 2a4d47e614 Added a missing newline to a print statement 2014-01-29 23:10:57 -04:00
Alex Szpakowski 33f12a6091 Source:play now returns false if alSourcePlay failed 2014-01-29 17:04:03 -04:00
Alex Szpakowski 007d0d5216 Windows: create the console before modules are loaded (allows information printed during module initialization to be displayed.) 2014-01-29 16:20:05 -04:00
Alex Szpakowski a49c2a88c1 Increased robustness of audio module initialization (see issue #646.) Also changed Source:play to return a boolean indicating success. 2014-01-29 05:24:47 -04:00
Alex Szpakowski 7ef0a6b576 Updated changelog 2014-01-28 03:27:42 -04:00
Alex Szpakowski a7ed581204 Reverted ParticleSystem:setPosition’s functionality to 0.9.0’s beheaviour, added ParticleSystem:moveTo which has the new behaviour (new particles spawn in a line between the old position and where the emitter was moved to.) 2014-01-28 03:20:08 -04:00
Alex Szpakowski 6b538b5827 The emission rate for ParticleSystems is no longer restricted to integer numbers. 2014-01-27 23:42:26 -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 a2a8b14cfd Added love.getVersion (resolves issue #809).
Syntax is: major, minor, revision, codename = love.getVersion().
2014-01-27 19:24:14 -04:00
Alex Szpakowski 0f9bf64cf8 Xcode project: added new build scheme ‘Distribution’, moved LTO from ‘Release’ to ‘Distribution’ 2014-01-27 19:04:12 -04:00
Alex Szpakowski 0da21a430a Mac: enabled link-time optimization for Release builds of love 2014-01-27 18:44:00 -04:00
Alex Szpakowski c5c788e976 Added a built-in variable readable in shaders: ‘love_ScreenSize’. Its x and y components contain the width and height of the current viewport. Resolves issue #841. 2014-01-27 02:58:34 -04:00
Alex Szpakowski 3a24e73891 0.9.1’s API is designed to be backwards-compatible with 0.9.0 games (resolves issue #839) 2014-01-27 02:28:38 -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 10f1e23931 Increased version to 0.9.1 2014-01-22 18:26:10 -04:00
Alex Szpakowski ba7e69d776 Added Mesh:setDrawRange(min, max) and Mesh:getDrawRange().
If no vertex map is set, this restricts the drawn vertices to those whose indices in the vertex array are between [min, max] inclusive.
If a vertex map is set, this restricts the values used in the vertex map to those whose indices in the vertex map array are between [min, max] inclusive.

Added Mesh constructor variant: love.graphics.newMesh(vertexcount, texture, drawmode). Creates a Mesh with a certain number of vertices with x,y,u,v,r,g,b,a values of (0,0,0,0,255,255,255,255).
2014-01-21 06:16:47 -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 81d9810ed8 Fixed t.window.highdpi in love.conf, updated the nogame screen to look slightly better on retina displays 2014-01-18 00:41:02 -04:00
Alex Szpakowski 0e13975c11 Improved some error message text 2014-01-17 22:28:06 -04:00
Alex Szpakowski ad65b577be Updated changelog 2014-01-17 22:00:50 -04:00
Alex Szpakowski 50b7bdcea9 And another typo… 2014-01-17 21:17:11 -04:00
Alex Szpakowski 0d52ac6d52 Fixed dumb typo 2014-01-17 21:12:30 -04:00
Alex Szpakowski 309193895a Added opt-in support for high-dpi mode in OS X when on a retina display (resolves issue #761).
Added a ‘highdpi’ boolean flag to t.window/love.window.setMode (defaults to false.)
When the window is actually in high-dpi mode on a supported display, the graphics width and height and the mouse position are in pixels, rather than ‘window coordinates’.

Added love.window.getPixelScale. Returns the scale factor of the window from user-space points to pixels (e.g. it will be 1 normally, and 2 on a retina display in OS X with high-dpi mode enabled.)
2014-01-17 21:11:20 -04:00
Alex Szpakowski 29f47d9a10 Changed particle spawning behaviour in ParticleSystems to spawn at an interpolated position between the location at the previous update and the current one. This results in much smoother behaviour when moving a ParticleSystem constantly via ParticleSystem:setPosition.
Also fixed particle spawning to better fill up the buffer.
2014-01-16 16:20:30 -04:00
Alex Szpakowski dc35db1c7b Fixed tab characters (‘\t’) in text to be drawn properly with love.graphics.print. 2014-01-15 23:38:39 -04:00
Alex Szpakowski 9b9671f5ee Fixed a potential memory leak when a Font object errors 2014-01-15 23:03:39 -04:00
Alex Szpakowski 7f77c2d0b3 Canvas:renderTo now restores the previously active Canvas when done, instead of erroring if another Canvas is already active 2014-01-15 14:56:28 -04:00
Alex Szpakowski 113093e4fc Separated canvas texture creation code from FBO creation code 2014-01-13 01:47:06 -04:00
Alex Szpakowski fda005c5ff love.graphics.getScissor now has a proper C++ module method 2014-01-09 22:49:00 -04:00
Alex Szpakowski c64b3d2527 Renamed love.graphics.getMaxImageSize to love.graphics.getMaxTextureSize (old function is still there, but deprecated.) 2014-01-09 22:18:37 -04:00
Alex Szpakowski 6fcebf69e4 Updated changelog 2014-01-07 20:30:46 -04:00
Alex Szpakowski 1d3c4e125e Make love.graphics.reset call love.graphics.origin instead of clearing the internal pixel size stack 2014-01-05 15:52:12 -04:00
Alex Szpakowski 510ed6f11e Abstracted lua bindings for general Texture methods into wrap_Texture.cpp 2014-01-04 21:19:03 -04:00
Alex Szpakowski 6756bc3c2c Updated readme 2014-01-03 19:13:59 -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 1d3f6e967d Added CircleShape:get/setPoint. 2014-01-03 14:06:23 -04:00
Alex Szpakowski b091746118 Removed some unused variable warnings when compiling 2014-01-03 02:05:23 -04:00
Alex Szpakowski 9c747f1476 Switched to using bearing and advance metrics from the actual bitmap glyph object, removed old unused method declarations in the Filesystem class. 2014-01-01 03:52:43 -04:00
Alex Szpakowski ccc5535a82 The love.filesystem module searchers for require are now tried after package.preload instead of before. 2014-01-01 02:08:50 -04:00
Alex Szpakowski ab1cf7fdc5 Really fixed setting the scissor and then changing Canvases 2013-12-31 23:37:04 -04:00
Alex Szpakowski 9a61ca7393 Updated changelog 2013-12-31 23:06:23 -04:00