PipelineContext¶
Inherited: None
Description¶
PipelineContext is a class responsible for managing the rendering pipeline context, including rendering tasks, camera settings, and post-processing effects.
Public Methods¶
void |
addTextureBuffer (Texture * texture) |
buffer () const |
|
void |
cameraReset () |
std::list<std::pair<const PostProcessSettings *, float>> & |
|
RenderList |
|
Camera * |
currentCamera () const |
void |
frustumCulling (const Frustum & frustum, const RenderList & in, RenderList & out, AABBox * box = nullptr) |
void |
insertRenderTask (PipelineTask * task, PipelineTask * before = nullptr) |
void |
|
const std::list<PipelineTask *> & |
renderTasks () const |
StringList |
renderTextures () const |
void |
resize (int32_t width, int32_t height) |
Texture * |
|
LightList |
sceneLights () |
RenderList |
|
void |
setCurrentCamera (Camera * camera) |
void |
setDefaultTarget (RenderTarget * target) |
void |
setPipeline (Pipeline * pipeline) |
void |
setWorld (World * world) |
size () const |
|
void |
subscribePost (PipelineContext::RenderCallback callback, void * object) |
Texture * |
textureBuffer (const TString & name) |
void |
unsubscribePost (void * object) |
World * |
world () |
worldBound () const |
Static Methods¶
Mesh * |
defaultCube () |
Mesh * |
defaultPlane () |
Texture * |
whiteTexture () |
Methods Description¶
void PipelineContext::addTextureBuffer (Texture * texture)
Adds a texture buffer to the global textures in the command buffer.
CommandBuffer * PipelineContext::buffer () const
Retrieves the command buffer associated with the pipeline context.
void PipelineContext::cameraReset ()
Resets the camera view and projection matrices in the command buffer.
std::list<std::pair<const PostProcessSettings , :ref:`float>><api_float>>>` & **PipelineContext::culledPostEffectSettings* ()
Returns the list of filtered scene post effect settings relevant for rendering.
RenderList PipelineContext::culledRenderables ()
Returns the list of culled scene components based on frustum culling.
Camera * PipelineContext::currentCamera () const
Returns the currently set camera for rendering.
See also setCurrentCamera().
Mesh * PipelineContext::defaultCube ()
Return the default cube mesh used in rendering.
Mesh * PipelineContext::defaultPlane ()
Retrieves the default plane mesh used in rendering.
RenderTarget * PipelineContext::defaultTarget ()
Returns the default render target associated with the pipeline context.
See also setDefaultTarget().
void PipelineContext::frustumCulling (Frustum & frustum, RenderList & in, RenderList & out, AABBox * box = nullptr)
Filters out an incoming in list which are not in the frustum. Returns filtered list. The output parameter returns a bounding box for filtered objects.
void PipelineContext::insertRenderTask (PipelineTask * task, PipelineTask * before = nullptr)
Inserts a rendering task into the pipeline context. Optionally, specifies the task to insert before.
void PipelineContext::invalidateTasks ()
Invalidates all the pipeline tasks to let them to reestablish connections.
const std::list<PipelineTask *> & PipelineContext::renderTasks () const
Returns the list of rendering tasks associated with the pipeline context.
StringList PipelineContext::renderTextures () const
Returns a list of names of the global textures.
void PipelineContext::resize (int32_t width, int32_t height)
Resizes the pipeline context to the specified width and height. Updates render tasks accordingly.
Texture * PipelineContext::resultTexture ()
Returns the resulting texture containing the rendering result.
LightList PipelineContext::sceneLights ()
Returns the list of scene lights relevant for rendering.
RenderList PipelineContext::sceneRenderables ()
Returns the list of scene components relevant for rendering.
void PipelineContext::setCurrentCamera (Camera * camera)
Sets the current camera and updates associated matrices in the command buffer.
See also currentCamera().
void PipelineContext::setDefaultTarget (RenderTarget * target)
Sets the default render target for the pipeline context.
See also defaultTarget().
void PipelineContext::setPipeline (Pipeline * pipeline)
Sets the rendering pipeline for the context, creating and linking associated rendering tasks.
void PipelineContext::setWorld (World * world)
Sets the curent world instance to process.
See also world().
Vector2 PipelineContext::size () const
Returns screen size
void PipelineContext::subscribePost (PipelineContext::RenderCallback callback, void * object)
Subscribes callback for object to handle post rendering step.
Returns a texture buffer based on its name.
void PipelineContext::unsubscribePost (void * object)
Unsubscribes an object to stop handle post rendering step.
Texture * PipelineContext::whiteTexture ()
Return the white texture used in rendering.
World * PipelineContext::world ()
Returns the curent world instance to process.
See also setWorld().
AABBox PipelineContext::worldBound () const
Returns the bounding box representing the world-bound.