CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::RendererUtility Class Reference

A class that contains general utility methods for the renderer. More...

#include <CeresEngine/Renderer/RendererUtility.hpp>

Static Public Member Functions

static Matrix4 getCubeMapProjection (double near=0.1, double far=10.0)
 Gets the cube map projection matrix.
 
static const Array< Matrix4, 6 > & getCubeMapViews ()
 An array of views for cube map projections.
 
static const Matrix4 & getCubeMapView (UInt32 layer)
 Gets the cube map projection view matrix for the given layer.
 
static GPUVertexFormat createVertexFormat (const VertexDeclaration &vertexDeclaration)
 Converts the VertexDeclaration into a GPUVertexFormat for a shader.
 
static GPUVertexFormat createVertexFormat (const VertexBufferLayout &layout)
 
static const GPUVertexFormatgetDefaultMeshVertexFormat ()
 
static GPUBufferSize getBindlessBufferAlignment (GPUDevice &device)
 Gets the optimal bindless buffer alignment for consecutive objects.
 
static GPUBufferSize getBindlessBufferAlignment (const GPUDevicePtr &device)
 Gets the optimal bindless buffer alignment for consecutive objects.
 

Detailed Description

A class that contains general utility methods for the renderer.

Member Function Documentation

◆ createVertexFormat() [1/2]

static GPUVertexFormat CeresEngine::RendererUtility::createVertexFormat ( const VertexBufferLayout layout)
static

◆ createVertexFormat() [2/2]

static GPUVertexFormat CeresEngine::RendererUtility::createVertexFormat ( const VertexDeclaration vertexDeclaration)
static

Converts the VertexDeclaration into a GPUVertexFormat for a shader.

Parameters
vertexDeclarationThe vertex declaration to be used.

◆ getBindlessBufferAlignment() [1/2]

static GPUBufferSize CeresEngine::RendererUtility::getBindlessBufferAlignment ( const GPUDevicePtr device)
inlinestatic

Gets the optimal bindless buffer alignment for consecutive objects.

Parameters
deviceThe device to compute the optimal alignment for.

◆ getBindlessBufferAlignment() [2/2]

static GPUBufferSize CeresEngine::RendererUtility::getBindlessBufferAlignment ( GPUDevice device)
static

Gets the optimal bindless buffer alignment for consecutive objects.

Parameters
deviceThe device to compute the optimal alignment for.

◆ getCubeMapProjection()

static Matrix4 CeresEngine::RendererUtility::getCubeMapProjection ( double  near = 0.1,
double  far = 10.0 
)
static

Gets the cube map projection matrix.

Parameters
nearThe near plane. 0.1 by default.
farThe far plane. 10.0 by default.
Returns
A projection matrix for cube maps.

◆ getCubeMapView()

static const Matrix4 & CeresEngine::RendererUtility::getCubeMapView ( UInt32  layer)
static

Gets the cube map projection view matrix for the given layer.

Parameters
layerThe layer to get the view matrix for.

◆ getCubeMapViews()

static const Array< Matrix4, 6 > & CeresEngine::RendererUtility::getCubeMapViews ( )
static

An array of views for cube map projections.

◆ getDefaultMeshVertexFormat()

static const GPUVertexFormat & CeresEngine::RendererUtility::getDefaultMeshVertexFormat ( )
static

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