DirectDraw pisses me off...

Started by
8 comments, last by Zefrieg 20 years, 6 months ago
Well, here I am at college, running around and testing my game on various machines throughout the campus. Well, I have a Win98 and Win2000 machine at home. Well, I got the game to run perfectly there, but there are some computers at this college that still don''t run it correctly. The problem is some images turn to mush. Not all of them, but just a few. The only thing that I think it could be is different video cards having problems creating the sizes of surfaces that I need. Do some video cards restrict the dimensions of surfaces; such as allowing only multiples of a certain number. Currently, my surfaces are all multiples of 32. Here is an example of how some of the images turn out when blitted: This... 00000000 00111100 00111100 00111100 00000000 turns to this... 01100011 00110001 00011000 10001100 11000110 Now, most machines run the program fine, but some of them turn the images to garbage.
Advertisement
Oh, yeah, the college''s computers run Win2000.
Do you take into account that surface stride (scanline width in memory) may not necessary equal BytesPerPixel*width?
Some display adapters allocate a cache space next to surfaces, usually for internal copy optimizations.

-Nik

[edited by - Nik02 on October 13, 2003 1:33:18 PM]

Niko Suni

aka "pitch" in the DirectX documentation.

I''m hip because I say "M$" instead of "MS".
"There is only one everything"
quote:Original post by the Speed Bump
aka "pitch" in the DirectX documentation.


Yes, "pitch" and "scanline memory width" are indeed interchangeable terms.

-Nik

Niko Suni

Well, using the pitch creates the same problem, but on different machines from the ones that I use width on! WTF.
Screen bit depth?
If you are asking for 16 bpp bit depth, there are two common formats among the cards: R5G6B5 and R5G5B5. This can cause images to beome garbled. Also when writing directly to surfaces you need to adjust the pitch to account for different bit depths in any calculations you do.
Question:

If I have dx9 installed on my system, can I still use directdraw in the same way as is mentioned in the dx7 documentation? I copied the first tutorial from the dx7 directdraw documentation and upon compiling, I get either 3 or 48 errors depending on if I type "IDIRECTDRAW7 lpdd;" (3 errors) or "LPDIRECTDRAW7 lpdd;" (the way it was in the dx7 docs/48 errors). I''ve linked to ddraw.lib and included ddraw.h, so that doesn''t seem to be the problem, and I''ve always been told that dx is backwards compatible. The crazy thing is that dx9 only mentions directdraw within the directshow category whereas before it was in directx graphics.
quote:Original post by obi-wan shinobi
Question:

If I have dx9 installed on my system, can I still use directdraw in the same way as is mentioned in the dx7 documentation?


Yes.
Only thing you can''t do is to mix, for example, DirectDraw7 with Direct3D9, or DirectInput7 with DirectInput9.
With each DX category, you need to stick to a specific version.

-Nik

Niko Suni

This topic is closed to new replies.

Advertisement