Page 2 of 2

Re: How do I efficiently update an image?

Posted: Fri Feb 28, 2020 7:15 pm
by Sky_Render
steVeRoll wrote: Fri Feb 28, 2020 7:12 pm If you want an Image that you can change, a Canvas might be more useful. You can both draw onto a canvas, and draw the canvas onto the screen.
I tried that. It didn't work, because I still could not find a way to not throw the entire massive original image at the system every time it needed an update.

Re: How do I efficiently update an image?

Posted: Fri Feb 28, 2020 7:16 pm
by steVeRoll
What effect do you want to achieve exactly? I can't see how using canvases would not work.

Re: How do I efficiently update an image?

Posted: Fri Feb 28, 2020 7:19 pm
by Sky_Render
I was using canvases. The moment the source image climbed above about 512x512 pixels, everything slowed to a snail's pace, because the laptop this is running on has an Intel Graphics 520 on-board graphics chip. It's rendering somewhere around 20 layers at a time.

Re: How do I efficiently update an image?

Posted: Fri Feb 28, 2020 7:23 pm
by steVeRoll
Again, what effect do you want to achieve? You can probably use some workarounds like using a smaller canvas, or not using them altogether.

Re: How do I efficiently update an image?

Posted: Fri Feb 28, 2020 7:26 pm
by Sky_Render
Perhaps someone could actually explain some of these supposedly-real workarounds? Last time I asked about this, I had someone suggest (with no examples or clear explanations of how this is even possible, naturally) that I drop it down to just one render layer and use stencils to deal with various draw layer needs. If there's a better way to render, please, someone just tell me how it actually works instead of laying a bunch of vague suggestions of how some tools theoretically might work for the problem and/or explaining computer hardware to me in a way that does nothing but rephrase the problem in technical terms. Please.

Re: How do I efficiently update an image?

Posted: Fri Feb 28, 2020 7:32 pm
by steVeRoll
Yes, we can tell you a better way of doing it, if you tell us what exactly you want to do. So far you just said that you draw a portion of the screen, but I still have no idea where the render layers come in. Just tell us, without talking about the sizes or amount of render layers, what effect you want in your game.
Also, forums aren't really suited for rapid-fire discussions like this. I would rather converse through the Discord server, or irc.

Re: How do I efficiently update an image?

Posted: Sat Feb 29, 2020 2:57 am
by pgimeno
I think you may be looking for (Image):replacePixels.