Archived

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

hsguy25

background texture size

Recommended Posts

hsguy25    122
I''m making 2D game using Direct3D is it all right to use 640*480 bitmap image for background? because I heard I must use 2^n texture size In my video card, Geforce MX there was no problem with not 2^n texture image.

Share this post


Link to post
Share on other sites
Spacecat    122
Well, there is a nuance between 'no problem' and how it works. Several cards (including most GeForces, I believe) will actually use a power of two texture, if you give it a non ^2 it will scale it up to a size it can use... So your 640x480 bitmap may become a 1024x512 texture in memory, without you being any the wiser. (Just watch the memory usage skyrocket, hehehe)

Long as your program is just intended for your computer, it's cool. But if you want that program to run on someone else's, you had best figure a way to use not only textures that are ^2 but also limit them to 256x256. Several not-so-old cards are so limited...

Hehe, building yourself a full-screen image using a number of textures can be a great exercice, trust me, I've done it. > One learns about surfaces and how to play with them. How to avoid trouble with the D3DFORMATs. Fun! (I say: Use the backbuffer format, period)

=^.^= Leaders and teachers should remember: It is best to offer others what they Need not what they Want .

[edited by - Spacecat on October 3, 2002 5:11:17 PM]

Share this post


Link to post
Share on other sites