Skip to main content
gamedev.net
🔒 Locked

background texture size

Started by hsguy25 1 reply 250+ views
Original Post
hsguy25
hsguy25
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.
kth
Spacecat
Spacecat
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]
=^.^= Leaders and teachers should remember: It is best to offer others what they Need, not what they Want.
hsguy25
hsguy25
thanks a lot!
I determined to use a couple of 256*256 images for for my 640*480 background.
kth

Topic Locked

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

Sign in to reply to this topic.