class ARFrameRenderer (Niantic.ARDK.Rendering.ARFrameRenderer)
Overview
Rendering logic and resources shared across all platforms. More...
class ARFrameRenderer: Niantic.ARDK.Rendering.IARFrameRenderer, IDisposable { public: // fields bool IsOrientationLocked = false; // properties Matrix4x4 DisplayTransform; float FarPlane; GraphicsFence? GPUFence; ArdkEventHandler<FrameRenderedArgs> Initialized; bool IsEnabled; float NearPlane; Matrix4x4 ProjectionTransform; int? RecommendedFrameRate; Resolution Resolution; RenderTarget Target; // events event FrameRendered(); // methods void AddFeatureProvider(IRenderFeatureProvider provider); void BlitToTexture(ref RenderTexture texture); void Disable(); void Dispose(); void Enable(); void Initialize(); void RemoveFeatureProvider(IRenderFeatureProvider provider); void UpdateState(IARFrame withFrame); };
Inherited Members
public: // properties Matrix4x4 DisplayTransform; float FarPlane; GraphicsFence? GPUFence; float NearPlane; Matrix4x4 ProjectionTransform; int RecommendedFrameRate; Resolution Resolution; RenderTarget Target; // events event FrameRendered(); event Initialized(); // methods void AddFeatureProvider(IRenderFeatureProvider provider); void RemoveFeatureProvider(IRenderFeatureProvider provider);
Detailed Documentation
Rendering logic and resources shared across all platforms.
Fields
bool IsOrientationLocked = false
Whether the renderer is allowed to rotate the image.
Properties
ArdkEventHandler<FrameRenderedArgs> Initialized
Event for when the renderer had just initialized.
Events
event FrameRendered()
Event for when the renderer had just finished rendering to its primary target.
Methods
void AddFeatureProvider(IRenderFeatureProvider provider)
Registers a new feature provider to this renderer. Call this method to insert components to the pipeline that alter or extend the background rendering.
void BlitToTexture(ref RenderTexture texture)
Performs a graphics blit to the specified texture using the renderer's current internal state. To update the renderer's state, use the UpdateState(IARFrame) API.
Parameters:
texture |
The render target. This texture needs to be already allocated. |
void Disable()
Disables the renderer. The rendering commands will be detached from the target camera, if any.
void Enable()
Enables the renderer. If the renderer is targeting a camera, this will attach the execution of the rendering commands to it.
void Initialize()
Initializes rendering resources.
注釈
This needs to be called before any frame is sent to this renderer to process.
void RemoveFeatureProvider(IRenderFeatureProvider provider)
Removes the specified feature provider from this renderer, if it is present in its pipeline.