Carsten Neumann wrote:
> Hello Johannes,
>
> Schaefer Johannes wrote:
>> thank your for your help. I didn't kown that calcFaceNormals and
>> calcVertexNormals do the same (but in a different way). Using only one
>> function the programm doesn't crashs anymore. But the problem with the
>> incorrect visualisation is still alive. The problem is, when i move the
>> mouse over the QT-OpenSG-Widget the object flickers (
>> http://img14.imageshack.us/img14/7654/wrongnormals.png ). If i don't move
>> the mouse every thing is fine. I can't explain me the connection between
>> the mouse movement and the flickering (maybe caused by a wrong calculation
>> of the normals).
>
> hm, strange, offhand I don't have a good idea what might cause that, but
> perhaps we can narrow it down a little. Here are a few things you might want
> to check:
>
> - is double buffering enabled? - what happens if you replace your model with
> another one or just a sphere geometry? - does it happen if you only move the
> mouse or do you hold a button - does that move the model? - what happens in
> the "mouse move" callback (sorry don't the proper Qt name), does it cause
> redraws? - does it flicker if you have the model rotate around e.g. the
> y-axis (I'm wondering if the flicker is part of drawing the model and the
> mouse movement just causes redraws while when the mouse is away from the
> window simply no redraw happens and thus it does not flicker?)
Mouse movement and normals really are totally unrelated, so I can't see how one
would cause the other.
Flicker on mouse move sounds more like a redraw with no double buffering (or a
double swap?). Can you just put a printf in the draw routine and see if it's
called when you just move the mouse? And also make sure that you have a double
buffered widget?
Sideline: the normals in the picture looks pretty weird. They look like to you
tried to do face normals and then run the striper on the model. Face nromals
and
striping are not compatible, if you want face normals you can't use the striper.
Yours
Dirk
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users