Mercurial > love-experiments
comparison src/modules/graphics/Graphics.cpp @ 1399:fa3eabb3602a MRTs
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
| author | Alex Szpakowski <slime73@gmail.com> |
|---|---|
| date | Sun, 24 Mar 2013 02:20:15 -0300 |
| parents | 4a6e86ce7b7b |
| children | bee3f7b0dca0 |
comparison
equal
deleted
inserted
replaced
| 1397:43f2b4936ca8 | 1399:fa3eabb3602a |
|---|---|
| 156 | 156 |
| 157 StringMap<Graphics::Support, Graphics::SUPPORT_MAX_ENUM>::Entry Graphics::supportEntries[] = | 157 StringMap<Graphics::Support, Graphics::SUPPORT_MAX_ENUM>::Entry Graphics::supportEntries[] = |
| 158 { | 158 { |
| 159 { "canvas", Graphics::SUPPORT_CANVAS }, | 159 { "canvas", Graphics::SUPPORT_CANVAS }, |
| 160 { "hdrcanvas", Graphics::SUPPORT_HDR_CANVAS }, | 160 { "hdrcanvas", Graphics::SUPPORT_HDR_CANVAS }, |
| 161 { "mrtcanvas", Graphics::SUPPORT_MRT_CANVAS }, | |
| 161 { "shader", Graphics::SUPPORT_SHADER }, | 162 { "shader", Graphics::SUPPORT_SHADER }, |
| 162 { "npot", Graphics::SUPPORT_NPOT }, | 163 { "npot", Graphics::SUPPORT_NPOT }, |
| 163 { "subtractive", Graphics::SUPPORT_SUBTRACTIVE }, | 164 { "subtractive", Graphics::SUPPORT_SUBTRACTIVE }, |
| 164 { "mipmap", Graphics::SUPPORT_MIPMAP }, | 165 { "mipmap", Graphics::SUPPORT_MIPMAP }, |
| 165 }; | 166 }; |
