Stencil buffers are now created and attached to canvases on-demand, instead of always on canvas creation.

saves VRAM when stencils aren't used in canvases.
This commit is contained in:
Alex Szpakowski
2013-05-22 23:08:21 -03:00
parent ac094f9437
commit 0e9d73503c
3 changed files with 110 additions and 87 deletions
+5
View File
@@ -67,6 +67,11 @@ public:
**/
void drawg(love::graphics::Geometry *geom, float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) const;
/**
* Create and attach a stencil buffer to this Canvas' framebuffer, if necessary.
**/
bool checkCreateStencil();
love::image::ImageData *getImageData(love::image::Image *image);
void getPixel(unsigned char* pixel_rgba, int x, int y);