DirectDraw Voxel Engine

Started by Athlor, April 13, 2005, 11:23:01 AM

Previous topic - Next topic

Athlor

Yet another conversion, I upgraded it to use DirectDraw7 as well. It starts off in a demo mode where it flys across the landscape.

Athlor

Here is an alternative Heightmap and Colormap for the DD Voxel Engine.

drakoh

hey thx for your work ! I guess a little screenie could bring more people to be interested about it !

JohnF

It doesn't work properly on two machines I have. See image, any ideas why?

John


Athlor

Do you have directdraw refresh rate changed from the standard 60hz?
You might try recompiling it with a different resolution, like 320x240.
Another thing you might try is forcing a 60 hz refresh rate by changing a parameter in line 245-246 from:

 if ((ddrval=IDirectDraw7_SetDisplayMode(DD,SCREEN_WIDTH,SCREEN_HEIGHT,
                                                      SCREEN_BPP,0,0))!=DD_OK)

to:

 if ((ddrval=IDirectDraw7_SetDisplayMode(DD,SCREEN_WIDTH,SCREEN_HEIGHT,
                                                      SCREEN_BPP,60,0))!=DD_OK)

As it is it assumes the driver default. It works fine with with my machines. I'm quite puzzled.

Pelle

I got the same problem as John, on my newer development machine, but it works on my older test machine.

I tried your suggestions, but no difference here at least...

Pelle
/Pelle

JohnF

Forcing the refresh rate did not help just like Pelle reported. It's strange because no other DrirectDraw app has ever caused a problem.

John

Ngan Lo

yes, JohnF is right, i having the same problem too.

i havent touch DirectDraw for couple years, since i moved to D3D, i think it's about the memory addressing, the memory pitch (after Locking) seens not correct, b'cuz it may not work on other video cards.  :(

just a guess, hope this help.  :oops:

Athlor

Initially it looked like a refresh problem to me. But now, I think Ngan Lo is right. I'm going to try to address the, ah, memory address problem. I'm sorry to disappoint you but I did only have older machines to test it on.

JohnF

Quote from: "Athlor"Initially it looked like a refresh problem to me. But now, I think Ngan Lo is right. I'm going to try to address the, ah, memory address problem. I'm sorry to disappoint you but I did only have older machines to test it on.

No worries, just make sure you fix it, or else! javascript:emoticon(':wink:')
Wink

John

Pelle

Yeah, no problems. I just don't know enough about DirectX to fix it myself...

Pelle
/Pelle

Ngan Lo

Hi, Athlor, i just remember the Locking surface rules, u have to use the pitch size (ddsd.lPitch, an offset size of screen memory), b'cuz DDraw is not giving u the exact screen-width when u initial primary/back buffer (i mean different video cards).  :shock:

but i really forgot where to use the pitch size after Locking, sorry...  :oops: