20,741
edits
m (→Swap Buffers: https://groups.google.com/g/osg-users/c/cIMLA2zkdyE/m/cUx9JZA2J4MJ) |
|||
Line 602: | Line 602: | ||
* If you are creating new graphics contexts and applying and old scene graph to it then you can't use the Texture::setUnRefImageDataAfterApply(true) feature of osg::Texture as this will discard the imagery once it's applied to all the graphics contexts that it knows about. <ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg32658.html</ref> The typical problem is that the scene graph has been set up to unref texture images after apply so when it comes to reloading the texture images there aren't the to download. <ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg34284.html</ref> | * If you are creating new graphics contexts and applying and old scene graph to it then you can't use the Texture::setUnRefImageDataAfterApply(true) feature of osg::Texture as this will discard the imagery once it's applied to all the graphics contexts that it knows about. <ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg32658.html</ref> The typical problem is that the scene graph has been set up to unref texture images after apply so when it comes to reloading the texture images there aren't the to download. <ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg34284.html</ref> | ||
=== Scene View Buffering === | |||
Both '''DrawThreadPerContext''' and '''CullThreadPerCameraDrawThreadPerContext''' modes | |||
use osgViewer::Renderer thread with double buffered SceneViews. | |||
'''SingleThreaded''' and '''CullDrawThreadPerContext''' use a single SceneView for | |||
rendering. (CullDrawThreadPerContext also uses Renderer but only with one | |||
SceneView see osgViewer::Rendered::cull_draw method in comparison to | |||
osgViewer::Renderer::draw & osgViewer::Renderer::cull) | |||
Double buffered SceneViews means that there are two interleaved SceneViews | |||
performing cull and draw operations for subsequent odd/even frames. These | |||
two scene views share some resources but may also create some separate | |||
resources. For example, if texture is attached to RTT camera, each of these | |||
SceneViews will create two separate FBOs for | |||
this camera but these FBOs will share camera texture. But when you attach | |||
the image to RTT camera, each of these FBOs will create | |||
spearate render buffer and will read pixels to the camera image from the | |||
buffer.<ref>https://groups.google.com/g/osg-users/c/cIMLA2zkdyE/m/cUx9JZA2J4MJ</ref> | |||
=== Swap Buffers === | === Swap Buffers === | ||
OpenGL drivers have a FIFO, your app fills the fifo with tokens and | OpenGL drivers have a FIFO, your app fills the fifo with tokens and |