Class TRenderParams
Unit
Declaration
type TRenderParams = class(TObject)
Description
Information that a TCastleTransform.LocalRender needs to render. "To render" means "just to collect shapes" for TCastleScene.LocalRender. Read-only for TCastleTransform.LocalRender (except Statistics, which should be updated during rendering).
This is mostly an internal class.
You should not need to create it, you should not need to read anything inside or deal with this class otherwise, and actually you should not need to override TCastleTransform.LocalRender during normal engine usage. But it may be useful for special customized rendering.
Source: transform/castletransform_renderparams.inc (line 260).
Hierarchy
- TObject
- TRenderParams
Overview
Fields
| Public | InternalPass: TInternalRenderingPass; |
| Public | UserPass: TUserRenderingPass; |
| Public | Transformation: PTransformation; |
| Public | Statistics: TRenderStatistics; |
| Public | GlobalFog: TAbstractFogNode; |
| Public | Frustum: PFrustum; |
| Public | UsingShadowVolumes: Boolean; |
| Public | RenderingCamera: TRenderingCamera; |
| Public | InMeaningfulParent: Boolean; |
| Public | ProjectionBoxWithoutGizmos: TBox3DEvent; |
| Public | ProjectionBoxWithGizmos: TBox3DEvent; |
| Public | ProjectionViewportWidth: Single; |
| Public | ProjectionViewportHeight: Single; |
| Public | Collector: TObject; |
| Public | RendererToPrepareShapes: TObject; |
| Public | DepthRange: TDepthRange; |
Methods
| Public | constructor Create; |
| Public | function GlobalLights: TAbstractLightInstancesList; virtual; abstract; |
| Public | procedure AddRenderEvent(const RenderEvent: TRenderEvent); |
| Public | function LocalCameraPosition: TVector3; |
Description
Fields
| Public | InternalPass: TInternalRenderingPass; |
|
Rendering pass number, for internal multi-pass rendering, like for shadow volumes. Source: transform/castletransform_renderparams.inc (line 263). | |
| Public | UserPass: TUserRenderingPass; |
|
Rendering pass number, for user purposes. Multiplied with InternalPass to get final pass number, that determines shaders used. Source: transform/castletransform_renderparams.inc (line 268). | |
| Public | Transformation: PTransformation; |
|
Transformation that should be applied to the rendered result. Source: transform/castletransform_renderparams.inc (line 271). | |
| Public | Statistics: TRenderStatistics; |
|
Current rendering statistics, should be updated by each TCastleTransform.LocalRender call. Source: transform/castletransform_renderparams.inc (line 275). | |
| Public | GlobalFog: TAbstractFogNode; |
|
Fog that affects all scenes. Source: transform/castletransform_renderparams.inc (line 278). | |
| Public | Frustum: PFrustum; |
|
Camera frustum in local coordinates. Local for the TCastleTransform instance receiving this TRenderParams as TCastleTransform.LocalRender parameter, so it may be different from RenderingCamera.Frustum. As a special exception, it can be Source: transform/castletransform_renderparams.inc (line 287). | |
| Public | UsingShadowVolumes: Boolean; |
|
Are we going to render with shadow volumes, which means we have a light source casting shadows with shadow volumes, and renderer is capable (has stencil buffer etc.). This doesn't say at which pass are we – collecting shapes, or during pass rendering unlit or lit things (see TRenderOnePassParams.DisableShadowVolumeCastingLights). This merely says we are going to have these passes. Source: transform/castletransform_renderparams.inc (line 298). | |
| Public | RenderingCamera: TRenderingCamera; |
|
Camera information for renderer. Source: transform/castletransform_renderparams.inc (line 301). | |
| Public | InMeaningfulParent: Boolean; |
|
Are we traversing now only inside parents with MeaningfulParent, i.e. outside of TCastleTransformReference.Reference. Source: transform/castletransform_renderparams.inc (line 305). | |
| Public | ProjectionBoxWithoutGizmos: TBox3DEvent; |
|
At design-time, cameras update their own projection, to show camera gizmo. These are parameters to do this. Source: transform/castletransform_renderparams.inc (line 309). | |
| Public | ProjectionBoxWithGizmos: TBox3DEvent; |
|
At design-time, cameras update their own projection, to show camera gizmo. These are parameters to do this. Source: transform/castletransform_renderparams.inc (line 309). | |
| Public | ProjectionViewportWidth: Single; |
|
This item has no description. Source: transform/castletransform_renderparams.inc (line 310). | |
| Public | ProjectionViewportHeight: Single; |
|
This item has no description. Source: transform/castletransform_renderparams.inc (line 310). | |
| Public | Collector: TObject; |
|
Always TShapesCollector at actual rendering. Source: transform/castletransform_renderparams.inc (line 313). | |
| Public | RendererToPrepareShapes: TObject; |
|
Always TRenderer, to prepare shapes. This is useful to prepare shapes (rendering them with renderer creates VBOs, shaders, and makes them "ready" for next fast rendering). Note that shapes and scenes *should not* get associated with this TRenderer instance when being prepared. Shapes and scenes should remain independent of TRenderer instance, to easily change them to a different renderer (like a different TCastleViewport). So this TRenderer instance is provided to be used, but do not keep anywhere in shapes / scenes a reference to it. See CastleInternalRenderer for more comments how are things associated. Source: transform/castletransform_renderparams.inc (line 328). | |
| Public | DepthRange: TDepthRange; |
|
Depth range that should be used for rendering. Source: transform/castletransform_renderparams.inc (line 331). | |
Methods
| Public | constructor Create; |
|
This item has no description. Source: transform/castletransform_renderparams.inc (line 333). | |
| Public | function GlobalLights: TAbstractLightInstancesList; virtual; abstract; |
|
Lights that shine on object (headlight and lights from all scenes with CastGlobalLights). Source: transform/castletransform_renderparams.inc (line 336). | |
| Public | procedure AddRenderEvent(const RenderEvent: TRenderEvent); |
|
Add a custom rendering event. Given RenderEvent will be called multiple times during this render pass, with TRenderOnePassParams containing different values, for example once to render opaque shapes (with TRenderOnePassParams.UsingBlending = So be sure to filter what you're doing inside this callback by TRenderOnePassParams.UsingBlending and TRenderOnePassParams.FilterShadowVolumesReceivers. Source: transform/castletransform_renderparams.inc (line 350). | |
| Public | function LocalCameraPosition: TVector3; |
|
Camera position, in the local coordinates, after Transformation. Source: transform/castletransform_renderparams.inc (line 353). | |
Generated by PasDoc 0.17.0.snapshot.