Re: [osg-users] Render to texture 3D
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;i1;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
Re: [osg-users] Render to texture 3D
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;i1;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 osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Render to texture 3D
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;i1;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 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
Re: [osg-users] Render to texture 3D
Hi Julien, It's me that submitted this change at http://www.mail-archive.com/osg-submissions@lists.openscenegraph.org/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;i1;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 osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Render to texture 3D
Hi Julien, I haven't personally tested this feature yet, but having merged the submissions I know that the FACE_CONTROLLED_BY_GEOMETRY_SHADER control is only available on recent hardware and drivers so check whether this feature is available on your hardware. Robert. On Sat, Dec 18, 2010 at 7:19 PM, Julien Valentin julienvalenti...@gmail.com wrote: 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;i1;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 Any idea? Thank you! Cheers, Julien[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34962#34962 ___ 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
[osg-users] Render to texture 3D
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;i1;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 Any idea? Thank you! Cheers, Julien[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34962#34962 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Render To Texture 3D Solved, but another question
Yes, thanks~ Robert Osfield wrote: Hi Hesicong, On Tue, May 6, 2008 at 3:59 PM, hesicong2006 [EMAIL PROTECTED] wrote: Hi, Robert, I finally found out Camera::attach(BufferComponent buffer, osg::Texture* texture, unsigned int level, unsigned int face, bool mipMapGeneration) function, the fourth parameter "face" set the Z level of 3D texture. By setting difference face( Z order), I can successfully write to 3D texture. Yes the face both refers to the texture cube map face and the z level of a 3D texture. I'll add a doxygen doc into include/osg/Camera to explain the parameters better. Are you happy with things now? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Information from ESET NOD32 Antivirus, version of virus signature database 3081 (20080507) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Render To Texture 3D Solved, but another question
Hi Hesicong, On Tue, May 6, 2008 at 3:59 PM, hesicong2006 [EMAIL PROTECTED] wrote: Hi, Robert, I finally found out Camera::attach(BufferComponent buffer, osg::Texture* texture, unsigned int level, unsigned int face, bool mipMapGeneration) function, the fourth parameter face set the Z level of 3D texture. By setting difference face( Z order), I can successfully write to 3D texture. Yes the face both refers to the texture cube map face and the z level of a 3D texture. I'll add a doxygen doc into include/osg/Camera to explain the parameters better. Are you happy with things now? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Render To Texture 3D Solved, but another question
Hi Hesicong, On Tue, Apr 29, 2008 at 2:45 PM, hesicong2006 [EMAIL PROTECTED] wrote: I have managed to render to 3D texture, but now I can only write to the first level (z=0) of 3D texture. Overloads of osg::Camera::attach still lack of ability to select which z of 3D texture to use, is it possible to write a new overload to support this feature? My render to 3d texture code is attached. Thanks for replying! Thanks for the example. It kinda sounds like you have come across a bug. Once I have cleared my inbox (which is very full right now) I try and get to reviewing your code example. Others are welcome to dive in and see if they can spot the bug. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Render To Texture 3D Solved, but another question
Hi, Robert, I finally found out Camera::attach(BufferComponent buffer, osg::Texture* texture, unsigned int level, unsigned int face, bool mipMapGeneration) function, the fourth parameter "face" set the Z level of 3D texture. By setting difference face( Z order), I can successfully write to 3D texture. Robert Osfield wrote: Hi Hesicong, On Tue, Apr 29, 2008 at 2:45 PM, hesicong2006 [EMAIL PROTECTED] wrote: I have managed to render to 3D texture, but now I can only write to the first level (z=0) of 3D texture. Overloads of osg::Camera::attach still lack of ability to select which z of 3D texture to use, is it possible to write a new overload to support this feature? My render to 3d texture code is attached. Thanks for replying! Thanks for the example. It kinda sounds like you have come across a bug. Once I have cleared my inbox (which is very full right now) I try and get to reviewing your code example. Others are welcome to dive in and see if they can spot the bug. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Information from ESET NOD32 Antivirus, version of virus signature database 3079 (20080506) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Render To Texture 3D
Hi, Sergey Kurdakov, I downloaded osgPPU and look into the examples, but I still can't find how to render to 3d texture. Would you please give a hand pointing out where the right code is ? Thanks in advanced! hesicong2006 wrote: OK, thanks, I'll have a try~ Sergey Kurdakov wrote: Hello I looked into the Nvidia Render To Texture 3D example in OpenGL SDK 10, you might try http://projects.tevs.eu/osgPPU - it has correct code to render to 3D texture. Regards On Sun, Apr 13, 2008 at 7:34 PM, hesicong2006 [EMAIL PROTECTED] wrote: Hi, Robert: I've asked this question before, but still there are no answers to this question. I looked into the Nvidia Render To Texture 3D example in OpenGL SDK 10, and found the way to render to 3D texture. 1.Allocate a 3D texture n*n*n 2.Build N slices, each slice will be the render target of 3D texture 3.Render slice 1 to N { Bind the texture to RTT camera, with selected Z } 4.Finished. I write a small test program. It works for a normal 2D texture, but will not write any data into 3D texture. I attached my source code, and please tell me if there are some mistakes in my program or does any suggestions on rendering to 3D texture? My hardware is NVIDIA Geforce 8800 with lastest driver install. OSG is the newly subversion checkout version. Thanks in advanced! ___ 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
[osg-users] Render To Texture 3D Solved, but another question
Hi, Robert, I have managed to render to 3D texture, but now I can only write to the first level (z=0) of 3D texture. Overloads of osg::Camera::attach still lack of ability to select which z of 3D texture to use, is it possible to write a new overload to support this feature? My render to 3d texture code is attached. Thanks for replying! Render To Texture 3D.rar Description: Binary data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Render To Texture 3D
Hi, Robert: I've asked this question before, but still there are no answers to this question. I looked into the Nvidia Render To Texture 3D example in OpenGL SDK 10, and found the way to render to 3D texture. 1.Allocate a 3D texture n*n*n 2.Build N slices, each slice will be the render target of 3D texture 3.Render slice 1 to N { Bind the texture to RTT camera, with selected Z } 4.Finished. I write a small test program. It works for a normal 2D texture, but will not write any data into 3D texture. I attached my source code, and please tell me if there are some mistakes in my program or does any suggestions on rendering to 3D texture? My hardware is NVIDIA Geforce 8800 with lastest driver install. OSG is the newly subversion checkout version. Thanks in advanced! renderTo3DTextureTestCode.rar Description: Binary data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Render To Texture 3D
Hello I looked into the Nvidia Render To Texture 3D example in OpenGL SDK 10, you might try http://projects.tevs.eu/osgPPU - it has correct code to render to 3D texture. Regards On Sun, Apr 13, 2008 at 7:34 PM, hesicong2006 [EMAIL PROTECTED] wrote: Hi, Robert: I've asked this question before, but still there are no answers to this question. I looked into the Nvidia Render To Texture 3D example in OpenGL SDK 10, and found the way to render to 3D texture. 1.Allocate a 3D texture n*n*n 2.Build N slices, each slice will be the render target of 3D texture 3.Render slice 1 to N { Bind the texture to RTT camera, with selected Z } 4.Finished. I write a small test program. It works for a normal 2D texture, but will not write any data into 3D texture. I attached my source code, and please tell me if there are some mistakes in my program or does any suggestions on rendering to 3D texture? My hardware is NVIDIA Geforce 8800 with lastest driver install. OSG is the newly subversion checkout version. Thanks in advanced! ___ 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
Re: [osg-users] Render To Texture 3D
OK, thanks, I'll have a try~ Sergey Kurdakov wrote: Hello I looked into the Nvidia Render To Texture 3D example in OpenGL SDK 10, you might try http://projects.tevs.eu/osgPPU - it has correct code to render to 3D texture. Regards On Sun, Apr 13, 2008 at 7:34 PM, hesicong2006 [EMAIL PROTECTED] wrote: Hi, Robert: I've asked this question before, but still there are no answers to this question. I looked into the Nvidia Render To Texture 3D example in OpenGL SDK 10, and found the way to render to 3D texture. 1.Allocate a 3D texture n*n*n 2.Build N slices, each slice will be the render target of 3D texture 3.Render slice 1 to N { Bind the texture to RTT camera, with selected Z } 4.Finished. I write a small test program. It works for a normal 2D texture, but will not write any data into 3D texture. I attached my source code, and please tell me if there are some mistakes in my program or does any suggestions on rendering to 3D texture? My hardware is NVIDIA Geforce 8800 with lastest driver install. OSG is the newly subversion checkout version. Thanks in advanced! ___ 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