aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxgoff <antipotroast@gmail.com>2012-08-03 16:38:03 -0500
committerxgoff <antipotroast@gmail.com>2012-08-03 16:38:03 -0500
commitcd5d048d1c2f26b5333d5a8dfd11193b87260974 (patch)
treeef172e0435defad39ae149ac8d50c7a4140c8c67
parent4c9176ee3ab1f434d9bccb2955f852df105c1702 (diff)
downloadlove2d-fakecanvas-cd5d048d1c2f26b5333d5a8dfd11193b87260974.tar.gz
love2d-fakecanvas-cd5d048d1c2f26b5333d5a8dfd11193b87260974.tar.bz2
love2d-fakecanvas-cd5d048d1c2f26b5333d5a8dfd11193b87260974.tar.xz
love2d-fakecanvas-cd5d048d1c2f26b5333d5a8dfd11193b87260974.zip
add version check
-rw-r--r--README.md4
-rw-r--r--fakecanvas.lua1
2 files changed, 3 insertions, 2 deletions
diff --git a/README.md b/README.md
index 22f5e2c..2e0c6a3 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
fakecanvas is an attempt at emulating the functionality of canvases (render to texture) for hardware that does not support them.
-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).
+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:
@@ -51,7 +51,7 @@ fakecanvas directly replaces some of LÖVE's functions, so there are no special
* `setOption(name, value)`: sets the option `name` to `value`. current options are:
* `"vflip"`: use vertically-flipped texture coords for the canvas image, to match those of real canvases. visually this makes no difference, but does make a difference inside shaders. if your shaders are not sensitive to this information, you can disable this option and get a possible performance boost. by setting this option before calling `setCanvas()`, you can control this behavior on a per fake canvas basis. boolean: default `true`
-* `getOption(name)`: gets the current value of option `name`.
+* `getOption(name)`: gets the current value of option `name`
### Example main.lua
diff --git a/fakecanvas.lua b/fakecanvas.lua
index b170896..3827366 100644
--- a/fakecanvas.lua
+++ b/fakecanvas.lua
@@ -24,6 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
--]]
+assert(love._version:match "^0.8", "fakecanvas requires LOVE 0.8")
assert(debug, "fake canvases require access to the debug library")
local canvas_supported = love.graphics.isSupported "canvas"