Solved

Invalid pixel format in DirectX7

Posted on 2001-06-07
4
924 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 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