hi all,
I want to use opengl display list in Drawable::drawImplementation ,like
this:
void ShapeDrawableEx::drawImplementation(osg::RenderInfo& renderInfo) const
{
if (globj==0) //ShapeDrawableEx:: mutable GLuint globj;
{
makeCallList();
}
glCallList( globj );
}
void ShapeDrawableEx::makeCallList() const
{
globj=glGenLists(1);
if(globj!=0)
{
glNewList(globj,GL_COMPILE);
......
glEndList();
}
}
If the drawImplementation is first time called,it works well and I can see the
drawing.
But if I change the Drawable's color,that's to say the drawImplementation is
called again,nothing is drawn.
I know that the drawImplementation is called between glNewList and glEndList
,so it's a hierarchical display list.But it doesn't work well.
Why?
thanks
forest37
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org