Internal structure for 3D rendering work. Created for each backbuffer and texture viewport, but not for shadow cameras.  
 More...
|  | 
|  | View (Context *context) | 
|  | Construct. 
 | 
|  | 
|  | ~View () override=default | 
|  | Destruct. 
 | 
|  | 
| bool | Define (RenderSurface *renderTarget, Viewport *viewport) | 
|  | Define with rendertarget and viewport. Return true if successful. 
 | 
|  | 
| void | Update (const FrameInfo &frame) | 
|  | Update and cull objects and construct rendering batches. 
 | 
|  | 
| void | Render () | 
|  | Render batches. 
 | 
|  | 
| Graphics * | GetGraphics () const | 
|  | Return graphics subsystem. 
 | 
|  | 
| Renderer * | GetRenderer () const | 
|  | Return renderer subsystem. 
 | 
|  | 
| Scene * | GetScene () const | 
|  | Return scene. 
 | 
|  | 
| Octree * | GetOctree () const | 
|  | Return octree. 
 | 
|  | 
| Camera * | GetCamera () const | 
|  | Return viewport camera. 
 | 
|  | 
| Camera * | GetCullCamera () const | 
|  | Return culling camera. Normally same as the viewport camera. 
 | 
|  | 
| const FrameInfo & | GetFrameInfo () const | 
|  | Return information of the frame being rendered. 
 | 
|  | 
| RenderSurface * | GetRenderTarget () const | 
|  | Return the rendertarget. 0 if using the backbuffer. 
 | 
|  | 
| bool | GetDrawDebug () const | 
|  | Return whether should draw debug geometry. 
 | 
|  | 
| const IntRect & | GetViewRect () const | 
|  | Return view rectangle. 
 | 
|  | 
| const IntVector2 & | GetViewSize () const | 
|  | Return view dimensions. 
 | 
|  | 
| const PODVector< Drawable * > & | GetGeometries () const | 
|  | Return geometry objects. 
 | 
|  | 
| const PODVector< Drawable * > & | GetOccluders () const | 
|  | Return occluder objects. 
 | 
|  | 
| const PODVector< Light * > & | GetLights () const | 
|  | Return lights. 
 | 
|  | 
| const Vector< LightBatchQueue > & | GetLightQueues () const | 
|  | Return light batch queues. 
 | 
|  | 
| OcclusionBuffer * | GetOcclusionBuffer () const | 
|  | Return the last used software occlusion buffer. 
 | 
|  | 
| unsigned | GetNumActiveOccluders () const | 
|  | Return number of occluders that were actually rendered. Occluders may be rejected if running out of triangles or if behind other occluders. 
 | 
|  | 
| View * | GetSourceView () const | 
|  | Return the source view that was already prepared. Used when viewports specify the same culling camera. 
 | 
|  | 
| void | SetGlobalShaderParameters () | 
|  | Set global (per-frame) shader parameters. Called by Batch and internally by View. 
 | 
|  | 
| void | SetCameraShaderParameters (Camera *camera) | 
|  | Set camera-specific shader parameters. Called by Batch and internally by View. 
 | 
|  | 
| void | SetCommandShaderParameters (const RenderPathCommand &command) | 
|  | Set command's shader parameters if any. Called internally by View. 
 | 
|  | 
| void | SetGBufferShaderParameters (const IntVector2 &texSize, const IntRect &viewRect) | 
|  | Set G-buffer offset and inverse size shader parameters. Called by Batch and internally by View. 
 | 
|  | 
| void | DrawFullscreenQuad (bool setIdentityProjection=false) | 
|  | Draw a fullscreen quad. Shaders and renderstates must have been set beforehand. Quad will be drawn to the middle of depth range, similarly to deferred directional lights. 
 | 
|  | 
| Texture * | FindNamedTexture (const String &name, bool isRenderTarget, bool isVolumeMap=false) | 
|  | Get a named texture from the rendertarget list or from the resource cache, to be either used as a rendertarget or texture binding. 
 | 
|  | 
|  | Object (Context *context) | 
|  | Construct. 
 | 
|  | 
|  | ~Object () override | 
|  | Destruct. Clean up self from event sender & receiver structures. 
 | 
|  | 
| virtual StringHash | GetType () const =0 | 
|  | 
| virtual const String & | GetTypeName () const =0 | 
|  | 
| virtual const TypeInfo * | GetTypeInfo () const =0 | 
|  | Return type info. 
 | 
|  | 
| virtual void | OnEvent (Object *sender, StringHash eventType, VariantMap &eventData) | 
|  | Handle event. 
 | 
|  | 
| bool | IsInstanceOf (StringHash type) const | 
|  | Check current instance is type of specified type. 
 | 
|  | 
| bool | IsInstanceOf (const TypeInfo *typeInfo) const | 
|  | Check current instance is type of specified type. 
 | 
|  | 
| template<typename T > | 
| bool | IsInstanceOf () const | 
|  | Check current instance is type of specified class. 
 | 
|  | 
| template<typename T > | 
| T * | Cast () | 
|  | Cast the object to specified most derived class. 
 | 
|  | 
| template<typename T > | 
| const T * | Cast () const | 
|  | Cast the object to specified most derived class. 
 | 
|  | 
| void | SubscribeToEvent (StringHash eventType, EventHandler *handler) | 
|  | Subscribe to an event that can be sent by any sender. 
 | 
|  | 
| void | SubscribeToEvent (Object *sender, StringHash eventType, EventHandler *handler) | 
|  | Subscribe to a specific sender's event. 
 | 
|  | 
| void | SubscribeToEvent (StringHash eventType, const std::function< void(StringHash, VariantMap &)> &function, void *userData=nullptr) | 
|  | Subscribe to an event that can be sent by any sender. 
 | 
|  | 
| void | SubscribeToEvent (Object *sender, StringHash eventType, const std::function< void(StringHash, VariantMap &)> &function, void *userData=nullptr) | 
|  | Subscribe to a specific sender's event. 
 | 
|  | 
| void | UnsubscribeFromEvent (StringHash eventType) | 
|  | Unsubscribe from an event. 
 | 
|  | 
| void | UnsubscribeFromEvent (Object *sender, StringHash eventType) | 
|  | Unsubscribe from a specific sender's event. 
 | 
|  | 
| void | UnsubscribeFromEvents (Object *sender) | 
|  | Unsubscribe from a specific sender's events. 
 | 
|  | 
| void | UnsubscribeFromAllEvents () | 
|  | Unsubscribe from all events. 
 | 
|  | 
| void | UnsubscribeFromAllEventsExcept (const PODVector< StringHash > &exceptions, bool onlyUserData) | 
|  | Unsubscribe from all events except those listed, and optionally only those with userdata (script registered events). 
 | 
|  | 
| void | SendEvent (StringHash eventType) | 
|  | Send event to all subscribers. 
 | 
|  | 
| void | SendEvent (StringHash eventType, VariantMap &eventData) | 
|  | Send event with parameters to all subscribers. 
 | 
|  | 
| VariantMap & | GetEventDataMap () const | 
|  | Return a preallocated map for event data. Used for optimization to avoid constant re-allocation of event data maps. 
 | 
|  | 
| template<typename... Args> | 
| void | SendEvent (StringHash eventType, Args... args) | 
|  | Send event with variadic parameter pairs to all subscribers. The parameter pairs is a list of paramID and paramValue separated by comma, one pair after another. 
 | 
|  | 
| Context * | GetContext () const | 
|  | Return execution context. 
 | 
|  | 
| const Variant & | GetGlobalVar (StringHash key) const | 
|  | 
| const VariantMap & | GetGlobalVars () const | 
|  | 
| void | SetGlobalVar (StringHash key, const Variant &value) | 
|  | 
| Object * | GetSubsystem (StringHash type) const | 
|  | Return subsystem by type. 
 | 
|  | 
| Object * | GetEventSender () const | 
|  | Return active event sender. Null outside event handling. 
 | 
|  | 
| EventHandler * | GetEventHandler () const | 
|  | Return active event handler. Null outside event handling. 
 | 
|  | 
| bool | HasSubscribedToEvent (StringHash eventType) const | 
|  | Return whether has subscribed to an event without specific sender. 
 | 
|  | 
| bool | HasSubscribedToEvent (Object *sender, StringHash eventType) const | 
|  | Return whether has subscribed to a specific sender's event. 
 | 
|  | 
| bool | HasEventHandlers () const | 
|  | Return whether has subscribed to any event. 
 | 
|  | 
| template<class T > | 
| T * | GetSubsystem () const | 
|  | Template version of returning a subsystem. 
 | 
|  | 
| const String & | GetCategory () const | 
|  | 
| void | SetBlockEvents (bool block) | 
|  | Block object from sending and receiving events. 
 | 
|  | 
| bool | GetBlockEvents () const | 
|  | Return sending and receiving events blocking status. 
 | 
|  | 
|  | 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 () | 
|  | 
| void | ReleaseRef () | 
|  | 
| int | Refs () const | 
|  | 
| int | WeakRefs () const | 
|  | 
| RefCount * | RefCountPtr () | 
|  | Return pointer to the reference count structure. 
 | 
|  | 
|  | 
|  | URHO3D_OBJECT (View, Object) | 
|  | 
| void | GetDrawables () | 
|  | Query the octree for drawable objects. 
 | 
|  | 
| void | GetBatches () | 
|  | Construct batches from the drawable objects. 
 | 
|  | 
| void | ProcessLights () | 
|  | Get lit geometries and shadowcasters for visible lights. 
 | 
|  | 
| void | GetLightBatches () | 
|  | Get batches from lit geometries and shadowcasters. 
 | 
|  | 
| void | GetBaseBatches () | 
|  | Get unlit batches. 
 | 
|  | 
| void | UpdateGeometries () | 
|  | Update geometries and sort batches. 
 | 
|  | 
| void | GetLitBatches (Drawable *drawable, LightBatchQueue &lightQueue, BatchQueue *alphaQueue) | 
|  | Get pixel lit batches for a certain light and drawable. 
 | 
|  | 
| void | ExecuteRenderPathCommands () | 
|  | Execute render commands. 
 | 
|  | 
| void | SetRenderTargets (RenderPathCommand &command) | 
|  | Set rendertargets for current render command. 
 | 
|  | 
| bool | SetTextures (RenderPathCommand &command) | 
|  | Set textures for current render command. Return whether depth write is allowed (depth-stencil not bound as a texture). 
 | 
|  | 
| void | RenderQuad (RenderPathCommand &command) | 
|  | Perform a quad rendering command. 
 | 
|  | 
| bool | IsNecessary (const RenderPathCommand &command) | 
|  | Check if a command is enabled and has content to render. To be called only after render update has completed for the frame. 
 | 
|  | 
| bool | CheckViewportRead (const RenderPathCommand &command) | 
|  | Check if a command reads the destination render target. 
 | 
|  | 
| bool | CheckViewportWrite (const RenderPathCommand &command) | 
|  | Check if a command writes into the destination render target. 
 | 
|  | 
| bool | CheckPingpong (unsigned index) | 
|  | Check whether a command should use pingponging instead of resolve from destination render target to viewport texture. 
 | 
|  | 
| void | AllocateScreenBuffers () | 
|  | Allocate needed screen buffers. 
 | 
|  | 
| void | BlitFramebuffer (Texture *source, RenderSurface *destination, bool depthWrite) | 
|  | Blit the viewport from one surface to another. 
 | 
|  | 
| void | UpdateOccluders (PODVector< Drawable * > &occluders, Camera *camera) | 
|  | Query for occluders as seen from a camera. 
 | 
|  | 
| void | DrawOccluders (OcclusionBuffer *buffer, const PODVector< Drawable * > &occluders) | 
|  | Draw occluders to occlusion buffer. 
 | 
|  | 
| void | ProcessLight (LightQueryResult &query, unsigned threadIndex) | 
|  | Query for lit geometries and shadow casters for a light. 
 | 
|  | 
| void | ProcessShadowCasters (LightQueryResult &query, const PODVector< Drawable * > &drawables, unsigned splitIndex) | 
|  | Process shadow casters' visibilities and build their combined view- or projection-space bounding box. 
 | 
|  | 
| void | SetupShadowCameras (LightQueryResult &query) | 
|  | Set up initial shadow camera view(s). 
 | 
|  | 
| void | SetupDirLightShadowCamera (Camera *shadowCamera, Light *light, float nearSplit, float farSplit) | 
|  | Set up a directional light shadow camera. 
 | 
|  | 
| void | FinalizeShadowCamera (Camera *shadowCamera, Light *light, const IntRect &shadowViewport, const BoundingBox &shadowCasterBox) | 
|  | Finalize shadow camera view after shadow casters and the shadow map are known. 
 | 
|  | 
| void | QuantizeDirLightShadowCamera (Camera *shadowCamera, Light *light, const IntRect &shadowViewport, const BoundingBox &viewBox) | 
|  | Quantize a directional light shadow camera view to eliminate swimming. 
 | 
|  | 
| bool | IsShadowCasterVisible (Drawable *drawable, BoundingBox lightViewBox, Camera *shadowCamera, const Matrix3x4 &lightView, const Frustum &lightViewFrustum, const BoundingBox &lightViewFrustumBox) | 
|  | Check visibility of one shadow caster. 
 | 
|  | 
| IntRect | GetShadowMapViewport (Light *light, int splitIndex, Texture2D *shadowMap) | 
|  | Return the viewport for a shadow map split. 
 | 
|  | 
| void | FindZone (Drawable *drawable) | 
|  | Find and set a new zone for a drawable when it has moved. 
 | 
|  | 
| Technique * | GetTechnique (Drawable *drawable, Material *material) | 
|  | Return material technique, considering the drawable's LOD distance. 
 | 
|  | 
| void | CheckMaterialForAuxView (Material *material) | 
|  | Check if material should render an auxiliary view (if it has a camera attached). 
 | 
|  | 
| void | SetQueueShaderDefines (BatchQueue &queue, const RenderPathCommand &command) | 
|  | Set shader defines for a batch queue if used. 
 | 
|  | 
| void | AddBatchToQueue (BatchQueue &queue, Batch &batch, Technique *tech, bool allowInstancing=true, bool allowShadows=true) | 
|  | Choose shaders for a batch and add it to queue. 
 | 
|  | 
| void | PrepareInstancingBuffer () | 
|  | Prepare instancing buffer by filling it with all instance transforms.  More... 
 | 
|  | 
| void | SetupLightVolumeBatch (Batch &batch) | 
|  | Set up a light volume rendering batch. 
 | 
|  | 
| bool | NeedRenderShadowMap (const LightBatchQueue &queue) | 
|  | Check whether a light queue needs shadow rendering. 
 | 
|  | 
| void | RenderShadowMap (const LightBatchQueue &queue) | 
|  | Render a shadow map. 
 | 
|  | 
| RenderSurface * | GetDepthStencil (RenderSurface *renderTarget) | 
|  | Return the proper depth-stencil surface to use for a rendertarget. 
 | 
|  | 
| RenderSurface * | GetRenderSurfaceFromTexture (Texture *texture, CubeMapFace face=FACE_POSITIVE_X) | 
|  | Helper function to get the render surface from a texture. 2D textures will always return the first face only. 
 | 
|  | 
| void | SendViewEvent (StringHash eventType) | 
|  | Send a view update or render related event through the Renderer subsystem. The parameters are the same for all of them. 
 | 
|  | 
| Zone * | GetZone (Drawable *drawable) | 
|  | Return the drawable's zone, or camera zone if it has override mode enabled. 
 | 
|  | 
| unsigned | GetLightMask (Drawable *drawable) | 
|  | Return the drawable's light mask, considering also its zone. 
 | 
|  | 
| unsigned | GetShadowMask (Drawable *drawable) | 
|  | Return the drawable's shadow mask, considering also its zone. 
 | 
|  | 
| unsigned long long | GetVertexLightQueueHash (const PODVector< Light * > &vertexLights) | 
|  | Return hash code for a vertex light queue. 
 | 
|  | 
Internal structure for 3D rendering work. Created for each backbuffer and texture viewport, but not for shadow cameras.