Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 982
  • Last Modified:

Invalid pixel format in DirectX7

When I try to create a surface that can be used as a texture (can't remember the DDSCAPS constant offhand) in DirectX7 I am getting a DDERR_INVALIDPIXELFORMAT error.

The example code I have doesn't populate the pixelformat structure so neither did I.  Am I doing something wrong?  Should I use CreateTexture rather than CreateSurface with the texture caps?  

I saw something in the docs that suggested you can't have a 16-bit texture.  I changed my program to 32 bit and that didn't seem to help.

Thanks in advance,
LEJ
0
l99057j
Asked:
l99057j
  • 2
1 Solution
 
lyonstCommented:
Hi,

Video Card Problems: (back to top)  

Question: Do I have to update my video drivers to use TerraExplorer?

Answer: Updating your drivers periodically ensures optimal performance from your computer. In most cases Installing TerraExplorer will not necessitate updating your video drivers. Cards with outdated drivers could receive one of the following errors.

- DirectX error messages ("cannot initialize DirectX", "try reinstalling and restarting the application");

- D3dim.dll error messages;

- DirectDraw and Ddraw.dll error messages
("DirectDrawError: E_NOINTERFACE", "Error starting program:
A required .DLL file, DDraw.dll, was not found", "Direct draw error: DDERR_INVALIDPIXELFormat");

Cheers,

T.
0
 
lyonstCommented:
Hi,

Have you tried 24 Bit as this can also resolve this problem.

Cheers,

T.
0
 
nico5038Commented:

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
NetminderCommented:
Per recommendation, points NOT refunded and question closed.

Netminder
CS Moderator
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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