Hi JacaYang,

You don't say what the problem you are seeing is. In general you are
going the direction that should work, but there is too little
information about how you assinging your callback or what the problems
you are seeing are.

In general I'd say that integrating OpenGL code can be a bit awkward
because both OSG OpenGL code and 3rd party OpenGL code change OpenGL
state so they can influence each other.

Robert.

On 28 February 2014 11:35, JacaYang <jacay...@sina.com> wrote:
> Hi,
>
>    I want to integrate openGL code inside OSG except for using osg::Drawable 
> callback method.I have tried to use get GraphiContex and then call openGL 
> code.but it not work at all.below is my code .
> glPushAttrib(GL_ALL_ATTRIB_BITS);
>                   glMatrixMode(GL_PROJECTION);
>                   glPushMatrix();
>                   glMatrixMode(GL_TEXTURE);
>                   glPushMatrix();
>                   glMatrixMode(GL_MODELVIEW);
>                   glPushMatrix();
>
>                   //drawing in your own openGL code
>
>                   glMatrixMode(GL_PROJECTION);
>                   glPopMatrix();
>                   glMatrixMode(GL_TEXTURE);
>                   glPopMatrix();
>                   glMatrixMode(GL_MODELVIEW);
>                   glPopMatrix();
>                   glPopAttrib();
>
>
> Thank you!
>
> Cheers,
> JacaYang
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=58399#58399
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to