|
Axmol 3.0.0-89d6d9a
|
RenderView-owned scene composition policy. More...
#include <SceneCompositor.h>
Inherited by VRPreviewSceneCompositor, and VRSceneCompositor.
Public Member Functions | |
| virtual bool | isVRActive () const |
| Returns whether this compositor is currently presenting a VR scene. | |
| virtual void | pollEvents () |
| Called each frame before scheduler update to poll compositor-owned events. | |
| virtual void | renderScene (Renderer *renderer, Scene *scene) |
| Composes the scene for the current frame. | |
| virtual void | onRenderViewChanged (RenderViewCore *rv) |
| Called when this compositor is bound to a RenderViewCore or when the render surface changes. | |
| virtual void | setScissorRect (float x, float y, float w, float h) |
| Applies a scissor rect, optionally transformed by the active raster transform. | |
| virtual const ScissorRect & | getScissorRect () const |
| Returns the last scissor rect set through this compositor. | |
RenderView-owned scene composition policy.
SceneCompositor is the RenderViewCore-owned strategy that defines how the current scene is composed into the active render surface.
The base implementation iterates all visible cameras, applies their transforms, and submits draw commands to the Renderer. Specialized compositors, such as VRSceneCompositor, may render the scene into custom per-view or per-eye render targets before presenting it.
|
inlinevirtual |
Returns whether this compositor is currently presenting a VR scene.
Base returns false
|
virtual |
Called each frame before scheduler update to poll compositor-owned events.
The base implementation polls native window/platform events by forwarding to RenderViewCore::pollNativeEvents(). Specialized compositors may extend this to poll runtime-specific events, such as OpenXR frame events.
Reimplemented in VRSceneCompositor.
|
virtual |
Composes the scene for the current frame.
| Renderer | The Renderer to submit draw commands into. |
| scene | The scene graph to traverse and compose. |
|
virtual |
Called when this compositor is bound to a RenderViewCore or when the render surface changes.
The base implementation stores the RenderViewCore weak reference. Subclasses may override to recreate framebuffer-sized or runtime resources.
|
virtual |
Applies a scissor rect, optionally transformed by the active raster transform.
Base implementation delegates to Renderer::setScissorRect.
|
virtual |
Returns the last scissor rect set through this compositor.
Base implementation delegates to Renderer::getScissorRect.