• Advertisement
Sign in to follow this  

Q about DERR_INVALIDPIXELFORMAT

This topic is 4679 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is this error message returned when you try to create a surface of the "wrong" size? I have a font class that loads its character bitmap into memory. The bitmap it loads is something like 20*93(all chars between '!' and 'z' I think) width and 20 height. The resolution of my game is 680*480 and I think that is the problem. So: -Is it possible to have surfaces that are larger than the resolution?(I know this has been discussed somewhere before but I couldn't find it on Google) -Does DERR_INVALIDPIXELFORMAT get returned for this kind of issue?? Otherwise I find it quite strange because when I create my surfaces I omit the pixelformat caps thingy. I read in the docs that all offscreen surfaces would be the same format as the front buffer, and this worked fine when I used 16 bbp mode, but now that I went for 8 bbp it doesn't.. thanks

Share this post


Link to post
Share on other sites
Advertisement
You haven't mentioned any specifics about what platform/language you're using [smile].

At a guess, your description indicates DDraw[7]? If I'm right, then there is a CAPS bit that specifies if your device supports wide textures (that is, >640 in your case); if the device doesn't expose support for this then you're going to have to find another way to deal with your data.

However, DDERR_INVALIDPIXELFORMAT, doesn't seem like the most obvious return code for this problem - _NOTSUPPORTED or _INVALIDCALL is what I'd expect.

Your best bet is to check the documentation for the function call thats throwing you this value, and see what remarks its got - see if they give you any clues.

Remember that 8bpp requires palettes and a little bit more loving care-and-attention to work properly, so you could just be masking a bigger problem with this error...

hth
Jack

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement