hello,
things changed a lot in the way to handle the draw message since last time i look at this objects. i need a bit of help in order to understand the bug in the drawing style message. (in this 2 objects, the draw messages did not do anything)
trying to find where the problem does come from, I add a post("draw type GEMshape = %i", m_drawType); at the end of the typeMess fonction in GemShape.cpp : this post the correct number when a draw message is send to the primitive.
adding : post("draw type %i", m_drawType); at the beginning of the curve3d render function did not give the same result : it always print the same number.
i don't really understand why this 2 post did not post the same value.
did anyone have any pointer that could help debugging?
thanks Cyrille
On 03/25/12 14:44, Cyrille Henry wrote:
hello,
i don't really understand why this 2 post did not post the same value.
did anyone have any pointer that could help debugging?
you are experiencing the joys of inheritance in oop languages: m_drawType is a member variable of GemShape. it will get updated whenever you send a "draw" message to a GemShape object (and is referred to in GemShape.cpp)
now, in (curve|surface)3d.h you declare _another_ variable "m_drawType", which will get referenced whenever you call it in the curve3d class.
i pushed a fix for the problem to the "master" branch.
fgamdsr IOhannes
ok, thanks for the fix and the explanation. cheers Cyrille
Le 25/03/2012 22:00, IOhannes m zmölnig a écrit :
On 03/25/12 14:44, Cyrille Henry wrote:
hello,
i don't really understand why this 2 post did not post the same value.
did anyone have any pointer that could help debugging?
you are experiencing the joys of inheritance in oop languages: m_drawType is a member variable of GemShape. it will get updated whenever you send a "draw" message to a GemShape object (and is referred to in GemShape.cpp)
now, in (curve|surface)3d.h you declare _another_ variable "m_drawType", which will get referenced whenever you call it in the curve3d class.
i pushed a fix for the problem to the "master" branch.
fgamdsr IOhannes
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev