Sign in to follow this  

Smooth scrolling using directx (have huge scrollable area)

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

This topic is 3299 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this