Hi Desiree,
I added some untested code. The size of the Grabforeground image is just
the size of the viewport. The whole render window needs to be visible.
Andreas
ViewportPtr vp = your viewport
TileCameraDecoratorPtr td = TileCameraDecorator::create();
beginEditCP(td);
td->setFullSize(width, height);
td->setDecoratee(vp->getCamera());
endEditCP(td);
beginEditCP(vp);
vp->setCamera(td);
endEditCP(vp);
GrabForegroundPtr gf = GrabForeground::create();
ImagePtr gi = Image::create();
beginEditCP(gf);
gf->setImage(gi);
endEditCP(gf);
beginEditCP(vp);
vp->getForegrounds().push_back(gf);
endEditCP(vp);
// calc xstep and ystep
...
// render the tiles
for(float y=0;y<1.0;y+=ystep)
{
int xpos = 0;
for(float x=0;x<1.0;x+=xstep)
{
for(int i=0;i<td;++i)
{
beginEditCP(td);
td->setSize(x, y, x+xstep, y+ystep);
endEditCP(td);
}
// render scene
win->updateGL();
// now just combine the image in gf into a big one.
...
}
}
Hi,
is there anybody who has working example code for rendering a scene on
an offscreen pixmap (or ImagePtr), which has a higher resolution than
the screen and the windows I am using... I guess the solution is the
PassiveWindow in conjunction with the Grabforeground ? I already tried
something like this some time ago, but I didn´t get it working perfectly.
One problem was, that the scene was sometimes rendered without textures.
Another problem is, that (at least in the "not offscreen variant") the
size of the rendered image (using Grabforeground) seems to depend from
the Window I am using, but I could not figure out, how the sizes are
calculated from the window sizes..
So I want to try a brand new start .... I am looking for an example
which works with Qt and without Glut....
Is there anybody who can help me?
Thanks
Desiree
--
Andreas Zieringer [EMAIL PROTECTED]
Fraunhofer IGD - A4 phone +49 (0)6151 155 289
Fraunhoferstr. 5 fax +49 (0)6151 155 196
D-64283 Darmstadt www.igd.fhg.de/www/igd-a4
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users