Hi Werner,

You appear to be included reference to calls and classes that aren't
in the OpenSceneGraph, are you using a 3rd party library that is
providing these?

At this point I can't see a way of helping you as there bit doing the
set up are unknown to us.

Robert.
On Wed, 27 Jun 2018 at 13:53, Werner Modenbach
<werner.modenb...@texion.eu> wrote:
>
> Hi all,
>
> I found a strange behavior of a GBufferCamera. I want to get the color 
> channel in one image and the depth channel in another image.When
> What I do:
>
>         if (!renderImage.valid()) {
>
>             renderImage = new osg::Image;
>
>             renderImage->allocateImage(width, height, 1, GL_RGBA, 
> GL_UNSIGNED_BYTE, 1);
>
>             renderImage->setInternalTextureFormat(GL_RGBA8);
>
>         }
>
>         if (includeDepth && !depthImage.valid()) {
>
>             depthImage = new osg::Image;
>
>             depthImage->allocateImage(width, height, 1, GL_DEPTH_COMPONENT, 
> GL_FLOAT, 1);
>
>             renderImage->setInternalTextureFormat(GL_LUMINANCE32F_ARB);
>
>         }
>
>         if (!includeDepth)
>             renderCamera = 
> view->createRTTCameraImage(osg::Camera::COLOR_BUFFER, 0, renderImage.get(), 
> true);
>         else
>             renderCamera = 
> view->createRTTCameraGBufferImage(osg::Camera::COLOR_BUFFER0, 
> renderImage.get(), osg::Camera::DEPTH_BUFFER, depthImage.get(),
>                                                             
> osg::Camera::COLOR_BUFFER1, 0, 0, true);
>
> The definition of createRTT...
>
>     osg::Camera *createRTTCameraGBufferImage(osg::Camera::BufferComponent 
> _bufferType1, osg::Image *_image1,
>                                         osg::Camera::BufferComponent 
> _bufferType2, osg::Image *_image2,
>
>                                         osg::Camera::BufferComponent 
> _bufferType3, osg::Image *_image3,
>
>                                         int _orderNumber, bool _isAbsolute, 
> bool _withScreenQuad = true);
>
>
> When rendering without depth, I get a correct color channel image.
> When rendering both, color and depth, the depth image is OK but the color 
> image seems having only the red color information.
> Are there any limitations in using 2 images?
>
> Has anybody else had such an effect already or can anybody give me a hint?
>
> Many thanks in advance
>
> - Werner -
>
> Many thanks in advance.
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to