- Removed love.graphics.set/getCanvas, Canvas:renderTo, Canvas:newImageData, love.graphics.clear, love.graphics.discard, and love.graphics.newScreenshot.
- Added love.graphics.beginPass and love.graphics.endPass. All rendering must happen within a pass. love.draw is now called while a render pass to the main screen is active.
- Added love.graphics.renderPass, which is a wrapper for begin/endPass which calls the supplied function argument in between a begin/end. This is similar to the old Canvas:renderTo.
- Added love.graphics.isPassActive, getPassCanvases, getPassWidth, getPassHeight, and getPassDimensions.
- Added love.graphics.captureScreenshot.
- Added a new love.run callback love.drawpasses, which is called after love.update and before love.draw. It is the place to render to Canvases using beginPass or renderPass, since love.draw now always draws to the main screen.
- Renamed the ‘canvasswitches’ field in the table returned by love.graphics.getStats to ‘renderpasses’.
love.graphics.beginPass has the following variants (and renderPass mirrors them with an additional function argument at the end):
- love.graphics.beginPass(), begins rendering to the main screen without clearing it.
- love.graphics.beginPass(r, g, b [, a]), begins rendering to the main screen and clears the screen to the specified color.
- love.graphics.beginPass(canvas [, willstencil]), begins rendering to the specified Canvas without clearing it. love.graphics.stencil can only be used within the Canvas if ‘willstencil’ is true.
- love.graphics.beginPass(canvas, r, g, b [, a] [, willstencil]), beings rendering to the specified Canvas and clears it to the specified color. love.graphics.stencil can only be used within the Canvas if ‘willstencil’ is true.
- love.graphics.beginPass(info), where ‘info’ is a table in the following form:
{
{canvas [, r, g, b, a]}, — A canvas and an optional color to clear the Canvas to when the pass begins.
{canvas2, [r, g, b, a]}, — Additional Canvases and optional clear colors for multi-canvas rendering.
…,
stencil = false, — Optional boolean field to specify whether love.graphics.stencil is allowed within this pass. False by default.
}
The pass info table can be created once up-front and used for multiple beginPass/renderPass calls.
love.graphics.endPass can take an optional callback function argument, which causes endPass to capture the contents of the Canvas drawn to in the render pass to a new ImageData and passes it to the supplied function (this replaces Canvas:newImageData). This does not work on the main screen.
love.graphics.captureScreenshot replaces love.graphics.newScreenshot. It takes a callback function argument which causes love.graphics.present to capture the contents of the screen to a new ImageData and passes it to the supplied function. captureScreenshot can only be called before drawing to the main screen begins in the current frame (e.g. in love.keypressed, love.update, etc.)
--HG--
branch : minor
LÖVE is an awesome framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, Mac OS X, Linux, Android, and iOS.
Documentation
We use our wiki for documentation. If you need further help, feel free to ask on our forums, and last but not least there's the irc channel #love on OFTC.
Compilation
###Windows Follow the instructions at the megasource repository page.
###*nix
Run platform/unix/automagic from the repository root, then run ./configure and make.
$ platform/unix/automagic
$ ./configure
$ make
###Mac OS X
Download the required frameworks from here and place them in /Library/Frameworks/.
Then use the Xcode project found at platform/xcode/love.xcodeproj to build the love-macosx target.
###iOS
Download the required libraries from here and place the include and libraries folders
into the platform/xcode/ios folder.
Then use the Xcode project found at platform/xcode/love.xcodeproj to build the love-ios target.
See readme-iOS.rtf for more information.
###Android Visit the Android build repository for build instructions.
Repository information
We use the 'default' branch for development, and therefore it should not be considered stable. Also used is the 'minor' branch, which is used for features in the next minor version and it is not our development target (which would be the next revision - version numbers are formatted major.minor.revision.)
We tag all our releases (since we started using mercurial), and have binary downloads available for them.
Experimental changes are developed in the separate love-experiments repository.
Contributing
The best places to contribute are through the Bitbucket issue tracker and the official IRC channel. For code contributions, pull requests and patches are welcome. Be sure to read the source code style guide.
Builds
Releases are found in the 'downloads' section on bitbucket, are linked on the site, and there's a ppa for ubuntu, ppa:bartbes/love-stable.
There are also unstable/nightly builds:
- Most can be found here.
- For ubuntu linux they are in ppa:bartbes/love-unstable
- For arch linux there's love-hg in the AUR.
Dependencies
- SDL2
- OpenGL 2.1+ / OpenGL ES 2+
- OpenAL
- Lua / LuaJIT / LLVM-lua
- FreeType
- PhysicsFS
- ModPlug
- mpg123
- Vorbisfile
- Theora