Skip to main content
GameDev.net gamedev.net
🔒 Locked

Help with porting from DirectDraw to Direct3D

Started by sporedude May 24, 2006 at 9:51 AM 5 replies 1.7k views
Original Post
sporedude
sporedude
Hi all, I am trying to port my game from using DirectDraw to using Direct3D. Now the problem that I have been having is that I need to make all my graphics of resolutions powers of 2 (say and 800*600 image needs to be changed to 1024*1024 image). Someone mentioned that it might just be that the graphics card on my machine is old (which is true-- it is like 3 yrs old) and thus the version of Direct3D that I am using(DirectX SDK-Dec. 2004) doesnot support the hardware completely, thus requiring me to change all the graphics. I was wondering if someone could help me so that I can use rectangular images which are not powers of 2. Else I would need to change all my graphics. cheers
u235
u235
It's not that your graphics need to be powers of two, but your textures do. So what you do is put all your graphics into one image that is a power of two. Then load that one image as a texture. When you go to texture your quads, just use the appropriate texture coordinates of the image you want to use. Hope that helps.

-AJ
V/R,-AJThere are 10 kinds of people in the world: Those who understand binary and those who don't...
sporedude
sporedude
Thanks. yeah it did help

cheers
Jonas B
Jonas B
You can use a texture atlas tool to help create the textures, such as
http://developer.nvidia.com/object/texture_atlas_tools.html
There are also command-line tools that can be integrated into your build.
sporedude
sporedude
hi all

I tried using the NVidia's AtlasCreationTool. Now again the tool requires ur textures to be powers of 2. are there any tools that are useful to say make a non-power of 2 texture to a texture which is power of 2 and then we could use the Atlas Creation tool to add all the textures to one single atlas. if so please let me know.


cheers
Jonas B
Jonas B
Yup, I've got one (in Endogine). Contact me after the weekend if you're interested, and I'll mail the latest version: list(at)jobe(dot)nu
sporedude
sporedude
hey that would be great if you could help me with it.

cheers

Topic Locked

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

Sign in to reply to this topic.