Slippers Engine
 
Loading...
Searching...
No Matches
Drawable Class Reference

Responsible for 3D Draw functions. More...

#include <Drawable.h>

Collaboration diagram for Drawable:
Collaboration graph

Protected Member Functions

void SubmitRegistration ()
 Called when wanting to show graphics objects on screen.
 
void SubmitDeregistration ()
 Called when wanting to hide graphics objects on screen.
 

Private Member Functions

virtual void Draw ()
 Fill this with code that occurs during the Draw phase.
 

Detailed Description

Responsible for 3D Draw functions.

Member Function Documentation

◆ Draw()

virtual void Drawable::Draw ( )
privatevirtual

Fill this with code that occurs during the Draw phase.

This function will be where you want to add render calls on your graphics objects. A GameObject can render multiple graphics objects in the Draw call.

Example:

void DemoObj::Draw() {
demoGraphicsObjOne->Render(SceneManager::GetCurrScene()->GetCurrCam());
demoGraphicsObjTwo->Render(SceneManager::GetCurrScene()->GetCurrCam());
}
static Scene * GetCurrScene()
Returns pointer to current scene.
Definition SceneManager.h:51

◆ SubmitDeregistration()

void Drawable::SubmitDeregistration ( )
protected

Called when wanting to hide graphics objects on screen.

Example:

void SubmitDeregistration()
Called when wanting to hide graphics objects on screen.
Definition Drawable.cpp:45

◆ SubmitRegistration()

void Drawable::SubmitRegistration ( )
protected

Called when wanting to show graphics objects on screen.

Example:

void SubmitRegistration()
Called when wanting to show graphics objects on screen.
Definition Drawable.cpp:37