• Advertisement
Sign in to follow this  

framerate - big texture

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

Now I think I found what was causing my framerate to go down. In the begining of the game (in the menu) I strech a 512X512 texture over the whole screen as a background. On my computer this goes fine but on my friends computer it makes the framerate soar down. when the same texture is drawn on a smaller portian of the screen the framerate is fine. (I'm using opengl) What could the reason for this be?

Share this post


Link to post
Share on other sites
Advertisement
Anyone?
Its a little annoying that my game only works on my computer:)
-and we both have the same graphics cards.
Thanks.

Share this post


Link to post
Share on other sites
I can only guess with so little to go on, but perhaps your friend has anisotropic texture filtering forced in his gfx driver settings. Or he might have bad drivers.

Quote:

when the same texture is drawn on a smaller portian of the screen the framerate is fine.


This is because your application is probably fillrate limited, atleast on your friends computer.

Share this post


Link to post
Share on other sites
Considering you have the same GPU, if it were indeed a problem with the computer, not the code, it could be drivers. Check the versions on your drivers and your friend's drivers. He might have really ancient drivers. Or he might have certain settings cranked up real high for quality, while you have yours down lower for greater performance.

Aside from those possibilities, though, who knows. What method do you use to draw the texture? An ordinary quad? Do you disable reading/writing to the z-buffer, disable alpha blending, and stuff like that?

Share this post


Link to post
Share on other sites
Omid Ghavami: could you explain what you meant about the "fillrate" - never heard of that before. and what is anisotropic texture filtering?

Agony: what could the problem with the code be that would make the speeds different?
It's just an ordinary quad textured with a tga texture that has an alpha channel. blending is enabled.

Thanks.

Share this post


Link to post
Share on other sites
Quote:
Original post by daniel_i_l
Omid Ghavami: could you explain what you meant about the "fillrate" - never heard of that before. and what is anisotropic texture filtering?


Google is your friend. All hail the hive mind.

Share this post


Link to post
Share on other sites
Quote:
Original post by daniel_i_l
Omid Ghavami: could you explain what you meant about the "fillrate" - never heard of that before. and what is anisotropic texture filtering?

Agony: what could the problem with the code be that would make the speeds different?
It's just an ordinary quad textured with a tga texture that has an alpha channel. blending is enabled.

Thanks.

Since it's an ordinary quad, that's a good thing. If you were blitting the image in some way, then that could complicate things, depending upon the hardware (not just the graphics card) or the operating systems, for example.

Really, though I can't think of much myself, other than vague ideas. My recommendation would be that you add some timing code into your program, and figure out which sections of code go slow. Of course, doing this with hardware accelerated graphics code can sometimes be messy, but depending on the actual problem, it might make itself apparent very quickly once you actually know which sections execute quickly, and which don't.

I would have suggested that you were fillrate limited* myself, except you claim to have the same hardware. Not to mention it is only a single 512x512 quad, which isn't really much at all. At work, I frequently draw 6 layers of partially alpha-blended 1024x1024 textures on top of each other, and one or two of them might even be full-motion videos, and this doesn't usually require the awesomest of graphics cards. So a single 512x512 quad doesn't sound hard at all. But I do wonder why you have alpha blending enabled; if it's a background, it shouldn't need it. Not that I expect disabling alpha blending will do any noticeable good, but I can't think of anything else at the moment.

*Fillrate is the amount pixels that are drawn on the screen per time period. Different graphics cards can process and draw different amounts of pixels per second. Usually, you try to get the GPU to do as much as possible in a balanced manner. If you have very few triangles, but they're very large or have a lot of textures applied to them (or have fancy pixel shaders), you will probably max out your card's ability to process pixels long before you max out it's ability to process vertices. But if you have a massively huge number of triangles, but use very simple textures and pixel shaders, then you'll probably max out your cards ability to transform vertices before you max out it's ability to process pixels. When you're fillrate limited, it means that your primary bottleneck is the number and complexity of the pixels you draw. This could be due to poor ordering of objects (drawing opaque objects back-to-front, and thus not getting the benefit of a z-buffer), drawing a huge number of alpha blended objects, using fancy pixel shaders, using a higher quality texture filter (for each pixel, requires more texture lookups), and so forth.

Share this post


Link to post
Share on other sites
Thanks you guys. I still havn't found the problem, we both have GeForce4 MX 440 graphics cards so I guess the difference has to be in the drivers right? the problem is that his drivers are newer than mine! why would older drivers perform better in this case? m
My main problem is that know basicly nothing about harware and stuff so I'm not sure how to solve the problem. Can I send the game and the code to you smarter people so that you can check it out? (I'm not sure how to return this favour other than with the game itself..) It has plenty of comments and I would also give you an overall description so it should be pretty understandable. So if you're willing to check it out could you please post here or PM me?
Thanks a lot!!

Share this post


Link to post
Share on other sites
If you upload your demo somewhere and post us a link, you'll surely get some feedback.

Regards
Admiral

Share this post


Link to post
Share on other sites
Good idea, I'll post the finished game in the "Image of the day" sometime this afternoon.
Thanks.

Share this post


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

  • Advertisement