Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Drawing 3D Lines

Author
Message
lesPaul456
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location:
Posted: 1st Jan 2010 17:00
I'm currently trying to get the Newton Physics Engine to work with my game. I'd like to debug the collision objects.

I'm not sure how to draw 3d lines, and I didn't see any commands for this.

Any ideas? Thanks!
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 1st Jan 2010 18:48
dbLine()? three times?

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 2nd Jan 2010 02:04
Wow, Lilith.

DirectX has some stuff for this. Look up the line drawing interface and how to get the DarkGDK rendering device.

lesPaul456
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location:
Posted: 2nd Jan 2010 03:26 Edited at: 2nd Jan 2010 03:27
Ok, I know I can get the device using dbGetDirect3DDevice(). However, I really not a C++ programmer . I know I can draw lines using DrawPrimitive(), but I really have no idea how. I looked up the line drawing interface, but all I found was LPD3DXLINE. I'm not sure how to use it to draw 3d lines.

Any ideas?
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 2nd Jan 2010 03:31 Edited at: 2nd Jan 2010 03:32
http://msdn.microsoft.com/en-us/library/ee421257(VS.85).aspx

There's your starting point.

Setting it up:


Then in your loop, you just do


Don't forget to

when you're done!

Freedom Fighters
15
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 2nd Jan 2010 03:40
did you even search the forums?

heres a good one for 3d lines

http://forum.thegamecreators.com/?m=forum_view&t=141238&b=22

Problem Solution That Never Fails: "Build A Bridge And Get Over It"
lesPaul456
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location:
Posted: 2nd Jan 2010 04:31
Thanks everyone, I finally got it working.
entomophobiac
22
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 4th Apr 2010 21:52
How did you get it working? I'm somewhat stuck on this. At least as far as "finding a quick solution" goes...
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 4th Apr 2010 22:09
Here is how I do it:



But be aware that this is very inefficient (I'm re-creating and deleting the LPD3DXLINE each call!).
Maybe you can figure out how to improve it on your own.
At least this is good enough (for me) to draw a quick 3D line for debugging purposes...

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
entomophobiac
22
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 5th Apr 2010 00:17
Thanks a lot!

I need it for pretty much the same purpose, so I think it'll be perfect for now.

Login to post a reply

Server time is: 2024-11-20 01:48:01
Your offset time is: 2024-11-20 01:48:01