Hello
I wrote a few functions to gouraud-shade polygons and so i thought i could use it on a test-terrain. I'm talking about 2D now, and so I used a Pixmap the size of the screen (640x480), created an array of the PixelPtr Data and change the colours that way.
It's just a major problem that it's bloody slow. YFlipping the pixmap in DrawPixmap nearly halves the FPS from 60 to 35, but I have no idea to "plot" pixels realtime.
Buffering the stuff in an image is fast, but the problem appears again while scrolling, because I have to edit the pixmap of the image and save the changes, where UnlockImage slows everything down as well. Not a good idea for scrolling, thought.
The drawing itself is somehow slow as well for the entire screen, so I have to store the graphic in an image. Dunno how to edit it then as I said before.
Any suggestions from your side?
Thanks in advance
I wrote a few functions to gouraud-shade polygons and so i thought i could use it on a test-terrain. I'm talking about 2D now, and so I used a Pixmap the size of the screen (640x480), created an array of the PixelPtr Data and change the colours that way.
It's just a major problem that it's bloody slow. YFlipping the pixmap in DrawPixmap nearly halves the FPS from 60 to 35, but I have no idea to "plot" pixels realtime.
Buffering the stuff in an image is fast, but the problem appears again while scrolling, because I have to edit the pixmap of the image and save the changes, where UnlockImage slows everything down as well. Not a good idea for scrolling, thought.
The drawing itself is somehow slow as well for the entire screen, so I have to store the graphic in an image. Dunno how to edit it then as I said before.
Any suggestions from your side?
Thanks in advance