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 / Alternative to dbLine?

Author
Message
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 10th May 2010 05:29
I need to draw lines in my program, but dbLine is soooooo sloooooooooooow... what can I use as an alternative?

I'm wanting to draw lines for mini particles. They're not going to be big enough to constitute using an image, and they'll be variable in length, hence why I want to draw a line for them.

While we're on the topic, does anyone know why DGDK's 2D commands are so slow? Drawing 40 lines (each being just a few pixels long) per frame with NO OTHER PROCESSING brings the framerate down to roughly 14 fps! I have a monster computer, this should not be happening!


The one and only,


Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 10th May 2010 08:51 Edited at: 10th May 2010 08:53
EDIT: mistake, disregard the post.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 10th May 2010 12:03
Still open to suggestions for alternatives.


The one and only,


Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 10th May 2010 14:51
Check this out, let us know if it works and how much faster it is.

cloggys D3D functions

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 11th May 2010 03:37 Edited at: 11th May 2010 03:38
I remember using that for 3D lines in DBP, didn't know he made one for DGDK.

I installed it, but got a linker error saying it couldn't find libcp.lib. Did a search around and found a few suggestions to just add the library to the ignore list since it had been depricated, but doing that only caused an access violation error at runtime when a particle attempted to draw (using the d3dLine function)

Any ideas?


I've gotten a fairly nice looking particle by pasting a stretched image, but I bet I could get even smoother looking particles (and higher framerate) using the gradient effects of the D3DFunc library. Pasting images (for whatever reason) runs faster than drawing a line. Why is that? Isn't a line easier to draw and less processor intensive than pasting an image?


The one and only,


Bran flakes91093
15
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 11th May 2010 04:18 Edited at: 11th May 2010 04:19
Quote: "Any ideas?"


Make sure you ignore all of these libraries:
libcmtd, msvcrt, atls, msvcprt, libcp

Then make sure you have your code generation set to /MT

Then it should work.

EDIT:
Actually, make sure you call d3dInit() before you do anything.

"A computer once beat me at chess, but it was no match for me at kick boxing."
Emo Philips
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 11th May 2010 04:32
Quote: "Actually, make sure you call d3dInit() before you do anything."


Whoops.

Heh, that did it. Thanks! Feel a lil' embarrassed now.


The one and only,


Login to post a reply

Server time is: 2024-07-07 02:23:38
Your offset time is: 2024-07-07 02:23:38