Hi,
 
I want to render to a floating point buffer, and I set things up like this:
 
tex->setInternalFormat( GL_LUMINANCE16F_ARB );
tex->setSourceFormat( GL_RED );
tex->setSourceType( GL_FLOAT );
 
camera->setRenderTargetImplementation( osg::Camera::FRAME_BUFFER_OBJECT );
camera->attach( osg::Camera::BufferComponent( osg::Camera::COLOR_BUFFER0 ), tex 
);
camera->setDrawBuffer( GL_COLOR_ATTACHMENT0_EXT );
 
My fragment-shader that write to the surface output the value this way:
gl_FragData[0].r = 1.0;
 
Another fragment-shader reads the surface this way:
value = texture2DRect( id, gl_FragCoord.xy ).r;
 
I get the following output when I try to run my app:
"Warning: RenderStage::runCameraSetUp(state&) Pbuffer does not support multiple 
color outputs."
 
My app runs, but nothing is written to the texture.
 
Is it possible to set up a surface that holds one channel (GL_RED) which is an 
unsigned int of 32 bit resolution? I'd rather use that than a float :-)
 
Viggo
_________________________________________________________________
Lei av å vente på svar? Si det direkte med Windows Live Messenger.
http://get.live.com/nb-no/messenger/overview
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to