Fixes two problems: (1) Overwriting externs with the same name and (2) not using unused texture units properly.
1) Sending two different images to two different effects using the same extern name would use the same image for both effects, e.g.:
effect_1:send('img', img_1)
effect_2:send('img', img_2) -- also changes img to point to img_2 in effect_1!
Fixed by localizing the name -> texture unit mapping for each pixel effect.
2) When a pixel effect was destroyed, the allocated texture units were not marked as being available again. Fixed by having a vector<bool> marking the free units instead of just a counter how many units are in use.
Still problematic: Sending more than GL_MAX_TEXTURE_IMAGE_UNITS (>= 16, depending on the implementation) images/canvases *in total* to pixel effects. Effects could hold references to used *texture-ids* and bind/unbind them dynamically on a effect switch. Con: Introduces additional complexity when switching effects. However, benchmarks by Alexander Szpakowski have shown the performance loss is negligible.
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 and Linux.
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 Use the project files for Visual Studio 2010 located in the platform dir.
###*nix Run platform/unix/automagic, then run ./configure and make.
###OSX Use the XCode project in platform/macosx.
For both Windows and OSX there are dependencies available here.
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 formatted major.minor.revision.)
We tag all our releases (since we started using mercurial), and have binary downloads available for them.
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:
- For windows they are located here.
- For ubuntu linux they are in ppa:bartbes/love-unstable
- For arch linux there's love-hg in the AUR.
- For other linuxes and OSX there are currently no official builds.
Dependencies
- SDL
- OpenGL
- OpenAL
- Lua / LuaJIT / LLVM-lua
- DevIL with MNG and TIFF
- FreeType
- PhysicsFS
- ModPlug
- mpg123
- Vorbisfile