Skip to main content
gamedev.net
🔒 Locked

Texture Management

Started by Funkymunky 0 replies 600+ views
Original Post
Funkymunky
Funkymunky
Ok, I think I have this completely understood, but I''d just like to pose the question in case I''m wrong. I''m using DX 8, DirectX Graphics, for a 2d engine. Obviously this involves a lot of tiles, sprites, animations, etc. IE lots of textures. So, I have the option of either loading a bunch of individual IDirect3DTexture8''s and using them as necessary, or loading one big texture and getting my graphics from it with some tricky texture coordinate work. So my question then is, is either method better? On the surface it looks like having a bunch of IDirect3DTexture8 interfaces would be more costly, but it should end up being the same amount of memory, shouldn''t it? Or is it more beneficial to cut up one big texture? I would think I''d see color bleeding at the edges though. ??? BTW, feels great to be done with another year of college. Suuummmerrtiiiiiime, and the livin''s easy...
Osc
Osc
Changing the current texture carries a certain amount of overhead. One advantage of packing small images into a single texture is that you make less texture changes, therefore incurring less overhead.

Also remember that for optimum performance you should aim to draw your geometry using the smallest number of Draw* calls possible. When you pack images into a single texture, you gain the option to batch geometry using all of those images into a single Draw* call (or possibly more than one if draw order is an issue).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.