Hello, Lovers!
It is possible to draw using, for example, primitives (like quad, line and circle) directly into an Image (maybe an ImageData and converting it to an Image after)? Or the only way to draw not into screen is via framebuffer (using framebuffer:renderTo)?
Sorry for the creepy english! I'm far away from any english-speaker country.
Manipulating an Image or something
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 3
- Joined: Tue Dec 27, 2011 5:27 pm
- Location: Brazil
- Contact:
-
- Prole
- Posts: 3
- Joined: Tue Dec 27, 2011 5:27 pm
- Location: Brazil
- Contact:
Re: Manipulating an Image or something
no one can help me?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Manipulating an Image or something
No, you can only do regular drawing to a framebuffer (or the screen), you can do pixel manipulation on ImageData directly, if you're desperate.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Manipulating an Image or something
I would use FrameBuffers. (Canvases in 0.8) I use them all the time now. But they're not 100% supported across the entire community. Some graphics cards don't like them at all, some have limits, others (Like my MacBook Pro and Air) support a really high amount. But they are great in that you create a blank buffer/canvas and clear it with whatever color you want, draw all your stuff to it then draw that to the screen or another buffer/canvas.
You clear it manually in the newest versions (I can't remember if clearing is required in 0.8 or 0.7.2) which is really useful so you can draw to it over time and not have to redraw everything over and over. Really useful if you want to have a canvas specifically for blood spatters or paint spatters or bullet holes or anything that adds detail, but would be too costly CPU cycle wise to redraw every single frame. You'd just draw the "spatter" canvas in between the world and the characters.
We had a poll a while ago to see which members had graphics cards that supported how many buffers. I forget the outcome. If worse comes to worse, you'd have to design the game to not require them, but have fallbacks for when they aren't supported even if it means more processing cycles are needed.
You clear it manually in the newest versions (I can't remember if clearing is required in 0.8 or 0.7.2) which is really useful so you can draw to it over time and not have to redraw everything over and over. Really useful if you want to have a canvas specifically for blood spatters or paint spatters or bullet holes or anything that adds detail, but would be too costly CPU cycle wise to redraw every single frame. You'd just draw the "spatter" canvas in between the world and the characters.
We had a poll a while ago to see which members had graphics cards that supported how many buffers. I forget the outcome. If worse comes to worse, you'd have to design the game to not require them, but have fallbacks for when they aren't supported even if it means more processing cycles are needed.
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests