Direct3D Texture Management
Hey guys, I was working on my engine again today and I noticed it was going very slowly when I added a single tree to my scene (this is just a 2D sprite) The tree is contained within a 512x512 bitmap. When I size the bitmap down from 512x512 (say to 128x128) it is a ton faster. The problem seems to be that I have too many large textures, but they should all be able to fit into memory at once! I am using D3DPOOL_MANAGED because I NEED to lock my surface and read some information from it (I look for frames in the image so I can grab individual sprites out of it) Is there something I can do to tell D3D to keep that texture in memory even when it''s not in use? The problem is that when I scroll over the tree (this makes a SetTexture call occur) my frame rate goes down from 160 to about 60. Is there something that can be done??? Thanks in advance!
Ben
Use MIPMAPPING!!!
The texture manager does a great job (unless you have broken graphics card drivers trying to override it - there are some).
Almost all 3d graphics hardware suffers badly if it has to minify a texture (i.e. the size of the texture used on screen is much smaller than the source texture).
--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com
The texture manager does a great job (unless you have broken graphics card drivers trying to override it - there are some).
Almost all 3d graphics hardware suffers badly if it has to minify a texture (i.e. the size of the texture used on screen is much smaller than the source texture).
--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement