Skip to main content
gamedev.net
🔒 Locked

Bitmap Blitting Problems

Started by zealotgi Mar 11, 2005 at 5:31 PM 0 replies 500+ views
Original Post
zealotgi
zealotgi
Hello, When I blit an image from a bitmap, the pixel coordinates are messed up. Sometimes in my game, I have to multiply the coordinates by 2 (if the bitmap is truly 100x100, it would be 200x200 on the program), and the image blows up in scale to 2x the size, and I dunno what is happening. Is there some trick to blitting that I don't know, or am I doing something wrong... BTW Im using the Game Core from "Programming Role Playing Games with DirectX 9 SE" by Jim Adams if that would help
barakus
barakus
If your using Direct3D the size of textures have to be a power of two.
eg 128 x 64, 256 x 512, 32 x 32 etc
However, if your card supports it, you can put D3DX_DEFAULT_NONPOW2 as a property on the textures width and height and u should have no problems.
Im not sure about this but if you use a point filter instead of a linear filter you will not get any size distortions.
Hope it helps.

Topic Locked

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

Sign in to reply to this topic.