🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Textures

Started by
0 comments, last by ColdfireV 24 years, 5 months ago
To store all textures (for example, DX Surfaces for tiles), what''s the recommended storage? Should everything go into a big array and access it by named index? Here''s what I mean... (DXSurface *) Textures[50]; enum TEXTURETYPE {SAND, WATER, ROCK, GRASS, BORDER, etc...}; Blit( Tile, Textures[WATER] ); Yeah, I know, that''s just a bunch of half-pseudo half-dx code... But what''s a good way to keep track of each type of texture in the game for an isometric engine? Could someone help me out here? -John
[email=jperegrine@customcall.com]ColdfireV[/email]
Advertisement
Use either a large surface and access each texture by offset (this is the preferred approach if you have a ton of small textures) or an array of surfaces and access by index - names is a NONO! If you need names in your world definition, make it so that you can "pre-compile" it into indices at run-time.

/NJ
<b>/NJ</b>

This topic is closed to new replies.

Advertisement