Raito 0.1
Loading...
Searching...
No Matches
Raito::Renderer Namespace Reference

Namespaces

namespace  OpenGL
 

Classes

class  Camera
 
struct  CameraParameters
 
struct  FrameBufferAttachmentData
 
struct  FrameBufferData
 
struct  FrameBufferTextureData
 
struct  RenderSurface
 
struct  RHI
 
class  Shader
 
struct  ShaderFileData
 
class  Surface
 

Enumerations

enum class  API : u8 { NONE = 0 , D3D12 , OPENGL , COUNT }
 Renderer Api enumerator. More...
 
enum class  FrameBufferTextureFormat {
  None = 0 , RGBA8 , RGBA16F , RGBA ,
  RED_INTEGER , DEPTH24STENCIL8 , DEPTH32F , Depth = DEPTH24STENCIL8 ,
  DepthF = DEPTH32F
}
 
enum class  LightTechnique { Forward = 0 , Deferred , DeferredPlus }
 
enum  EngineShader : u32 {
  FORWARD = 0 , G_BUFFER , DEFERRED , DEFERRED_POINT_LIGHT ,
  DEFERRED_DIRECTIONAL_LIGHT , SKYBOX , GAUSSIAN_BLUR , EQUIRECTANGULAR_TO_CUBEMAP ,
  IRRADIANCE , POST_PROCESS , BLOOM_DOWN_SAMPLE , BLOOM_UP_SAMPLE ,
  DEPTH , SSAO , SSAO_BLUR , DOWN_SAMPLE_REPROJECT ,
  VISIBILITY_BUFFER , COPY_DEPTH , DRAW_COMMAND , PREFILTER ,
  BRDF , DEFERRED_AMBIENT , DEFERRED_PLUS_COMBINE , ENGINE_SHADER_MAX
}
 

Functions

bool SetPlatformInterface (API api)
 
bool Initialize ()
 
void Shutdown ()
 
API GetCurrentAPI ()
 
Surface CreateSurface (SysWindow *window)
 
void RemoveSurface (u32 id)
 
ShaderFileData GetFileData (EngineShader id)
 
const std::vector< Shader * > & GetAllShaders ()
 
u32 CompileShader (const ShaderFileData &data)
 
u32 AddMesh (Assets::Mesh *mesh)
 
void RemoveMesh (u32 id)
 
u32 AddTexture (Assets::Texture *texture, ubyte *data)
 
void RemoveTexture (u32 id)
 
u32 AddMaterial (const Assets::PbrMaterial &material)
 
void SetMaterialValue (u32 id, const Assets::PbrMaterial material)
 
void RemoveMaterial (u32 id)
 
const char * GetEngineShadersPath (API API)
 
LightTechnique GetCurrentRenderType ()
 
void SetRenderType (LightTechnique technique)
 
CameraGetMainCamera ()
 
void SetSSAO (bool value)
 
void SetBloom (bool value)
 
void SetParallaxMapping (bool value)
 
void SetShadows (bool value)
 
void EnableCulling (bool value)
 
void EnableDebugAABB (bool value)
 

Enumeration Type Documentation

◆ API

enum class Raito::Renderer::API : u8
strong

Renderer Api enumerator.

Enumerator
NONE 
D3D12 
OPENGL 
COUNT 

◆ EngineShader

Enumerator
FORWARD 
G_BUFFER 
DEFERRED 
DEFERRED_POINT_LIGHT 
DEFERRED_DIRECTIONAL_LIGHT 
SKYBOX 
GAUSSIAN_BLUR 
EQUIRECTANGULAR_TO_CUBEMAP 
IRRADIANCE 
POST_PROCESS 
BLOOM_DOWN_SAMPLE 
BLOOM_UP_SAMPLE 
DEPTH 
SSAO 
SSAO_BLUR 
DOWN_SAMPLE_REPROJECT 
VISIBILITY_BUFFER 
COPY_DEPTH 
DRAW_COMMAND 
PREFILTER 
BRDF 
DEFERRED_AMBIENT 
DEFERRED_PLUS_COMBINE 
ENGINE_SHADER_MAX 

◆ FrameBufferTextureFormat

Enumerator
None 
RGBA8 
RGBA16F 
RGBA 
RED_INTEGER 
DEPTH24STENCIL8 
DEPTH32F 
Depth 
DepthF 

◆ LightTechnique

Enumerator
Forward 
Deferred 
DeferredPlus 

Function Documentation

◆ AddMaterial()

u32 Raito::Renderer::AddMaterial ( const Assets::PbrMaterial & material)

Creates a CPU material to then uploaded when applied to a mesh

Parameters
materialThe PBR material used
Returns
The id of the material on the renderer

◆ AddMesh()

u32 Raito::Renderer::AddMesh ( Assets::Mesh * mesh)

Creates a mesh and uploads it to the GPU

Parameters
meshCPU mesh to be uploaded
Returns
The id of the GPU mesh data

◆ AddTexture()

u32 Raito::Renderer::AddTexture ( Assets::Texture * texture,
ubyte * data )

Creates a texture on the GPU and uploads the data

Parameters
textureA CPU texture containing the metadata of the texture
dataThe actual bytes that compose the texture
Returns
The id of the generated texture

◆ CompileShader()

NODISCARD u32 Raito::Renderer::CompileShader ( const ShaderFileData & data)

Compiles the shader provided

Parameters
dataContains the information of the shader file
Returns
The id of the compiled shader

◆ CreateSurface()

NODISCARD Surface Raito::Renderer::CreateSurface ( SysWindow * window)

Create surface for window

Parameters
windowThe window to create the surface
Returns
The created surface

◆ EnableCulling()

void Raito::Renderer::EnableCulling ( bool value)

◆ EnableDebugAABB()

void Raito::Renderer::EnableDebugAABB ( bool value)

◆ GetAllShaders()

NODISCARD const std::vector< Shader * > & Raito::Renderer::GetAllShaders ( )

Get all the compiled shaders

Returns
A reference list of the compiled shaders

◆ GetCurrentAPI()

NODISCARD API Raito::Renderer::GetCurrentAPI ( )

Renderer graphics API getter

Returns
Current graphics API

◆ GetCurrentRenderType()

NODISCARD LightTechnique Raito::Renderer::GetCurrentRenderType ( )

◆ GetEngineShadersPath()

NODISCARD const char * Raito::Renderer::GetEngineShadersPath ( API API)

Get the location of compiled engine shaders relative to the executable The path is for the graphics API that's currently in use.

Parameters
APIThe desired graphics API path
Returns
The folder name

◆ GetFileData()

NODISCARD ShaderFileData Raito::Renderer::GetFileData ( EngineShader id)

Get shader file data

Parameters
idShader ID
Returns
The shader file data

◆ GetMainCamera()

NODISCARD Camera & Raito::Renderer::GetMainCamera ( )

◆ Initialize()

bool Raito::Renderer::Initialize ( )

Renderer initialization function

Returns
the success

◆ RemoveMaterial()

void Raito::Renderer::RemoveMaterial ( u32 id)

Removes a material from the renderer

Parameters
idof the material

◆ RemoveMesh()

void Raito::Renderer::RemoveMesh ( u32 id)

Removes the given mesh from the GPU

Parameters
idof the GPU mesh

◆ RemoveSurface()

void Raito::Renderer::RemoveSurface ( u32 id)

Remove a surface

Parameters
idThe id of the surface

◆ RemoveTexture()

void Raito::Renderer::RemoveTexture ( u32 id)

Removes a texture from the GPU

Parameters
idof the texture on the CPU

◆ SetBloom()

void Raito::Renderer::SetBloom ( bool value)

◆ SetMaterialValue()

void Raito::Renderer::SetMaterialValue ( u32 id,
const Assets::PbrMaterial material )

Sets a material value using raw data Similar to memcpy()

Parameters
idof the material
nameof the value to change
datato copy to
sizeof the data in bytes

◆ SetParallaxMapping()

void Raito::Renderer::SetParallaxMapping ( bool value)

◆ SetPlatformInterface()

bool Raito::Renderer::SetPlatformInterface ( API api)

Sets the platform interface

Parameters
apiThe desired api to be used
Returns
If the platform is implemented

◆ SetRenderType()

void Raito::Renderer::SetRenderType ( LightTechnique technique)

◆ SetShadows()

void Raito::Renderer::SetShadows ( bool value)

◆ SetSSAO()

void Raito::Renderer::SetSSAO ( bool value)

◆ Shutdown()

void Raito::Renderer::Shutdown ( )

Renderer shutdown function Releases all renderer objects