Axmol 3.0.0-89d6d9a
Loading...
Searching...
No Matches
SceneCompositor Class Reference

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.

Detailed Description

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.

Member Function Documentation

◆ isVRActive()

virtual bool isVRActive ( ) const
inlinevirtual

Returns whether this compositor is currently presenting a VR scene.

Base returns false

◆ pollEvents()

virtual void pollEvents ( )
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.

◆ renderScene()

virtual void renderScene ( Renderer * renderer,
Scene * scene )
virtual

Composes the scene for the current frame.

Parameters
RendererThe Renderer to submit draw commands into.
sceneThe scene graph to traverse and compose.

◆ onRenderViewChanged()

virtual void onRenderViewChanged ( RenderViewCore * rv)
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.

◆ setScissorRect()

virtual void setScissorRect ( float x,
float y,
float w,
float h )
virtual

Applies a scissor rect, optionally transformed by the active raster transform.

Base implementation delegates to Renderer::setScissorRect.

◆ getScissorRect()

virtual const ScissorRect & getScissorRect ( ) const
virtual

Returns the last scissor rect set through this compositor.

Base implementation delegates to Renderer::getScissorRect.


The documentation for this class was generated from the following file:
  • SceneCompositor.h