Jump to content
  • Advertisement
Sign in to follow this  
msbasanth

Smooth scrolling using directx (have huge scrollable area)

This topic is 3607 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

Hi all, I am developing a tile based application. In worst case each tile may use diferent textures. I am using point sprites to show tile (using texture). I have to show about 1000 x 800 tiles in a frame. I would use tiles of size 4 x 4. Now i am doing a scrollable window in DirectX using DXUT. I am trying to show tiled pattern inside this scrollable window. it scrolls in all directions. For giving a feel of scrolling i am redrawing the pattern using the vertex buffer information we have. It will have scrollable areas more than 60,000 x 10,000. ie. we cannot pre-render the entire scrollable area and then blit the viewable area to the screen. I tried by copying the content of offscreen surface (already rendered portion of scrollable area ) to backbuffer and the presenting it. Still i am not getting the smooth scrolling. When i profiled, it seems device.Present() function is the bottleneck. I am using a dynamic vertex buffer since the vertex information we have to keep is huge. How to achieve a smooth scrolling, considering i will have to show huge scrollable area? How can i implement double buffering? Expecting Reply Bachu

Share this post


Link to post
Share on other sites
Advertisement
Your best bet is to simply track which tiles are visible in the viewport and then render only those tiles. This is only going to be an extremely light load on the GPU and should be easy to scroll through.

Share this post


Link to post
Share on other sites
Thanks for the reply,

Now i am drawing the tiles which are visible in the view port. The number tiles to be shown in a frame is about 1000 x 800. The data to be shown next is calculated dynamically. Smoother scrolling is not happening even we have the surface already drawn and copying it to back buffer dynamically.

I am not using any extra buffer. I am working with DXUT.

bachu

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!