• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 381
  • Last Modified:

D3DXCreateTextureFromFile will not load certain formats

I am working on a DirectX 7 based 2D engine using Direct3D for transparency effects.

I need to load textures onto surfaces and have been using the D3DXCreateTextureFromFile function to do so.  I have created an A8R8G8B8 128x128 texture using the DirectX Texture Tool.  However, when I specify D3DX_SF_A8R8G8B8 as the surface format in the D3DXCreateTextureFromFile(), I get an E_INVALIDARG error returned.  Up to this point, I have been using DXT3 textures for my textures because they are the only textures that work when I specify a D3DX_SF_A8R8G8B8 format, but I need better quality than the DXT3 can supply at this point.

Any help here?
0
RedFez
Asked:
RedFez
1 Solution
 
joachimcCommented:
If you skip using D3DXCreateTextureFromFileEx() It will determine the format by itself.

But otherwise I guess a 32 bit format like D3DFMT_A8R8G8B8 would work. You should probably use .tga files for maximum quality.
0
 
CleanupPingCommented:
RedFez:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now