Aaron Stubbendieck
2008-12-24 05:20:00 UTC
Hello,
I'm new to DirectX and hope this isn't a basic question. I'm looking for
some hard suggestions (i.e. code or links to code) on how to implement this.
I'm building a charting control that plots points (500k+) using Direct3D
using Device.DrawUserPrimativies. This part all works correctly.
Now that I've rendered the points I'd like the user to be able to draw a
selection box over the data while dragging without replotting all the data
each time the mouse moves.
I'd do this in GDI+ by rendering my control to a bitmap and bliting to the
screen. Then when the mouse moved I would blit the stored bitmap and draw
the rectangle over it. What I need to know is: how to duplicate this in
DirectX?
I should be able to get a copy of the buffer with GetFrontBufferData into a
surface. But I don't know how to get the surface back into the main buffer
or even if this is the right approach.
Also, I'm working in C#.
Thanks
I'm new to DirectX and hope this isn't a basic question. I'm looking for
some hard suggestions (i.e. code or links to code) on how to implement this.
I'm building a charting control that plots points (500k+) using Direct3D
using Device.DrawUserPrimativies. This part all works correctly.
Now that I've rendered the points I'd like the user to be able to draw a
selection box over the data while dragging without replotting all the data
each time the mouse moves.
I'd do this in GDI+ by rendering my control to a bitmap and bliting to the
screen. Then when the mouse moved I would blit the stored bitmap and draw
the rectangle over it. What I need to know is: how to duplicate this in
DirectX?
I should be able to get a copy of the buffer with GetFrontBufferData into a
surface. But I don't know how to get the surface back into the main buffer
or even if this is the right approach.
Also, I'm working in C#.
Thanks