[osg-users] Problems when rendering to a FBO texture and using that as a texture.

Alberto Nortes no3productionz at gmail.com
Mon Oct 8 05:03:27 PDT 2007


We have migrated all the code to the new osgViewer and everything is working
marvelously, but:
In OSG-2.2, with an Nvidia 7800 GT, I create an FBO to render the scene to a
texture, this works correctly, but later if I want to use that texture as an
input I get the following error:

PixelBufferWin32::wglBindTexImageARB(), failed

This used to work while working with osgProducer, but right now I dont know
what can be wrong. Here is some code:

//Render the current scene to a texture.

camera->attach(osg::CameraNode::COLOR_BUFFER, _texture_fbo);


//Then in another part of the code I do:
osg::Texture2D* _imagen_fbo = getTextureFbo();
_imagen_fbo,osg::StateAttribute::ON); //This last line provokes the warning.

I belive I am doing something really really wrong like accesing the texture
inside the same camera that renders it each frame... Please any comment
would be very helpful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071008/4b215105/attachment-0002.htm>

More information about the osg-users mailing list