Hi Bo,

The OSG rendering traversal will set the projection and view matrices
itself during each new frame so you'll need to get the
projection,modelview and viewport settings from Maya/OpenGL and then
assign these to the OSG to keep everything in sync.  As Rui mentioned
the osgviewerGLUT example will illustrate a barebones way to integrate
the OSG, us the osgViewer::GraphicsWindowEmbedded functionality, also
see the osgviewerSDL example as well as it does something similar.

Robert.

On 24 May 2012 06:50, Bo Zhou <[email protected]> wrote:
> Hi,
>
> I'm trying to integrate osg into a MPxLocatorNode in Maya, draw an osg scene 
> by MPxLocatorNode::draw method.
>
> According the Maya's document, we just need to call glVertex3f or 
> glDrawArrays API and do not need to setup any modelview, projection matrix, 
> or viewport to OpenGL, just draw geometry data.
>
> So how could I finish this task ? Could anybody help me ? Thanks !
>
> Thank you!
>
> Cheers,
> Bo
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=47830#47830
>
>
>
>
>
> _______________________________________________
> 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

Reply via email to