Hi All, I just started to write a class that can draw curves on a osg. I added a openglwrapper class so that in the beginning I will try to work with GLU. My class has two main member functions first one is
virtual void drawImplementation(osg::RenderInfo&) const which handles the draw step and outputs with direct opengl calls. and second one is void addControlPoint(GLfloat& x,GLfloat& y,GLfloat& z) which allowes the user to add more control points to the curve. And I attached a picker to call addControlPoints function when user double clicks on a plane, so that clicked coordinate becomes a new control point. Now the problem is: drawImplementation(osg::RenderInfo&) const is being called at the beginning of the program for once. But during the rendering time osg does not call that function ever again, even when I edit the control points array. I set Dynamic DataVariance for all geodes and drawables but It still calls drawImplementation once at the beginning. Any Idea how to solve this problem? I guess I need something to let my curve drawable being affected in Update traversal but I don't know how to do it. /emre On Dec 28, 2007 8:31 PM, Gerrick Bivins <[EMAIL PROTECTED]> wrote: > Hi Emre, > Our NURBS objects are defined by structures on disk(ie, read in a file that > contains the control points and knot vectors) > and then the object is rendered. The selection part of our interface allows > you to move those control points > around to modify the shape of the original surface. We don't have support > for redefining the > NURBS object such as control point addition/subtraction, knot > insertion/removal. > biv > > > > On Dec 27, 2007 3:18 PM, Emre Koc <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi Gerrick, > > > > > > > Previously in gl, we were able to just do selection by using > glRenderMode > > > when rendering the points > > > of the control mesh (another reason to use raw gl) and then processing > > > the "hits". > > > > So you have some code to render NURB curves at runtime with the > > defined points which are picked by mouse clicks, is this right? > > If so, thats the exact thing that I would like to do in osg for the time > being. > > And if your raw gl code does this, can you share the details on how you do > that? > > > > > > > > > > /emre > > > > _______________________________________________ > > osg-users mailing list > > [email protected] > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- Emre Koc Sabanci University Faculty of Engineering and Natural Sciences _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

