Hello Johannes,
Schaefer Johannes wrote:
> after i have manipulate the geometry of a object i using the functions
> calcFaceNormals and calcVertexNormals to recalculate the normals of this
> object. Unfortunately my programm crashed with a segmentation fault after a
> short time. if i comment this functions everything is fine (but the object
> looks ugly). I can force this problem when i move the mouse over the OSG
> widget and when i moving the mouse sometimes there are image interference for
> few seconds. ( http://img14.imageshack.us/img14/7654/wrongnormals.png ) It
> looks like a wrong calculation of the normals.
you should only need one of calcFaceNormals/calcVertexNormals depending
on what type of normals you want (face normals are more suited for
objects with sharp corners, since the emphasize the edges between
polygons, while vertex normals are better for smooth surfaces).
Looking at the picture I'm wondering if you not only have a problem with
the normals, but the winding of the polygons of the object? Since some
of them disappear it seems that some polygons have clockwise winding,
while others are counter-clockwise (OpenGL's default for the front face).
> The appliaction using QT3 with the OpenSG-Widget. My platform is Ubuntu 8.04
> with OpenSG 1.8.0. I have try serveral computers with different graphic
> cards. Always the same behavior.
> Have anybody an idea how i can fix this problem?
Can you run your program under gdb (or other debugger) and when it
crashes get a backtrace of the crash? That might help us get a better
idea of where and perhaps why it crashes.
Cheers,
Carsten
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users