[osg-users] Offscreen rendering without visible window
Hi, i have some questions regarding Pbuffers, FBO, and offscreen rendering. I'm not showing the final render on a window but retrieving it with glReadPixels for CPU processing. 1) is there any method to create a Graphics Context without any visible window other than using pbuffer = true in traits (on Windows XP)? I have read that Frame Buffer Object (FBO) replaces much of the functionality of PBuffers (Simon Green slides about FBO) and that they have better performance. 2) Can FBO's be used without using PBuffer to establish the GraphicsContext? Since they need one, how? Since FBO's are established at camera objects, is there any method to read back the rendered pixels (other than doing it myself with glReadPixels)? Is perhaps Image the correct path? 3) If the desired size of the rendered result changes, i have to recreate the pbuffer manually creating a new graphics context with the new size. If i use FBO, will i have to manually resize it, or it is done by the camera? I have already achieved doing it with pbuffers, but i will do the rendering with FBO also and compare both methods (until replies, using pbuffer to create de GC). Thanks a lot. PD: StatsHandler fails to create the HUD camera if the main camera's graphics context is PixelBufferWin32 instead of GraphicsWindowWin32. It doesn't found a correct GraphicsContext. Is this perhaps a bug? PPD: Any ideas when will the programming guide book be available ? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Offscreen rendering without visible window
Hi Himar, Pbuffer is the normal way to render off screen without a window. FBO requirs an already createdd graphics context to work, they aren't a replacement of Pbuffer, just the render to texture support that FBO supplies. FBO's are just part of an OpenGL graphics context state, they don't have any window creation support themselves. Robert. On Nov 26, 2007 11:41 AM, Himar Carmona [EMAIL PROTECTED] wrote: Hi, i have some questions regarding Pbuffers, FBO, and offscreen rendering. I'm not showing the final render on a window but retrieving it with glReadPixels for CPU processing. 1) is there any method to create a Graphics Context without any visible window other than using pbuffer = true in traits (on Windows XP)? I have read that Frame Buffer Object (FBO) replaces much of the functionality of PBuffers (Simon Green slides about FBO) and that they have better performance. 2) Can FBO's be used without using PBuffer to establish the GraphicsContext? Since they need one, how? Since FBO's are established at camera objects, is there any method to read back the rendered pixels (other than doing it myself with glReadPixels)? Is perhaps Image the correct path? 3) If the desired size of the rendered result changes, i have to recreate the pbuffer manually creating a new graphics context with the new size. If i use FBO, will i have to manually resize it, or it is done by the camera? I have already achieved doing it with pbuffers, but i will do the rendering with FBO also and compare both methods (until replies, using pbuffer to create de GC). Thanks a lot. PD: StatsHandler fails to create the HUD camera if the main camera's graphics context is PixelBufferWin32 instead of GraphicsWindowWin32. It doesn't found a correct GraphicsContext. Is this perhaps a bug? PPD: Any ideas when will the programming guide book be available ? ___ 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] Offscreen rendering without visible window
I'm not sure if it helps, but for my offscreen FBO rendering I created 1 pixel size window using the windows API and set it's handle as the output of the viewer. the RTT was fine rendering texture size images. I also tried making the window invisible and 0 pixels size but I don't remember what were the results :) (I guess it didn't work) Guy. - Original Message - From: Robert Osfield [EMAIL PROTECTED] To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Monday, November 26, 2007 2:51 PM Subject: Re: [osg-users] Offscreen rendering without visible window Hi Himar, Pbuffer is the normal way to render off screen without a window. FBO requirs an already createdd graphics context to work, they aren't a replacement of Pbuffer, just the render to texture support that FBO supplies. FBO's are just part of an OpenGL graphics context state, they don't have any window creation support themselves. Robert. On Nov 26, 2007 11:41 AM, Himar Carmona [EMAIL PROTECTED] wrote: Hi, i have some questions regarding Pbuffers, FBO, and offscreen rendering. I'm not showing the final render on a window but retrieving it with glReadPixels for CPU processing. 1) is there any method to create a Graphics Context without any visible window other than using pbuffer = true in traits (on Windows XP)? I have read that Frame Buffer Object (FBO) replaces much of the functionality of PBuffers (Simon Green slides about FBO) and that they have better performance. 2) Can FBO's be used without using PBuffer to establish the GraphicsContext? Since they need one, how? Since FBO's are established at camera objects, is there any method to read back the rendered pixels (other than doing it myself with glReadPixels)? Is perhaps Image the correct path? 3) If the desired size of the rendered result changes, i have to recreate the pbuffer manually creating a new graphics context with the new size. If i use FBO, will i have to manually resize it, or it is done by the camera? I have already achieved doing it with pbuffers, but i will do the rendering with FBO also and compare both methods (until replies, using pbuffer to create de GC). Thanks a lot. PD: StatsHandler fails to create the HUD camera if the main camera's graphics context is PixelBufferWin32 instead of GraphicsWindowWin32. It doesn't found a correct GraphicsContext. Is this perhaps a bug? PPD: Any ideas when will the programming guide book be available ? ___ 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org