Jump to content
  • Advertisement
Sign in to follow this  
ghalex

D3DXSprites

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

First hello to everyone !! I render in my scene one sprite 32 X 32 an I have a FPS = 200; My problem is if i try to render a background for exemple a sprite with size 1024 x 768 with a texture on it my FPS is very low FPS = 20; How can I render a backgroun widthout my FPS to be that slow; P.S sorry for my english.

Share this post


Link to post
Share on other sites
Advertisement
Hello ghalex,

I'm not sure what type of hardware you're running on, but I know that there are two things that will definitely affect the speed of drawing a sprite. First, obviously the size of your texture is going to be an issue. If your program only has to display a 32x32 sprite, it's obviously going to take less time than displaying a 1024x768 sprite. Also, the fact that your texture, at 1024 x 768 is not on a power of 2 scale (at least 768 isn't). This could also affect performance. However, the problem could also lie somewhere in your code. Posting the offending code is always a good way to help all of us point out if there are mistakes that would cause a problem.

As far as rendering a background without the huge performance hit, you could instead of trying to draw one large 1024 x 768 texture, instead draw a couple 256 x 256 textures (which I think are still the fastest according to MSDN).

Hope that helps and that I'm not giving bad info.

-Jeff

Share this post


Link to post
Share on other sites
No I not use REF.

I my code is very simple I am sure there are not mystake.I just create the Sprite and draw it on the screen.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
As GodlyGamr said, post your code and we will have better conditions to help you.

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!