Marco Jez schrieb:
Hi Andreas,
Before I dig into vector-math myself my question is: Has anyone done
something like this before? Or is there even a simpler solution,
using glViewport, for instance? (I were not successfull using
glViewport for this).
Have a look here:
http://openscenegraph.org/archiver/osg-users/2006-October/0756.html
Cheers,
Marco
_______________________________________________
Hi again,
I tried your code. As I use a sceneview myself, only slight changes were
necessary, but alas, it doesn´t work.
As I do not (yet) fully understand your code, here is what I changed:
//Viewport* vp = viewports_.front().get();
osg::ref_ptr<osgUtil::SceneView> sv = sceneView.get();
osg::ref_ptr<osg::Viewport> vp = sceneView->getViewport();
I have just one viewport and one sceneView, so I use just that.
Here you use a Member-function "getWidth", which I don´t know what it is:
int vpwidth = vp->width()*vp->width(); // /* getWidth()*/;
int vpheight = vp->height()*vp->height();// /** getHeight()*/;
So I replaced it with the viewport-width again, but this is just a guess.
There is nothing else I changed, and in the pictures I get (which have
the right resolution), there is only one rectangle which is colored, the
rest is black.
Maybe you can explain the getWidth() function for me and if I am right
in just using my sceneView and viewport.
Regards,
Andreas
_______________________________________________
osg-users mailing list
[EMAIL PROTECTED]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/