To quote one of my favorite cartoon characters: Doh! I set a bool parameter to the wrong value in a function call to one of my utility functions. This function was the one responsible for creating the texture and the wrong value meant that it created a Texture2D instead of a TextureRectangle.
/Andreas Lindmark > ----- Original Message ----- > From: [EMAIL PROTECTED] > To: "OpenSceneGraph Users" <[email protected]> > Subject: Re: [osg-users] Floating point texture problem > Date: Thu, 29 Nov 2007 19:11:57 +0800 > > > I've got rid of the "invalid enumeration after RenderBin::Draw" > error by setting the source format > texture->setSourceFormat(GL_LUMINANCE); > > The other error I get still remains: > "invalid operation after RenderBin::Draw" > > > > ----- Original Message ----- > > From: [EMAIL PROTECTED] > > To: "OpenSceneGraph Users" <[email protected]> > > Subject: [osg-users] Floating point texture problem > > Date: Wed, 28 Nov 2007 21:58:20 +0800 > > > > > > Hi, > > > > I've got a project were I want to render a floating point texture. > > Currently im using a texture rectangle with GL_RGB as a render > > target which is attached to a prerender camera. This works fine > > but now I need to render to a floating point texture and I have > > tried GL_FLOAT_R32_NV(which is the one I want), and some of the > > ARB-variants but I guess im missing something because it does not > > work. The shader im using is simply trying to output pixels as > > red gl_FragColor.r = 1; but nothing seems to get rendered, the > > texture just stays black . > > For the first frame that is rendered i get the following detected > > OpenGL error: "invalid enumeration after RenderBin::Draw" and > > subsequent rendering calls gives the message: "invalid operation > > after RenderBin::Draw" > > > > I set the following texture 'attributes' > > texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP); > > texture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP); > > texture->setFilter(osg::Texture::MIN_FILTER, osg::Texture::NEAREST); > > texture->setFilter(osg::Texture::MAG_FILTER, osg::Texture::NEAREST); > > texture->setInternalFormat(GL_FLOAT_R32_NV); > > texture->setShadowComparison(false); > > > > The texture is attached to the camera as osg::Camera::COLOR_BUFFER > > RenderTargetImplementation is set to FRAME_BUFFER_OBJECT > > > > Im using a Quadro fx 700 with support for the GL_NV_float_buffer. > > > > Any tips or pointers are highly appreciated! > > > > /Andreas Lindmark > > > > > > = > Mercedes Homes- Houston real estate > Mercedes Homes builds homes and communities in the Houston area. > http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=210e592638be3f50f80a3696fa96bca0 > > > -- > Powered by Outblaze > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > = Offshore Web Design and Development Lower price, top quality. We seek new partners who outsource to us. http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=c12deda62885698115854e2ed1b9dea7 -- Powered by Outblaze _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

