Archived

This topic is now archived and is closed to further replies.

coreydj

Large Textures

Recommended Posts

I am using ID3DXSprite to render my textures. Here is the problem. If I want to render a texture to the screen that will take up the whole screen (800-600 in my case) the framerate drop is HUGE! Is this something I just have to deal with or is there a better way for me to put the texture on the screen.

Share this post


Link to post
Share on other sites
Most 3D Hardware does not support textures of that size. What you''re going to need to do is chop up that image into several textures of a size that the card can handle. For example I think a Voodoo3 can only handle textures of 256x256 max while a GeForce4 can handle 1024x1024 (Not sure).

------------------------------------------------------------

Stupid divide by zero error. I should be allowed to tear a hole in the fabric of time and space if I want!

Share this post


Link to post
Share on other sites
if the 3d hardware did not support it, he could not create the texture. geforce3 supports upto 2048x2048, the voodoo5 does as well. rage pro (4mb) supports up to 1024x1024. though thats bit the issue, he is RENDERing 800x600 textures, not using 800x600 textures. the hardware can scale that easily.

drawing multiple fullscreen textures will slow the hardware immensily because it only has so much fillrate. not much you can do, except lower the screen resolution, or dont draw so many things. using vertex buffers (ie not id3dxsprite) will increase performence by allowing you to send the data to the card in a better fashion to allow you to better use the video card. though you can only speed the operation up so much. how many times are you filling the screen? and how many sprites you pushing? also whats your hardware spec? even an ati rage pro (4mb) can draw a few fullscreen quads without much trouble. the voodoo2 (12mb) does it pretty acceptable as well.

how much are you drawing, and what is the drop in framerate?
also, what card are you using?
i have filled a 1024x768 screen 25 times per frame using additive blending at an acceptable decent framerate on a geforce3.

make sure vsync is off as well, it can really hurt performence.

Share this post


Link to post
Share on other sites
Another solution is to use Direct Draw, it''s much better for large textures. I know DDraw is not included in DXSDK8, that''s the PB. So, use DXSDK7, or try to combine DXSDK8&DDraw.
good luck!

Share this post


Link to post
Share on other sites
Thanks for the advice guys (gals? I doubt it).
I have a TNT2 with 32 Megs of RAM. I am drawing a background for a 2D game. With the backdrop I am getting about 100 FPS with the background it goes to 60. I expect that it will go down some, and I know 60 is still good, but I plan on adding more sprites. Currently there are only about 15 sprites [64-64] on the screen at one time.

Another question is how much faster is using the Vertex Buffer and custom sprite quads than the ID3DXSprite. Doesn''t ID3DXSprite just encapsalate that functionality?

Corey

Share this post


Link to post
Share on other sites
I think the performance difference is very small if you are doing very basic operations (ie. drawing a couple of sprites). I personally use my own vertex buffers instead of D3DXSprite because you have complete control, meaning that once you get into more involved rendering, you can optimize accordingly.

It is pretty easy to set up your own version of D3DXSprite. Even if the performance increase/decrease is small, the increased level of control is probably worth it. It all depends on what you are actually doing.

Share this post


Link to post
Share on other sites