2
Vote

removing ScreenSpaceLines3D from viewport

description

if you remove a ScreenSpaceLines3D from the viewport, then the app crashes because the OnRender event is not removed, and the visual parent is missing then.
I fixed this for me locally (see attached file)
This is maybe not the best solution, but it works.

file attachments

comments

Guille29 wrote Oct 6, 2011 at 5:27 PM

Hi, thanks for posting your source code. I've been searching everywhere, and it seems you are the only one who has done it. Thanks!
I pasted your code in mine, compiled the .dll and it works! I hope there are no memory leaks! I have read somewhere about memory leak problems associated to screenspacelines3d. Do you know something about that?

osre wrote Oct 7, 2011 at 7:53 AM

Hi, so far I did not notice any memory leaks. But the part of my program where I use the ScreenSpaceLines3D is used not verry often.

Guille29 wrote Oct 7, 2011 at 8:29 AM

I have tested it yesterday and seems to work fine. I use this class quite often, because in my project the user should be able to design the geometry of a 3D object by changing the mess when feeling like. I'm happy I can finally get rid of those lines I don't want to display anymore in a "decent way". I hope no co-lateral problems will appear! :) Thanks again for your help!