![]() |
RAMSES Documentation
27.0.130
Information for RAMSES users and developers
|
When a RAMSES Client Scene is subscribed, mapped to display and shown, RAMSES Renderer renders it directly into the display's framebuffer. This default behaviour can be modified by assigning the scene to an offscreen buffer using Renderer API, scene will then not be rendered directly to display's framebuffer anymore but to a buffer that can be used as texture input in another scene.
All scenes that are supposed to be assigned to an offscreen buffer have to be mapped to the same display where the offscreen buffer was created. There can be multiple scenes rendered to the same offscreen buffer but a scene can be rendered to exactly one buffer or framebuffer.
An offscreen buffer can then be linked to another scene's (consumer scene) texture input similar to Texture Data Linking. Consumer scene where the offscreen buffer is to be used as texture has to have a Texture Consumer which is in fact a TextureSampler with a Data Consumer Id. Consumer scene has to also be mapped to the same display as the offscreen buffer (and scenes rendered into it).
These rules are analogical to scene to scene Texture Data Linking.
Clearing of offscreen buffers is currently implicit and cannot be controlled by user explicitly. An offscreen buffer will be cleared at the beginning of every frame only if there is any scene mapped to it. This means that if a single scene that is mapped to the offscreen buffer gets unmapped for any of the reasons mentioned above, the offscreen buffer will not be cleared until there is another scene assigned to it. However the offscreen buffer would be cleared if it has hidden scenes assigned to it.
RAMSES Renderer allows user to define scene render order when mapping a scene to a display. Assigning a scene to offscreen buffer or linking an offscreen buffer to a consumer scene DOES NOT AFFECT the render order of any of the scenes involved. It is user's responsibility to define the render order so that desired result is achieved, this in most cases means to render the scene(s) assigned to an offscreen buffer BEFORE the consumer scene using the contents of the offscreen buffer.