Urho3D::RenderSurface Class Reference
Color or depth-stencil surface that can be rendered into. More...
#include <Urho3D/Graphics/RenderSurface.h>
Public Member Functions | |
| RenderSurface (Texture *parentTexture) | |
| Construct with parent texture. | |
| ~RenderSurface () override | |
| Destruct. | |
| void | SetNumViewports (unsigned num) |
| void | SetViewport (unsigned index, Viewport *viewport) |
| void | SetUpdateMode (RenderSurfaceUpdateMode mode) |
| void | SetLinkedRenderTarget (RenderSurface *renderTarget) |
| void | SetLinkedDepthStencil (RenderSurface *depthStencil) |
| void | QueueUpdate () |
| Queue manual update of the viewport(s). | |
| void | Release () |
| Release surface. | |
| void | OnDeviceLost () |
| Mark the GPU resource destroyed on graphics context destruction. Only used on OpenGL. | |
| bool | CreateRenderBuffer (unsigned width, unsigned height, unsigned format, int multiSample) |
| Create renderbuffer that cannot be sampled as a texture. Only used on OpenGL. | |
| int | GetWidth () const |
| int | GetHeight () const |
| TextureUsage | GetUsage () const |
| int | GetMultiSample () const |
| Return multisampling level. | |
| bool | GetAutoResolve () const |
| Return multisampling autoresolve mode. | |
| unsigned | GetNumViewports () const |
| Viewport * | GetViewport (unsigned index) const |
| RenderSurfaceUpdateMode | GetUpdateMode () const |
| RenderSurface * | GetLinkedRenderTarget () const |
| RenderSurface * | GetLinkedDepthStencil () const |
| bool | IsUpdateQueued () const |
| Return whether manual update queued. Called internally. | |
| void | ResetUpdateQueued () |
| Reset update queued flag. Called internally. | |
| Texture * | GetParentTexture () const |
| void * | GetSurface () const |
| Return Direct3D9 surface. | |
| void * | GetRenderTargetView () const |
| Return Direct3D11 rendertarget or depth-stencil view. Not valid on OpenGL. | |
| void * | GetReadOnlyView () const |
| Return Direct3D11 read-only depth-stencil view. May be null if not applicable. Not valid on OpenGL. | |
| unsigned | GetTarget () const |
| Return surface's OpenGL target. | |
| unsigned | GetRenderBuffer () const |
| Return OpenGL renderbuffer if created. | |
| bool | IsResolveDirty () const |
| void | SetResolveDirty (bool enable) |
| Set or clear the need resolve flag. Called internally by Graphics. | |
Public Member Functions inherited from Urho3D::RefCounted | |
| RefCounted () | |
| Construct. Allocate the reference count structure and set an initial self weak reference. | |
| virtual | ~RefCounted () |
| Destruct. Mark as expired and also delete the reference count structure if no outside weak references exist. | |
| RefCounted (const RefCounted &rhs)=delete | |
| Prevent copy construction. | |
| RefCounted & | operator= (const RefCounted &rhs)=delete |
| Prevent assignment. | |
| void | AddRef () |
| Increment reference count. Can also be called outside of a SharedPtr for traditional reference counting. | |
| void | ReleaseRef () |
| Decrement reference count and delete self if no more references. Can also be called outside of a SharedPtr for traditional reference counting. | |
| int | Refs () const |
| int | WeakRefs () const |
| RefCount * | RefCountPtr () |
| Return pointer to the reference count structure. | |
Private Attributes | |
| Texture * | parentTexture_ |
| Parent texture. | |
| union { | |
| void * surface_ | |
| void * renderTargetView_ | |
| unsigned renderBuffer_ | |
| }; | |
| union { | |
| void * readOnlyView_ | |
| unsigned target_ | |
| }; | |
| Vector< SharedPtr< Viewport > > | viewports_ |
| Viewports. | |
| WeakPtr< RenderSurface > | linkedRenderTarget_ |
| Linked color buffer. | |
| WeakPtr< RenderSurface > | linkedDepthStencil_ |
| Linked depth buffer. | |
| RenderSurfaceUpdateMode | updateMode_ {SURFACE_UPDATEVISIBLE} |
| Update mode for viewports. | |
| bool | updateQueued_ {} |
| Update queued flag. | |
| bool | resolveDirty_ {} |
| Multisampled resolve dirty flag. | |
Friends | |
| class | Texture2D |
| class | Texture2DArray |
| class | TextureCube |
Detailed Description
Color or depth-stencil surface that can be rendered into.
Member Function Documentation
◆ GetHeight()
| int Urho3D::RenderSurface::GetHeight | ( | ) | const |
Return height.
◆ GetLinkedDepthStencil()
|
inline |
Return linked depth-stencil surface.
◆ GetLinkedRenderTarget()
|
inline |
Return linked color rendertarget.
◆ GetNumViewports()
|
inline |
Return number of viewports.
◆ GetParentTexture()
|
inline |
Return parent texture.
◆ GetUpdateMode()
|
inline |
Return viewport update mode.
◆ GetUsage()
| TextureUsage Urho3D::RenderSurface::GetUsage | ( | ) | const |
Return usage.
◆ GetViewport()
| Viewport * Urho3D::RenderSurface::GetViewport | ( | unsigned | index | ) | const |
Return viewport by index.
◆ GetWidth()
| int Urho3D::RenderSurface::GetWidth | ( | ) | const |
Return width.
◆ IsResolveDirty()
|
inline |
Return whether multisampled rendertarget needs resolve.
◆ SetLinkedDepthStencil()
| void Urho3D::RenderSurface::SetLinkedDepthStencil | ( | RenderSurface * | depthStencil | ) |
Set linked depth-stencil surface.
◆ SetLinkedRenderTarget()
| void Urho3D::RenderSurface::SetLinkedRenderTarget | ( | RenderSurface * | renderTarget | ) |
Set linked color rendertarget.
◆ SetNumViewports()
| void Urho3D::RenderSurface::SetNumViewports | ( | unsigned | num | ) |
Set number of viewports.
◆ SetUpdateMode()
| void Urho3D::RenderSurface::SetUpdateMode | ( | RenderSurfaceUpdateMode | mode | ) |
Set viewport update mode. Default is to update when visible.
◆ SetViewport()
| void Urho3D::RenderSurface::SetViewport | ( | unsigned | index, |
| Viewport * | viewport | ||
| ) |
Set viewport.
Member Data Documentation
◆ readOnlyView_
| void* Urho3D::RenderSurface::readOnlyView_ |
Direct3D11 read-only depth-stencil view. Present only on depth-stencil surfaces.
◆ renderBuffer_
| unsigned Urho3D::RenderSurface::renderBuffer_ |
OpenGL renderbuffer name.
◆ renderTargetView_
| void* Urho3D::RenderSurface::renderTargetView_ |
Direct3D11 rendertarget or depth-stencil view.
◆ surface_
| void* Urho3D::RenderSurface::surface_ |
Direct3D9 surface.
◆ target_
| unsigned Urho3D::RenderSurface::target_ |
OpenGL target.
The documentation for this class was generated from the following files:
- Source/Urho3D/Graphics/RenderSurface.h
- Source/Urho3D/Graphics/OpenGL/OGLRenderSurface.cpp
- Source/Urho3D/Graphics/RenderSurface.cpp

Public Member Functions inherited from