wwwanghao wrote:
> I use the Render to texture method to get a float image, then I need to 
> process the image to make the data is in the range of 0-255


I'm not sure I understand the why, but anyway -
How did you customize the image you render to?

That's likely in the vicinity of 

Code:
pCam->setRenderTargetImplementation(/**/); 
/*and*/
pCam->attach(/**/); 



calls.

 

wwwanghao wrote:
> after that I want to display the image

You need a geometry to display it onto.
You attach st coordinates to tha tgeometry via a texCoordArray.

What comes now on how deeply you interact with the gl.
Pure OSG is that you add the texture to the geometry's geode's stateSet.
For  custom shaders you include an isampler2D uniform (with your 0-255 image) 
in the glsl source and set that uniform by using a osg::Uniform.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=60106#60106





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to