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

Graphics-team's work-in-progress SDL3 GPU renderer. More...

#include <Renderer.hpp>

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

Public Member Functions

bool supports (RendererFeature feature) const override
 Return true iff this renderer implements the given feature.
 
bool init (SDL_Window *window) override
 
bool init (SDL_Window *window, SDL_GPUDevice *sharedDevice)
 
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 *) override
 
int loadSceneModel (const char *, glm::vec3, float, bool) override
 
int uploadSceneModel (const LoadedModel &) override
 
bool setVSync (bool) override
 
void updateModelMeshVertices (int, int, const ModelVertex *, Uint32) override
 
void setEntityRenderList (std::vector< EntityRenderCmd >) override
 
void setPointLights (std::vector< PointLight >) override
 
void setModelEmissive (int, glm::vec4) override
 
void setWeaponViewmodel (const WeaponViewmodel &) override
 
void requestScreenshot (const std::string &) override
 
int modelCount () const override
 
- Public Member Functions inherited from IRenderer
virtual ~IRenderer ()=default
 

Detailed Description

Graphics-team's work-in-progress SDL3 GPU renderer.

Implements IRenderer but only a handful of methods are meaningful today (init, drawFrame, quit). Everything else returns a no-op / sentinel; supports(...) reflects the truth so HybridRenderer routes unimplemented calls back to the legacy renderer.

As each feature comes online here, flip its entry on in supports(...) and remove the corresponding pass-through from the legacy renderer when ready.

Shaders: shaders/projective.vert + shaders/normal.frag (compiled GLSL → SPIR-V at build time via glslc/glslangValidator).

Member Function Documentation

◆ drawFrame()

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

Implements IRenderer.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCamera()

const Camera & NewRenderer::getCamera ( ) const
inlineoverridevirtual

Implements IRenderer.

Here is the caller graph for this function:

◆ getDevice()

SDL_GPUDevice * NewRenderer::getDevice ( ) const
inlineoverridevirtual

Implements IRenderer.

Here is the caller graph for this function:

◆ getShaderFormat()

SDL_GPUShaderFormat NewRenderer::getShaderFormat ( ) const
inlineoverridevirtual

Implements IRenderer.

Here is the caller graph for this function:

◆ init() [1/2]

bool NewRenderer::init ( SDL_Window *  window)
overridevirtual

Implements IRenderer.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init() [2/2]

bool NewRenderer::init ( SDL_Window *  window,
SDL_GPUDevice *  sharedDevice 
)

◆ loadSceneModel()

int NewRenderer::loadSceneModel ( const char *  ,
glm::vec3  ,
float  ,
bool   
)
inlineoverridevirtual

Implements IRenderer.

Here is the caller graph for this function:

◆ modelCount()

int NewRenderer::modelCount ( ) const
inlineoverridevirtual

Implements IRenderer.

Here is the caller graph for this function:

◆ quit()

void NewRenderer::quit ( )
overridevirtual

Implements IRenderer.

Here is the caller graph for this function:

◆ requestScreenshot()

void NewRenderer::requestScreenshot ( const std::string &  )
inlineoverridevirtual

Implements IRenderer.

Here is the caller graph for this function:

◆ setEntityRenderList()

void NewRenderer::setEntityRenderList ( std::vector< EntityRenderCmd )
inlineoverridevirtual

Implements IRenderer.

Here is the caller graph for this function:

◆ setModelEmissive()

void NewRenderer::setModelEmissive ( int  ,
glm::vec4   
)
inlineoverridevirtual

Implements IRenderer.

◆ setParticleSystem()

void NewRenderer::setParticleSystem ( ParticleSystem )
inlineoverridevirtual

Implements IRenderer.

Here is the caller graph for this function:

◆ setPointLights()

void NewRenderer::setPointLights ( std::vector< PointLight )
inlineoverridevirtual

Implements IRenderer.

Here is the caller graph for this function:

◆ setVSync()

bool NewRenderer::setVSync ( bool  )
inlineoverridevirtual

Implements IRenderer.

Here is the caller graph for this function:

◆ setWeaponViewmodel()

void NewRenderer::setWeaponViewmodel ( const WeaponViewmodel )
inlineoverridevirtual

Implements IRenderer.

Here is the caller graph for this function:

◆ supports()

bool NewRenderer::supports ( RendererFeature  feature) const
overridevirtual

Return true iff this renderer implements the given feature.

Implements IRenderer.

Here is the caller graph for this function:

◆ updateModelMeshVertices()

void NewRenderer::updateModelMeshVertices ( int  ,
int  ,
const ModelVertex ,
Uint32   
)
inlineoverridevirtual

Implements IRenderer.

Here is the caller graph for this function:

◆ uploadSceneModel()

int NewRenderer::uploadSceneModel ( const LoadedModel )
inlineoverridevirtual

Implements IRenderer.

Here is the caller graph for this function:

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