Terry,

Yep, the CameraNode has the same width and height.

Strange, switching it all to GL_UNSIGNED_BYTE fixes the problem.  I bet
the size for the glReadPixels or packing or something isn't set
correctly when it is float.

-B

---
RSC
BDC

> -----Original Message-----
> From: Terry Welsh [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 11, 2006 4:28 PM
> To: Brad Colbert
> Cc: osg users
> Subject: Re: [osg-users] Render to Image still clamping
> 
> I assume you set up your CameraNode with the same width and height as
> your _capImage?  Sorry, I have to ask ;)
> 
> Other than that I can't think of much that could be the problem.
> Could it be some weird byte alignment problem?  I think I'd first try
> GL_UNSIGNED_BYTE instead of GL_FLOAT and something less ARBy for the
> internal texture format.
> - Terry
> 
> On 9/11/06, Brad Colbert <[EMAIL PROTECTED]> wrote:
> > Terry,
> >
> > Sorry, I covered way too many topics.  Let's step back a second.
> >
> > The 1/4 issue:
> >
> > It appears that when I set up a CameraNode with:
> >
> >
setRenderTargetImplementation(osg::CameraNode::FRAME_BUFFER_OBJECT);
> >
> > and
> >
> >   attach(osg::CameraNode::COLOR_BUFFER, _capImage.get());
> >
> > I get only 1/4 of the rendered area.  I'm not sure why.  The image
is
> > set up thusly:
> >
> >   _capImage = new osg::Image;
> >   if (!_capImage.get())
> >     return false;
> >
> >   _capImage->allocateImage(width, height, 1, GL_RGB, GL_FLOAT);
> >   _capImage->setInternalTextureFormat(GL_RGB16F_ARB);
> >
> > I had this same problem with OSG 1.0 (but didn't realize it until
> > later).
> >
> > Any ideas on were to look?  Could it be that glReadPixels isn't
reading
> > enough?
> >
> > -B
> >
> > Let's talk about the viewport issue in another thread.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to