Solved

Invalid pixel format in DirectX7

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now