ezEngine Release 26.3
Loading...
Searching...
No Matches
ezRenderWorld Class Reference

#include <RenderWorld.h>

Classes

struct  CameraConfig
 

Static Public Member Functions

static ezViewHandle CreateView (const char *szName, ezView *&out_pView)
 
static void DeleteView (const ezViewHandle &hView)
 
static bool TryGetView (const ezViewHandle &hView, ezView *&out_pView)
 
static ezViewGetViewByUsageHint (ezCameraUsageHint::Enum usageHint, ezCameraUsageHint::Enum alternativeUsageHint=ezCameraUsageHint::None, const ezWorld *pWorld=nullptr)
 Searches for an ezView with the desired usage hint or alternative usage hint.
 
static void AddMainView (const ezViewHandle &hView)
 
static void RemoveMainView (const ezViewHandle &hView)
 
static void ClearMainViews ()
 
static ezArrayPtr< ezViewHandleGetMainViews ()
 
static bool IsRenderingScheduled ()
 
static void CacheRenderData (const ezView &view, const ezGameObjectHandle &hOwnerObject, const ezComponentHandle &hOwnerComponent, ezUInt16 uiComponentVersion, ezArrayPtr< ezInternal::RenderDataCacheEntry > cacheEntries)
 
static void DeleteAllCachedRenderData ()
 Deletes all cached render data globally.
 
static void DeleteCachedRenderData (const ezGameObjectHandle &hOwnerObject, const ezComponentHandle &hOwnerComponent)
 Deletes cached render data for a specific component.
 
static void DeleteCachedRenderDataForObject (const ezGameObject *pOwnerObject)
 Deletes cached render data for a game object.
 
static void DeleteCachedRenderDataForObjectRecursive (const ezGameObject *pOwnerObject)
 Recursively deletes cached render data for a game object and all its children.
 
static void ResetRenderDataCache (ezView &ref_view)
 Resets the render data cache for a specific view.
 
static ezArrayPtr< const ezInternal::RenderDataCacheEntryGetCachedRenderData (const ezView &view, const ezGameObjectHandle &hOwner, ezUInt16 uiComponentVersion)
 Retrieves cached render data if available and still valid.
 
static void AddViewToRender (const ezViewHandle &hView)
 
static void ExtractMainViews ()
 
static void Render (ezRenderContext *pRenderContext)
 
static void BeginFrame ()
 
static void EndFrame ()
 
static const ezEvent< const ezRenderWorldExtractionEvent &, ezMutex > & GetExtractionEvent ()
 
static const ezEvent< const ezRenderWorldRenderEvent &, ezMutex > & GetRenderEvent ()
 
static bool GetUseMultithreadedRendering ()
 
static EZ_ALWAYS_INLINE void ResetFrameCounter ()
 Resets the frame counter to zero. Only for test purposes !
 
static EZ_ALWAYS_INLINE ezUInt64 GetFrameCounter ()
 
static EZ_FORCE_INLINE ezUInt32 GetDataIndexForExtraction ()
 
static EZ_FORCE_INLINE ezUInt32 GetDataIndexForRendering ()
 
static bool IsRenderingThread ()
 

Static Public Attributes

static ezEvent< ezView *, ezMutexs_ViewCreatedEvent
 
static ezEvent< ezView *, ezMutexs_ViewDeletedEvent
 

Friends

class ezView
 
class ezRenderPipeline
 

Render To Texture

static ezEvent< void * > s_CameraConfigsModifiedEvent
 
static void BeginModifyCameraConfigs ()
 
static void EndModifyCameraConfigs ()
 
static void ClearCameraConfigs ()
 
static void SetCameraConfig (const char *szName, const CameraConfig &config)
 
static const CameraConfigFindCameraConfig (const char *szName)
 

Detailed Description

Central hub for rendering operations and view management.

Manages views, render data extraction, and rendering execution. Handles double-buffering of render data when multithreaded rendering is enabled. Provides events for hooking into various stages of the rendering pipeline.

Member Function Documentation

◆ CacheRenderData()

void ezRenderWorld::CacheRenderData ( const ezView view,
const ezGameObjectHandle hOwnerObject,
const ezComponentHandle hOwnerComponent,
ezUInt16  uiComponentVersion,
ezArrayPtr< ezInternal::RenderDataCacheEntry cacheEntries 
)
static

Caches render data for an object to avoid re-extraction if unchanged.

Cached render data needs to be deleted/invalidated manually if any data changes.

◆ Render()

void ezRenderWorld::Render ( ezRenderContext pRenderContext)
static

NOTE: (Only Applies When Tracy is Enabled.)Tracy Seems to declare Timers in the same scope, so dual profile macros can throw: '__tracy_scoped_zone' : redefinition; multitple initalization, so we must scope the two events.


The documentation for this class was generated from the following files: