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
This commit is contained in:
Alex Szpakowski
2013-03-24 02:20:15 -03:00
parent 2009124cf9
commit 2ea065c68b
9 changed files with 377 additions and 87 deletions
+1 -1
View File
@@ -397,7 +397,7 @@ ParticleSystem *Graphics::newParticleSystem(Image *image, int size)
Canvas *Graphics::newCanvas(int width, int height, Canvas::TextureType texture_type)
{
if (texture_type == Canvas::TYPE_HDR && !Canvas::isHdrSupported())
if (texture_type == Canvas::TYPE_HDR && !Canvas::isHDRSupported())
throw Exception("HDR Canvases are not supported by your OpenGL implementation");
while (GL_NO_ERROR != glGetError())