Jump to content
  • Advertisement


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


Texture Resizing

This topic is 6103 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was just wondering if someone could explain to how I can prepare an image for resizing in different resolutions? Its for is a splash screen.. Im using a 1280x960.jpg across a two triangles which cover the screen and bringing it in through D3DXCreateTextureFromFile.. It displays fine in 800x600 and above just not 640x480 - completely all messed up.. Im new to all this and help would be great. Thanks.

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
This is for DX8 but you could try using the ID3DXSprite interface. The 2D drawing interface has resizing, rotation, and heaps more.
All it need is to give it a IDirect3DDevice8 interface you''ve obtained and use the draw func, don''t forget to ''Flip(...)'' however.
(doesn''t seem to work with the dubug developer runtimes however?).

Also note that when loading textures with the D3DXCreateTextureFromFile, unless you use the ''Ex'' version to specify a size it will resize your image to 1, 2, 4, 8, 16, ... X 1, 2, ...

I havn''t done much anything 3D (i assume that your using textured primatives?) so i''m sorry for waisting your time if this doesn''t help any.

Share this post

Link to post
Share on other sites
dont use such high resolution.
or just "mip-map" it down.
(pass 0 for the levels parameter when create-texture).
or take the resolution of your display, grow it to the next divider of the image-size, and sample the image down at load-time.
straight-forward average-filter will do.


--- foobar
We push more polygons before breakfast than most people do in a day

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!