Re: [osg-users] Show a model in the front of the texture background of a viewer

2011-03-07 Thread Tang Yu
Hi, Sergey and JP, Thank you for your helps. They are very very useful to me. I also read the osgART codes, then I rewrote my codes, they are below: Code: -(osg::Node *) create2DBGTexture { // 图像材质 unsigned int w = SCREEN_WIDTH; unsigned int h = SCREEN_HEIGHT;

Re: [osg-users] Show a model in the front of the texture background of a viewer

2011-03-06 Thread J.P. Delport
Hi, one way is shown in the example here: http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/62758/focus=62810 cheers jp On 05/03/11 05:15, Tang Yu wrote: Hi, I want to put a IVE Model in the viewer which renders a Texture2D Image as the viewer's whole background. Now, I put the

Re: [osg-users] Show a model in the front of the texture background of a viewer

2011-03-05 Thread Sergey Polischuk
Hi, Tang There are different way to do this, i prefer to use one camera. For background: put quad with background texture into ortho projection and identity transform with reference frame set to ABSOLUTE_RF, or draw it with shaders ignoring view and projection matrices with quad vertices coords

[osg-users] Show a model in the front of the texture background of a viewer

2011-03-04 Thread Tang Yu
Hi, I want to put a IVE Model in the viewer which renders a Texture2D Image as the viewer's whole background. Now, I put the texture image into a camera and rendered as the background successfully. The code is below: Code: -(osg::Node *) create2DBGTexture { unsigned int w = 480; unsi