mskeel
Well-known member
I have a list of points for multiple lines. Each line could be hundreds of points long and there could be hundreds of lines. I would like to be able to change the colors of the lines and hide/show them instantly on mouse clicks. Becuase there are so many points to draw, the picture takes time to make.
My thought for the color and hide/show problem was to draw each line to its own surface. Copy them all to a backbuffer and then show that (after all the lines are on it) to the screen, the primary surface. This works for the most part. The only problem is that each surface has its background filled in so that only the most recently drawn line (the surface on top) is shown. I know this becuase I can click on the last line and it dissapears showing me another one, the one before/beneath it.
Two questions really.
1. How do I draw just the line on the surface and nothing else (so all lines will be visible when I copy all surface onto the backbuffer)?
2. What kind of memory issues does having many surfaces like this create? (this isnt really a problem, Im just curious from a preformance standpoint)
Thank you very much.
My thought for the color and hide/show problem was to draw each line to its own surface. Copy them all to a backbuffer and then show that (after all the lines are on it) to the screen, the primary surface. This works for the most part. The only problem is that each surface has its background filled in so that only the most recently drawn line (the surface on top) is shown. I know this becuase I can click on the last line and it dissapears showing me another one, the one before/beneath it.
Two questions really.
1. How do I draw just the line on the surface and nothing else (so all lines will be visible when I copy all surface onto the backbuffer)?
2. What kind of memory issues does having many surfaces like this create? (this isnt really a problem, Im just curious from a preformance standpoint)
Thank you very much.