Jump to content
  • Advertisement
Sign in to follow this  
Jabon

2D in D3D - Alpha Layering Without Complete Redraw

This topic is 5073 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am working on a 2D/3D graphics engine which displays scientific data on multiple tracks using DirectX 9. During normal operation, the data is read from the disk and rendered to the screen one pixel at a time. Unfortunately, the data can not be rendered as triangles, lines, or any other type of primative to cut down on the number to be rendered. When rendering my data in 2D (As Primatives through D3D9), DirectX is plenty fast to render about 10 wide pixels at a time without appearing choppy or taking too much time. This involves about 20,000 point primatives to draw. I would like to add a ~50% transparent overlay to the scene that follows the mouse cursor. Here's the catch, a data window may be made up of 1,000,000 point primatives. There is not enough time to recreate the entire scene each time the user moves the mouse. I am looking for advice on how to structure my display elements to make this work. Currently, my device uses a swap effect of D3DSWAPEFFECT_DISCARD, and drawing my primatives to the device, presenting after 10 horizontal points (~20,000 overall) worth of data have been rendered. Is there a way to make another device that is completely transparent that I can display on top of the data device? Should I render both the data and overlay to different surfaces and copy them to the device each frame? Is DirectX unable to help me and I should go back to GDI? (I hate the flicker) Any advice would be helpful -Thanks

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!