Hi Mukund,
Well, i tried using the Visual Studio debugger to inspect the matrix values
after retrieving them into an osg::Matrix variable. But that didn't help much.
No, I said do a getProjectionMatrixAsFrustum() and inspect the result.
For example:
double left, right, top, bottom, zNear, zFar;
viewer.getCamera()->getProjectionMatrixAsFrustum(left, right, bottom,
top, zNear, zFar);
osg::notify(osg::ALWAYS) << "Frustum is " << left << "," << right << ","
<< bottom << "," << top << "," << zNear << "," << zFar << std::endl;
That would have told you that the near and far values had changed from
what you had set them to. Getting the matrix is not much help, because
the calculations involved in making a projection matrix from those
recognizable values make the matrix values themselves hard to
interpret... See this site for example:
http://www.songho.ca/opengl/gl_projectionmatrix.html
And again, you could have found this with a simple google search.
Could you kindly give some references on these basic issues involved? The only
material i have now is the web and the OSG QuickStartGuide.
Oh come on... Check the OSG website, you'll have a wealth of links to
read. In the documentation section there are tutorials, in the community
section there are links to the mailing list archives, and you can search
the forum too... Show a little initiative, we won't be there to give you
all the answers all the time!
PS: Is there a glDrawPixels() equivalent in OSG?
Do some searching, you'll find out it's extremely slow. If you still
want to use it, search for drawable drawImplementation or drawCallback
(hint: OSG website, Documentation, Reference documentation, Classes,
look for osg::Drawable), in which you can use plain OpenGL code.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org