group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
HybridRenderer Class Reference

#include <HybridRenderer.hpp>

Inheritance diagram for HybridRenderer:
[legend]
Collaboration diagram for HybridRenderer:
[legend]

Public Member Functions

 HybridRenderer ()
 
bool supports (RendererFeature feature) const override
 Return true iff this renderer implements the given feature.
 
bool init (SDL_Window *window) override
 
void drawFrame (glm::vec3 eye, float yaw, float pitch, float roll) override
 
void quit () override
 
SDL_GPUDevice * getDevice () const override
 
SDL_GPUShaderFormat getShaderFormat () const override
 
const CameragetCamera () const override
 
void setParticleSystem (ParticleSystem *ps) override
 
int loadSceneModel (const char *filename, glm::vec3 pos, float scale, bool flipUVs=false) override
 
int uploadSceneModel (const LoadedModel &model) override
 
bool setVSync (bool enabled) override
 
void updateModelMeshVertices (int modelIndex, int meshIndex, const ModelVertex *vertices, Uint32 vertexCount) override
 
void setEntityRenderList (std::vector< EntityRenderCmd > cmds) override
 
void setPointLights (std::vector< PointLight > lights) override
 
void setModelEmissive (int modelIndex, glm::vec4 emissiveFactor) override
 
void setWeaponViewmodel (const WeaponViewmodel &vm) override
 
void requestScreenshot (const std::string &path) override
 
int modelCount () const override
 
Rendererlegacy ()
 Direct access to the legacy renderer instance, needed by DebugUI::buildLightingUI / buildSkyboxUI which reach into the legacy renderer's public lighting/skybox fields.
 
const Rendererlegacy () const
 
NewRenderernext ()
 Direct access to the new renderer instance (not normally needed).
 
const NewRenderernext () const
 
- Public Member Functions inherited from IRenderer
virtual ~IRenderer ()=default
 

Static Public Member Functions

static constexpr SDL_GPUTextureFormat getHdrFormat ()
 HDR render target format (RGBA16F).
 

Public Attributes

int & ssrMode
 Convenience aliases for fields Game reaches into directly.
 
RenderTogglestoggles
 Alias of legacy_.toggles.
 

Constructor & Destructor Documentation

◆ HybridRenderer()

HybridRenderer::HybridRenderer ( )

Member Function Documentation

◆ drawFrame()

void HybridRenderer::drawFrame ( glm::vec3  eye,
float  yaw,
float  pitch,
float  roll 
)
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ getCamera()

const Camera & HybridRenderer::getCamera ( ) const
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ getDevice()

SDL_GPUDevice * HybridRenderer::getDevice ( ) const
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ getHdrFormat()

static constexpr SDL_GPUTextureFormat HybridRenderer::getHdrFormat ( )
inlinestaticconstexpr

HDR render target format (RGBA16F).

Pass-through to the legacy renderer's static constant so existing call sites keep working.

Here is the call graph for this function:

◆ getShaderFormat()

SDL_GPUShaderFormat HybridRenderer::getShaderFormat ( ) const
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ init()

bool HybridRenderer::init ( SDL_Window *  window)
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ legacy() [1/2]

Renderer & HybridRenderer::legacy ( )
inline

Direct access to the legacy renderer instance, needed by DebugUI::buildLightingUI / buildSkyboxUI which reach into the legacy renderer's public lighting/skybox fields.

◆ legacy() [2/2]

const Renderer & HybridRenderer::legacy ( ) const
inline

◆ loadSceneModel()

int HybridRenderer::loadSceneModel ( const char *  filename,
glm::vec3  pos,
float  scale,
bool  flipUVs = false 
)
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ modelCount()

int HybridRenderer::modelCount ( ) const
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ next() [1/2]

NewRenderer & HybridRenderer::next ( )
inline

Direct access to the new renderer instance (not normally needed).

◆ next() [2/2]

const NewRenderer & HybridRenderer::next ( ) const
inline

◆ quit()

void HybridRenderer::quit ( )
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ requestScreenshot()

void HybridRenderer::requestScreenshot ( const std::string &  path)
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ setEntityRenderList()

void HybridRenderer::setEntityRenderList ( std::vector< EntityRenderCmd cmds)
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ setModelEmissive()

void HybridRenderer::setModelEmissive ( int  modelIndex,
glm::vec4  emissiveFactor 
)
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ setParticleSystem()

void HybridRenderer::setParticleSystem ( ParticleSystem ps)
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ setPointLights()

void HybridRenderer::setPointLights ( std::vector< PointLight lights)
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ setVSync()

bool HybridRenderer::setVSync ( bool  enabled)
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ setWeaponViewmodel()

void HybridRenderer::setWeaponViewmodel ( const WeaponViewmodel vm)
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ supports()

bool HybridRenderer::supports ( RendererFeature  feature) const
overridevirtual

Return true iff this renderer implements the given feature.

Implements IRenderer.

◆ updateModelMeshVertices()

void HybridRenderer::updateModelMeshVertices ( int  modelIndex,
int  meshIndex,
const ModelVertex vertices,
Uint32  vertexCount 
)
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

◆ uploadSceneModel()

int HybridRenderer::uploadSceneModel ( const LoadedModel model)
overridevirtual

Implements IRenderer.

Here is the call graph for this function:

Member Data Documentation

◆ ssrMode

int& HybridRenderer::ssrMode

Convenience aliases for fields Game reaches into directly.

These reference the legacy renderer's state so existing call sites keep working verbatim. When the new renderer grows equivalent state, these can be routed differently. Alias of legacy_.ssrMode.

◆ toggles

RenderToggles& HybridRenderer::toggles

Alias of legacy_.toggles.


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