Hello forum I am trying not to distort the model and i think i am doing as you have suggested. But the scene is blank. The changes i made inside the createDistortionSubgraph() are follows:
///////////////////////////////////////////////////INSIDE THE hud SCOPE 1. i m declaring the screen aligned drawing primitive to quad. 2. Define the texture corrdinates with the width and height. 3. Define the vertex corrdinates. The value inside the coordinates are (-1,0,-1),(1,0,-1),(1,0,1), and (-1,0,1) ///////////////////////////////////////////////////7 Any thing missing? Regards Sajjad On Mon, Aug 9, 2010 at 11:53 AM, Robert Osfield <[email protected]>wrote: > HI Alice, > > The osgdistortion example would probably be a good place to start, as > it renders the scene to texture using a slave render to texture > camera, then has another slave camera render a screen aligned geometry > using that texture. The only thing you'd need to change is the > osgdistortion example alters the tex coords to achieve the desired > distortion, in your case you could just use a single quad with > undistorted tex coords. > > One thing you absolutely don't want to be doing is reading the > contents of the frame buffer back into main memory though, this will > certainly kill performance - always use a FrameBufferObject (FBO) and > associated Texture to render to. The osgdistortion example sets up > the render to texture camera to use FBO by default. > > Robert. > > On Mon, Aug 9, 2010 at 1:40 AM, Alice Yin <[email protected]> wrote: > > Hi, everyone > > > > I am completely a starter of OSG. I just read a few tutorials about OSG. > But now, I need to implement my code in openGL to OSG in one week. > > > > The main idea is to render the scene twice. The first time I render it in > a low resolution, read back from the frame buffer, use the data I get from > the buffer to render the second time in normal resolution. Only the second > time, the user can see the result. A friend of mine suggest me to read the > prerender example, I am doing it, though very slowly. I just want to make > sure I am in the right way because the deadline is approaching. > > > > Thank you! > > > > Alice > > > > ------------------ > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=30631#30631 > > > > > > > > > > > > _______________________________________________ > > 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 >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

