aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxgoff <antipotroast@gmail.com>2012-08-04 00:01:13 -0500
committerxgoff <antipotroast@gmail.com>2012-08-04 00:01:13 -0500
commit3140d856e5b5bc09ae49a6584f3d26ee0adc5323 (patch)
tree73b6ce4d09860c10f4fcb92bfdec956f11156a29
parentcd5d048d1c2f26b5333d5a8dfd11193b87260974 (diff)
downloadlove2d-fakecanvas-3140d856e5b5bc09ae49a6584f3d26ee0adc5323.tar.gz
love2d-fakecanvas-3140d856e5b5bc09ae49a6584f3d26ee0adc5323.tar.bz2
love2d-fakecanvas-3140d856e5b5bc09ae49a6584f3d26ee0adc5323.tar.xz
love2d-fakecanvas-3140d856e5b5bc09ae49a6584f3d26ee0adc5323.zip
deconstructing hopes and dreams
-rw-r--r--README.md4
1 files changed, 3 insertions, 1 deletions
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