NO

Author Topic: DirectDraw Voxel Engine  (Read 10380 times)

Athlor

  • Guest
DirectDraw Voxel Engine
« on: April 13, 2005, 11:23:01 AM »
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

  • Guest
DirectDraw Voxel Engine
« Reply #1 on: April 13, 2005, 11:33:13 AM »
Here is an alternative Heightmap and Colormap for the DD Voxel Engine.

drakoh

  • Guest
DirectDraw Voxel Engine
« Reply #2 on: April 13, 2005, 09:17:03 PM »
hey thx for your work ! I guess a little screenie could bring more people to be interested about it !

JohnF

  • Guest
DirectDraw Voxel Engine
« Reply #3 on: April 14, 2005, 07:46:24 AM »
It doesn't work properly on two machines I have. See image, any ideas why?

John


Athlor

  • Guest
DirectDraw Voxel Engine
« Reply #4 on: April 14, 2005, 01:54:40 PM »
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:
Code: [Select]

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

to:
Code: [Select]

  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.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
DirectDraw Voxel Engine
« Reply #5 on: April 14, 2005, 02:03:39 PM »
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

  • Guest
DirectDraw Voxel Engine
« Reply #6 on: April 14, 2005, 02:07:14 PM »
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

  • Guest
DirectDraw Voxel Engine
« Reply #7 on: April 15, 2005, 05:48:17 AM »
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

  • Guest
DirectDraw Voxel Engine
« Reply #8 on: April 15, 2005, 01:55:53 PM »
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

  • Guest
DirectDraw Voxel Engine
« Reply #9 on: April 15, 2005, 02:50:04 PM »
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

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
DirectDraw Voxel Engine
« Reply #10 on: April 15, 2005, 03:27:01 PM »
Yeah, no problems. I just don't know enough about DirectX to fix it myself...

Pelle
/Pelle

Ngan Lo

  • Guest
DirectDraw Voxel Engine
« Reply #11 on: April 16, 2005, 06:55:29 AM »
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: