From 3140d856e5b5bc09ae49a6584f3d26ee0adc5323 Mon Sep 17 00:00:00 2001 From: xgoff Date: Sat, 4 Aug 2012 00:01:13 -0500 Subject: deconstructing hopes and dreams --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e0c6a3..027fff7 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ ##fakecanvas -fakecanvas is an attempt at emulating the functionality of canvases (render to texture) for hardware that does not support them. +fakecanvas is an attempt at emulating the functionality of canvases (render to texture) for hardware that does not support them. it was meant to answer a question: can you do it? the answer is yes, but at a cost... it is more or less a drop-in library, in that all you need to do is call `require 'fakecanvas'` (preferably inside `love.load`) to use it. fakecanvas' own functions will only be used if `love.graphics.isSupported "canvas"` is false, unless this behavior is overridden (see below). note: you must be using LÖVE 0.8 it uses (a few) screenshots in order to isolate drawing operations, which means there are some amusing drawbacks: * `setCanvas()` is fairly expensive +* clearing a canvas is really expensive +* each `setCanvas()` call will allocate several megs of ram, this isn't a huge deal if you draw to canvases only occasionally. draw to one every frame, though... * possible drawing issues if you call `love.graphics.present()` yourself, specifically between `setCanvas()` calls * canvas width/height cannot exceed the window's width/height, and if your hardware lacks PO2 support, canvases will be further limited to that as well. ie: for an 800x600 display the max canvas size is 512x512. 1024x768 will limit you to 1024x512, and so on. * any other weirdness you might run across -- cgit v1.2.3-70-g09d2