Hi Mark,

I've read your email but can't really work out what you are after, and
what part you need help with.  I suspects others in the community will
be in a similar position so will find it difficult knowing what to
suggest.

Are you wanting to render to texture two separate textures?  If so
this just requires two cameras?

If you want to learn how to do shaders then the best place is to get
the Organge book - OpenGL Shading Language, or head online for various
toturials on GLSL.  The OSG also has example shaders and examples to
review.

Robert.

On Wed, Dec 16, 2009 at 7:47 PM, Mark Jones <[email protected]> wrote:
> I've generated 2 textures, (started using osgprerender) and I can get those 
> two textures and blend them together (although not using a shader), just a 
> textenv:
>
>
> Code:
>
> osg::StateSet* pTextureState= new osg::StateSet;
> osg::TexEnv *texenv = new osg::TexEnv(osg::TexEnv::ADD);
>
> pTextureState->setTextureAttributeAndModes(0, 
> pTextureUnCulled,osg::StateAttribute::ON);
> pTextureState->setTextureAttributeAndModes(0, texenv, 
> osg::StateAttribute::ON);
> pTextureState->setTextureAttributeAndModes(1, pTextureCulled, 
> osg::StateAttribute::ON);
> pTextureState->setTextureAttributeAndModes(1, new osg::TexEnv(*texenv) , 
> osg::StateAttribute::ON);
>
>
>
>
> However I'm not sure how to get past the 2D look that the flag has.
>
> I'm trying to render the 2 textures and then blend them onto a polygon  
> (similar to the flag in the example), but what I end up with is a flat/thin 
> image that the mouse can change the coordinate view of.  Very similar to the 
> flag in the example program.
>
> What I really wanted to have was a 3d model that had some pieces that came 
> and went, revealing the interior of the object like a Star Trek transport in 
> use..... (ok, that analogy is not quite as perfect as I would like it to be). 
>  So as you move about the model, you still see a 3D shape, but its 
> translucency of some sides varies.
>
> How do I?
>   Generate two textures, then use a shader to combine the two images.
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=21592#21592
>
>
>
>
>
> _______________________________________________
> 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

Reply via email to