Welcome! Log In Create A New Profile

Advanced
Re: Drawing conditional lines
avatarMay 08, 2013 04:10PM
If LDForge only deals with parts, then calculating the conditionals every frame on the CPU isn't ever going cause a performance problem (even if you don't bother to try to optimize with multi-threading). Even with the 48x48 baseplate, LDView gets 480FPS with conditional lines enabled on my computer (and around 2000 with them disabled).

Mind you, calculating which ones to draw is a pain. However, because of this, the code inside LDView that calculates whether a particular conditional should be drawn is well-commented. You're welcome to copy it if you want. Take a look at TREShapeGroup::shouldDrawConditional() here:

http://ldview.cvs.sourceforge.net/viewvc/ldview/LDView/TRE/TREShapeGroup.cpp?view=markup

Note: I think Don Heyse gave me the initial code that the LDView code is based on.
SubjectAuthorViewsPosted
Sticky Drawing conditional lines (13 Posts) Santeri Piippo485May 08, 2013 12:24PM
Sticky Re: Drawing conditional lines (0 Posts) Travis Cobbs227May 08, 2013 01:46PM
Sticky Re: Drawing conditional lines (0 Posts) Tim Gould193May 08, 2013 02:20PM
Sticky Re: Drawing conditional lines (0 Posts) Travis Cobbs225May 08, 2013 03:32PM
Sticky Re: Drawing conditional lines (0 Posts) Santeri Piippo222May 08, 2013 03:41PM
Sticky Re: Drawing conditional lines (0 Posts) Travis Cobbs210May 08, 2013 04:10PM
Sticky Re: Drawing conditional lines (0 Posts) Santeri Piippo212May 08, 2013 03:03PM
Sticky Re: Drawing conditional lines (0 Posts) Alex Taylor231May 10, 2013 09:00AM
Sticky Re: Drawing conditional lines (0 Posts) Roland Melkert223May 10, 2013 12:13PM
Sticky Re: Drawing conditional lines (0 Posts) Santeri Piippo221May 10, 2013 12:27PM
Sticky Re: Drawing conditional lines (0 Posts) Roland Melkert287May 10, 2013 01:50PM
Sticky Re: Drawing conditional lines (0 Posts) Steffen71November 27, 2014 05:33PM
Sticky Re: let's make this thread sticky (0 Posts) Tim Gould49November 27, 2014 08:08PM



Sorry, only registered users may post in this forum.

Click here to login