Page 1 of 2

fakecanvas: canvases for everyone??? [tldr: barely]

Posted: Thu Aug 02, 2012 4:26 am
by Xgoff
after posting this i somehow got inspired to actually try it. predictably, screenshots aren't affected by the scissor box and only capture what's in the window, so that changed my plans somewhat.

the readme in the link below explains everything. i'll mention again, though, that i'm unsure if this will work for actual programs, because of the dodginess involved. it's pretty likely i have missed some things too. so don't get your hopes up!

love 0.8 is required for this library

github link

attached is the mentioned "minimal test", which draws to and renders a fake canvas, and (if supported) a real canvas. this allows you to compare the results and verify that the library actually works to some extent. underneath, the shader shows that i cared enough to vertically flip the image so that it matches the unfortunately inverted real canvas' texture coordinates

EDIT: should work without pixeleffect support now

Re: fakecanvas: canvases for everyone???

Posted: Thu Aug 02, 2012 8:44 am
by Roland_Yonaba
What the - :awesome:
That's good news. I predict this is going to be slow, but key, if it works, that's all folks.
Watching this on Github. Kinda busy right now, will try this as soon as possible.
Xgoff, be blessed. :nyu:

Re: fakecanvas: canvases for everyone???

Posted: Thu Aug 02, 2012 9:37 am
by Nixola
Oh, wow, software canvas support! What does it require? Pixeleffects >.<

Re: fakecanvas: canvases for everyone???

Posted: Thu Aug 02, 2012 12:20 pm
by Xgoff
Nixola wrote:Oh, wow, software canvas support! What does it require? Pixeleffects >.<
it doesn't actually require pixeleffects (the demo file does though, oops), unless i messed up somewhere and assumed they existed

EDIT: apparently i did

EDIT2: fixed hopefully

Re: fakecanvas: canvases for everyone???

Posted: Fri Aug 03, 2012 2:22 pm
by mickeyjm
As I get the text saying if you can see this take my word for it, could you upload a screenshot of it displaying the canvas version so I can see with my own eyes how similar they look?

Re: fakecanvas: canvases for everyone???

Posted: Fri Aug 03, 2012 3:20 pm
by Xgoff
mickeyjm wrote:As I get the text saying if you can see this take my word for it, could you upload a screenshot of it displaying the canvas version so I can see with my own eyes how similar they look?
Image

both should (in theory) always look the same since they use the same drawing functions. unless there are subtle driver differences or if canvases are handled differently, settings-wise... but that's something that has to be seen still

Re: fakecanvas: canvases for everyone???

Posted: Fri Aug 03, 2012 4:48 pm
by Zeliarden
anyone tested this on a real game/program? how fast is it?

Re: fakecanvas: canvases for everyone???

Posted: Sat Aug 04, 2012 4:52 am
by Xgoff
just to let everyone know: i'll still work on finishing this, but based on some tests i've lost hope in it being very useful in many cases; it's not *as* slow as i figured it would be (clearing a canvas is really slow, though, but clearing it to full transparency can probably be sped up somewhat)... however, all those screenshots eat ram like popcorn, and you will get some hilariously high memory usage if you're updating even a single canvas each frame :(

so, it's probably going to be limited in usefulness to things that don't need to draw to canvases often (like guis i guess)

but it did answer my original question: is it possible? yes. but is it practical? not really!

to quote myself:
get better drivers/hardware dammit >:(

Re: fakecanvas: canvases for everyone???

Posted: Sat Aug 04, 2012 7:30 am
by Nixola
Xgoff wrote: get better drivers/hardware dammit >:(
Or just install Linux and stick with it

Re: fakecanvas: canvases for everyone???

Posted: Sat Aug 04, 2012 10:42 am
by mickeyjm
Zeliarden wrote:anyone tested this on a real game/program? how fast is it?
I tried it on the 3D planets demo, but it looked kind of...warped, but for simpe things it seems to work well