Solved

Invalid pixel format in DirectX7

Posted on 2001-06-07
4
936 Views
Last Modified: 2007-12-19
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
Comment
Question by:l99057j
  • 2
4 Comments
 
LVL 15

Expert Comment

by:lyonst
ID: 6171168
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
 
LVL 15

Expert Comment

by:lyonst
ID: 6171173
Hi,

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

Cheers,

T.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7375177

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
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7400547
Per recommendation, points NOT refunded and question closed.

Netminder
CS Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question