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
Drawing conditional lines Santeri Piippo400May 08, 2013 12:24PM
Re: Drawing conditional lines Travis Cobbs194May 08, 2013 01:46PM
Re: Drawing conditional lines Tim Gould165May 08, 2013 02:20PM
Re: Drawing conditional lines Travis Cobbs197May 08, 2013 03:32PM
Re: Drawing conditional lines Santeri Piippo196May 08, 2013 03:41PM
Re: Drawing conditional lines Travis Cobbs184May 08, 2013 04:10PM
Re: Drawing conditional lines Santeri Piippo187May 08, 2013 03:03PM
Re: Drawing conditional lines Alex Taylor200May 10, 2013 09:00AM
Re: Drawing conditional lines Roland Melkert194May 10, 2013 12:13PM
Re: Drawing conditional lines Santeri Piippo190May 10, 2013 12:27PM
Re: Drawing conditional lines Roland Melkert260May 10, 2013 01:50PM



Sorry, only registered users may post in this forum.

Click here to login