Kai Xia wrote:
Hi,
I checked RenderStage::runCameraSetUp() source code, and found that
bufferAttachments only have Texture1D, Texture2D, Texture3D, TextureCubeMap,
TextureRetangle, but without TextureArray, and I don`t know weather OSG using
glFramebufferTextureLayer or glFramebufferTexture when bind TextureArray,
cubeMap and Texture3D, if using glFramebufferTexture, no layer rendering is
available. I will try Texture3D for layer rendering.
BTW,
shadowCamera->attach(osg::Camera::COLOR_BUFFER0, ta, 0, 0);
shadowCamera->attach(osg::Camera::COLOR_BUFFER1, ta, 0, 1);
shadowCamera->attach(osg::Camera::COLOR_BUFFER2, ta, 0, 2);
does not take effects, each color_buffer only accept the rastered fragments of primitive in first layer, the other 2 in geometry shader does not shown.
The attach() method in FrameBufferObject.cpp seems to have support for
Texture2D Arrays (and it calls glFrameBufferTextureLayer for them). I
don't know if this means that it's fully supported, but someone at least
tried to support them.
For cube maps and 3D textures, it calls glFramebufferTexture2D and
glFramebufferTexture3D, respectively.
It does look like texture arrays are missing in
RenderStage::runCameraSetUp, but I don't know enough about things there
to know whether or not this is a problem.
--"J"
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org