Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Higher level interface on top of the whole frame rendering. More...
#include <Renderer.h>
Classes | |
class | Internals |
Struct CRendererInternals: Truly hide data that is supposed to be hidden in this structure so it won't even appear in header files. More... | |
struct | Stats |
Public Types | |
enum class | ScreenShotType { NONE , DEFAULT , BIG } |
Protected Member Functions | |
bool | ShouldRender () const |
void | RenderFrameImpl (const bool renderGUI, const bool renderLogger) |
void | RenderFrame2D (const bool renderGUI, const bool renderLogger) |
void | RenderScreenShot (const bool needsPresent) |
void | RenderBigScreenShot (const bool needsPresent) |
void | SetRenderPath (RenderPath rp) |
void | ReloadShaders () |
Protected Attributes | |
std::unique_ptr< Internals > | m |
int | m_Width = 0 |
int | m_Height = 0 |
Stats | m_Stats |
bool | m_ShouldPreloadResourcesBeforeNextFrame = false |
ScreenShotType | m_ScreenShotType = ScreenShotType::NONE |
Friends | |
class | CDecalRData |
class | CPatchRData |
class | CPUSkinnedModelVertexRenderer |
class | CRenderingOptions |
class | InstancingModelRenderer |
Additional Inherited Members | |
Static Public Member Functions inherited from Singleton< CRenderer > | |
static CRenderer & | GetSingleton () |
static CRenderer * | GetSingletonPtr () |
static bool | IsInitialised () |
Higher level interface on top of the whole frame rendering.
It does know what should be rendered and via which renderer but shouldn't know how to render a particular area, like UI or scene.
|
strong |
CRenderer::CRenderer | ( | Renderer::Backend::IDevice * | device | ) |
CRenderer::~CRenderer | ( | ) |
void CRenderer::BeginFrame | ( | ) |
void CRenderer::EndFrame | ( | ) |
CDebugRenderer & CRenderer::GetDebugRenderer | ( | ) |
Renderer::Backend::IDeviceCommandContext * CRenderer::GetDeviceCommandContext | ( | ) |
CFontManager & CRenderer::GetFontManager | ( | ) |
|
inline |
CPostprocManager & CRenderer::GetPostprocManager | ( | ) |
CSceneRenderer & CRenderer::GetSceneRenderer | ( | ) |
CShaderManager & CRenderer::GetShaderManager | ( | ) |
|
inline |
CTextureManager & CRenderer::GetTextureManager | ( | ) |
CTimeManager & CRenderer::GetTimeManager | ( | ) |
CVertexBufferManager & CRenderer::GetVertexBufferManager | ( | ) |
Renderer::Backend::IVertexInputLayout * CRenderer::GetVertexInputLayout | ( | const PS::span< const Renderer::Backend::SVertexAttributeFormat > | attributes | ) |
Returns a cached vertex input layout.
The renderer owns the layout to be able to share it between different clients. As backend should have as few different layouts as possible. The function isn't cheap so it should be called as rarely as possible. TODO: we need to make VertexArray less error prone by passing layout.
|
inline |
void CRenderer::MakeScreenShotOnNextFrame | ( | ScreenShotType | screenShotType | ) |
Makes a screenshot on the next RenderFrame according of the given screenshot type.
void CRenderer::MakeShadersDirty | ( | ) |
bool CRenderer::Open | ( | int | width, |
int | height | ||
) |
void CRenderer::PreloadResourcesBeforeNextFrame | ( | ) |
Performs a complete frame without presenting to force loading all needed resources.
It's used for the first frame on a game start. TODO: It might be better to preload resources without a complete frame rendering.
|
protected |
|
protected |
void CRenderer::RenderFrame | ( | bool | needsPresent | ) |
|
protected |
|
protected |
|
protected |
void CRenderer::Resize | ( | int | width, |
int | height | ||
) |
|
protected |
|
protected |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |