See Also: RenderSurface
Auxiliary views are viewports assigned to a RenderSurface by calling its SetViewport method. By default these will be rendered on each frame that the texture containing the surface is visible, and can be typically used to implement for example camera displays or reflections. The texture in question must have been created in rendertarget mode, see SetSize method.
The viewport is not assigned directly to the texture because of cube map support: a renderable cube map has 6 render surfaces, and done this way, a different camera could be assigned to each.
A "backup texture" can be assigned to the rendertarget texture: because it is illegal to sample a texture that is also being simultaneously rendered to (in cases where the texture becomes "recursively" visible in the auxiliary view), the backup texture can be used to specify which texture should be used in place instead.
Rendering detailed auxiliary views can easily have a large performance impact. Some things you can do for optimization with the auxiliary view camera:
- Set the far clip distance as small as possible.
- Use viewmasks on the camera and the scene objects to only render some of the objects in the auxiliary view.
- Use the cameraвЂ™s ViewOverrideFlags property to disable shadows, to disable occlusion, or force the lowest material quality.
The surface can also be configured to always update its viewports, or to only update when manually requested. See RenderSurface.UpdatedMode. For example an editor widget showing a rendered texture might use either of those modes. Call RenderSurface.QueueUpdate to request a manual update of the surface on the current frame.
Assembly: Urho (in Urho.dll)
Assembly Versions: 184.108.40.206
The members of Urho.RenderSurface are listed below.
See Also: RefCounted
|[read-only]||AutoResolve||Boolean. Return multisampling autoresolve mode.|
|[read-only]||Height||Int32. Return height.|
|LinkedDepthStencil||RenderSurface. Return linked depth buffer. Or Set linked depth-stencil surface.|
|LinkedRenderTarget||RenderSurface. Return linked color buffer. Or Set linked color rendertarget.|
|[read-only]||MultiSample||Int32. Return multisampling level.|
|NumViewports||UInt32. Return number of viewports. Or Set number of viewports.|
|[read-only]||ParentTexture||Texture. Return parent texture.|
|[read-only]||ReadOnlyView||IntPtr. eturn Direct3D11 read-only depth-stencil view. May be null if not applicable. Not valid on OpenGL.|
|[read-only]||RenderTargetView||IntPtr. Return Direct3D11 rendertarget or depth-stencil view. Not valid on OpenGL.|
|ResolveDirty||Boolean. Get or Set or clear the need resolve flag. Called internally by Graphics.|
|[read-only]||Surface||IntPtr. Return Direct3D9 surface.|
|UpdateMode||RenderSurfaceUpdateMode. Return viewport update mode. Or Set viewport update mode. Default is to update when visible.|
|[read-only]||UpdateQueued||Boolean. Return viewport update mode.|
|[read-only]||Usage||TextureUsage. Return usage.|
|[read-only]||Width||Int32. Return width.|