I've been curious about drawing programs like Photoshop and how they're used to apply changes to an onscreen bitmap. I've been doing a few experiments using drawing directly to the front buffer as well as trying it with page flipping.
It appears that by using page flipping updates don't happen often enough to get a smooth drawing feel.
I was wondering if anyone here has tried to create a drawing program and discovered a technique that works well.
With writing everything to the front buffer I get great speed, but when drawing the brush you have to constantly capture and redraw areas of the onscreen bitmap where the brush last was. This just seems a little awkward to me and I was wondering if there is an easier technique that I'm just not seeing.
Using page flipping its pretty easy, when I'm ready to draw I just set an image buffer and draw on that, then set the buffer back to the back buffer and draw the image, then draw the brush shape and flip. It just doesn't update fast enough and seems very redundant.
If you need me to explain better or provide code examples let me know.
It appears that by using page flipping updates don't happen often enough to get a smooth drawing feel.
I was wondering if anyone here has tried to create a drawing program and discovered a technique that works well.
With writing everything to the front buffer I get great speed, but when drawing the brush you have to constantly capture and redraw areas of the onscreen bitmap where the brush last was. This just seems a little awkward to me and I was wondering if there is an easier technique that I'm just not seeing.
Using page flipping its pretty easy, when I'm ready to draw I just set an image buffer and draw on that, then set the buffer back to the back buffer and draw the image, then draw the brush shape and flip. It just doesn't update fast enough and seems very redundant.
If you need me to explain better or provide code examples let me know.