Thanks a lot !!!!! It works :D Frederic Bouvier wrote: > I used > camera->setImplicitBufferAttachmentMask( > osg::Camera::IMPLICIT_COLOR_BUFFER_ATTACHMENT, > osg::Camera::IMPLICIT_COLOR_BUFFER_ATTACHMENT ); > > to avoid having a depth buffer attached. > > HTH > Regards, > -Fred > > > ----- "Julien Valentin" a écrit : > > > > Thank for your answer: > > I've manage to make it work in pure GL3 without osg and see that your > > tweak in osg is the right thing to do. > > However it always doesnt work.. > > here are the different GL call for fbo creation for 2 case: > > > > -working case (only one slice) > > cam->attach( osg::Camera::COLOR_BUFFER0,tex,0,0) > > > > Code: > > glGenRenderbuffersEXT(1, 048DEA40) > > | glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 1) > > | glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, > > GL_DEPTH_COMPONENT24_SGIX, 64, 64) > > | glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, > > GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 1) > > //render to only one slice > > | glFramebufferTexture3DEXT(GL_FRAMEBUFFER_EXT, > > GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_3D, 3, 0, 0) > > | glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) > > | glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 1) > > > > > > > > -the FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS case with > > cam->attach( > > osg::Camera::COLOR_BUFFER0,tex,0,osg::Camera::FACE_CONTROLLED_BY_GEOMETRY_SHADER) > > > > Code: > > > > | glGenRenderbuffersEXT(1, 0484EA40) > > | glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 1) > > | glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, > > GL_DEPTH_COMPONENT24_SGIX, 64, 64) > > | glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, > > GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 1) > > //render to all slice > > | glFramebufferTextureEXT(GL_FRAMEBUFFER_EXT, > > GL_COLOR_ATTACHMENT0_EXT, 3, 0) > > | glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) > > > > > > > > All seems right but error occurs on glCheckFramebufferStatusEXT.. > > > > > > Further, my working version (pure GL3) dont initialize RenderBuffer > > with GL_DEPTH_COMPONENT24_SGIX, but with GL_RGBA > > > > Could it be a problem with it? Strange because it dont bother the > > "only one slice" version... > > > > Could it be because I use CORE 330 shaders? > > > > Please help > > > > > > Frederic Bouvier wrote: > > > > > Hi Julien, > > > > > > It's me that submitted this change at > > > http://www.mail-archive.com//msg05568.html > > > > > > It's hard to tell what's going wrong without the full code of your > > > > > camera setup. > > > > > In http://www.opengl.org/registry/specs/ARB/geometry_shader4.txt > > > error 0x8da8 refers to FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB and > > > > > the > > > > > document has possible cause for this error. > > > > > > Regards, > > > -Fred > > > > > > > > > ----- "Julien Valentin" a écrit : > > > > > > > > > > > > > Hi, > > > > I'm trying to make efficient fluid simulation with osg > > > > I've just found this page : > > > > http://www.mail-archive.com//msg05568.html > > > > > > > > It look pretty great as my 1 camera per slice code is very CPU > > > > > > > > > time > > > > > > > > > consuming. > > > > > > > > I develop a geometry shader that change gl_layer value per > > > > > > > > > primitive. > > > > > > > > > It work so i change my texture my texture attachement to camera's > > > > > > > > > FBO > > > > > > > > > as follow: > > > > > > > > Code: > > > > > > > > for(int i=0;i<_depth;i++){ > > > > //one cam per slice > > > > _cameras[i]->attach( osg::Camera::COLOR_BUFFER,tex,0,i,false); > > > > } > > > > > > > > to > > > > > > > > for(int i=0;i<1;i++){ > > > > //one overalll camera > > > > _cameras[0]->attach( > > > > > > > > > > > > > osg::Camera::COLOR_BUFFER,tex,0,osg::Camera::FACE_CONTROLLED_BY_GEOMETRY_SHADER); > > > > > > > > > } > > > > > > > > But this change make a crash: > > > > > > > > > > > > Code: > > > > > > > > RenderStage::runCameraSetUp(), FBO setup failed, FBO status= > > > > > > > > > 0x8da8 > > > > > _______________________________________________ > > > osg-users mailing list > > > > > > > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > > > ------------------ > > > Post generated by Mail2Forum > > > > > > > > > ------------------ > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=35027#35027 > > > > > > > > > > > > _______________________________________________ > > osg-users mailing list > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > _______________________________________________ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ------------------ > Post generated by Mail2Forum :D :D :D :D :D :D :D :D :D :D
------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35132#35132 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org