Hi,

I'm trying to implement something similar to:

http://linuxtoosx.blogspot.com/2010/06/fishtank-vr-project-with-opencv-and_30.html

When I'm doing that using OpenGL only, I'm getting satisfactory results.
The code is exactly the same as the one suggested on the website,

Code:
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-0.5 + x, 0.5 + x, -0.5 + y, 0.5 + y, nearPlane - z, 100.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(x, y, z);



But when I try to achieve the same result in OSG, the output is not exactly the 
same, currently I'm using the following code:

Code:
osgViewer.getCamera()->setProjectionMatrixAsFrustum(-0.5 + x, 0.5 + x, -0.5 + 
y, 0.5 + y, nearPlane - z, 100.0);
osg::Matrixd cameraTrans;
cameraTrans.makeTranslate(x, y, z);
osgViewer.getCamera()->setViewMatrix(cameraTrans);




Is that equivalent to the OpenGL implementation? Or am I missing something? 


Thank you!

Cheers,
Chris[/url]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=45715#45715





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to