diff options
author | xgoff <antipotroast@gmail.com> | 2012-08-03 16:38:03 -0500 |
---|---|---|
committer | xgoff <antipotroast@gmail.com> | 2012-08-03 16:38:03 -0500 |
commit | cd5d048d1c2f26b5333d5a8dfd11193b87260974 (patch) | |
tree | ef172e0435defad39ae149ac8d50c7a4140c8c67 | |
parent | 4c9176ee3ab1f434d9bccb2955f852df105c1702 (diff) | |
download | love2d-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.md | 4 | ||||
-rw-r--r-- | fakecanvas.lua | 1 |
2 files changed, 3 insertions, 2 deletions
@@ -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" |