Sign in to follow this  

Performance textures direct3d

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

Hello, I'm writing a slide show program in direct3d. Now i have a question how to keep the performance high. A page can exist from pictures and sound. The pictures can be as big as the display his size. Does anyone have some idea's to keep the framerate as high as possible. Keep in mind I'm having a couple of textures on a page. Some of the pictures are put to getter on a bitmap before creating the texture. This is already for performance. Is it smart to take parts of a bitmap and make a texture for every part of the bitmap. How can I optimize the buffer? etc. example: bitmap is 1024x768 I take textures with the width and height of 256, is this a good idea? And do you have more idea's?

Share this post


Link to post
Share on other sites
Quote:
Original post by jcr83
I'm writing a slide show program in direct3d. Now i have a question how to keep the performance high.

Whenever you're doing performance tuning in a D3D application you need some sort of feedback. You need to do some profiling - even a simple one so you can tell if a change has increased (or decreased!) performance. You might also want to look at the "PIX for Windows" tool in the DirectX-SDK.

Also, as a general point, allocating/loading resources during runtime is never good for performance. Ideally you want to restrict loading to when your application loads, or a transitionary point (e.g. going between two levels).

Quote:
Original post by jcr83
Is it smart to take parts of a bitmap and make a texture for every part of the bitmap. How can I optimize the buffer?

Yes, it makes sense to break down "irregular" sized large images into 2N dimension textures. Two points:

1. Implement the greedy algorithm when building your smaller textures, so as to minimize the number you create. "Consume" the texture with the largest possible chunks - either determined by the original size, or the underlying hardwares texture support.

2. Re-Use buffers where possible. If you know that a lot of images are going to be appearing with 1024x768 dimensions, then create however many textures and re-use them rather than destroying and recreating them each time a texture is changed.

hth
Jack

Share this post


Link to post
Share on other sites
Since it's a slide show, I think the best optimization you can do is in when you load in the slide. At teh start of the program you'll obviously have to load in the assets for the first slide. Then before the user clicks next, or before the next slide automatically shows, you can load in the next slides resources, so the switch will be instantaneous. When you're on the next slide, do not release the previous slide resources unless you're two slides ahead (so if the user clicks on previous you can instantly go back)

So in short, always have the resources for the next slide and the previous slide loaded in to memory.

Share this post


Link to post
Share on other sites

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