Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Static Public Member Functions | List of all members
castor3d::RenderSystem Class Reference

#include <RenderSystem.hpp>

Inheritance diagram for castor3d::RenderSystem:
Inheritance graph
[legend]
Collaboration diagram for castor3d::RenderSystem:
Collaboration graph
[legend]

Public Member Functions

C3D_API RenderSystem (Engine &engine, AshPluginDescription desc, Extensions instanceExtensions={}, Extensions deviceExtensions={})
 
C3D_API RenderSystem (Engine &engine, Renderer renderer, Extensions deviceExtensions={})
 
C3D_API SpirVShader compileShader (VkShaderStageFlagBits stage, castor::String const &name, ast::Shader const &shader, ast::EntryPointConfig const &entryPoint)
 
C3D_API SpirVShader compileShader (VkShaderStageFlagBits stage, castor::String const &name, castor::MbString const &glsl) const
 
C3D_API SpirVShader const & compileShader (ShaderModule &shaderModule)
 
C3D_API SpirVShader const & compileShader (ProgramModule &shaderModule, ast::EntryPointConfig const &entryPoint)
 
C3D_API castor::Matrix4x4f getFrustum (float left, float right, float bottom, float top, float zNear, float zFar) const
 
C3D_API castor::Matrix4x4f getPerspective (castor::Angle const &fovy, float aspect, float zNear, float zFar) const
 
C3D_API castor::Matrix4x4f getOrtho (float left, float right, float bottom, float top, float zNear, float zFar) const
 
C3D_API castor::Matrix4x4f getInfinitePerspective (castor::Angle const &fovy, float aspect, float zNear) const
 

Getters.

C3D_API Texture const & getPrefilteredBrdfTexture () const
 
AshPluginDescription const & getDescription () const noexcept
 
GpuInformations const & getGpuInformations () const noexcept
 
castor::String getRendererType () const noexcept
 
bool hasDevice () const noexcept
 
RenderDevicegetRenderDevice () const noexcept
 
bool hasSsbo () const noexcept
 
ashes::Instance const & getInstance () const noexcept
 
VkPhysicalDeviceProperties const & getProperties () const noexcept
 
VkPhysicalDeviceMemoryProperties const & getMemoryProperties () const noexcept
 
VkPhysicalDeviceFeatures const & getFeatures () const noexcept
 
ashes::PhysicalDevice const & getPhysicalDevice () const noexcept
 
bool hasFeature (GpuFeature feature) const noexcept
 
bool hasStereoRendering () const noexcept
 
bool hasShaderStorageBuffers () const noexcept
 
bool hasShaderType (VkShaderStageFlagBits type) const noexcept
 
uint32_t getValue (GpuMin index) const noexcept
 
uint32_t getValue (GpuMax index) const noexcept
 
bool hasLLPV () const noexcept
 
ashes::Buffer< castor::Point4f > const & getRandomStorage () const noexcept
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const
 

Static Public Member Functions

static C3D_API ashes::InstancePtr createInstance (Engine const &engine, AshPluginDescription const &desc, Extensions &instanceExtensions)
 
static C3D_API void completeLayerNames (Engine const &engine, ashes::VkLayerPropertiesArray const &layers, ashes::StringArray &names)
 

Additional Inherited Members

- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner)
 Constructor.
 

Constructor & Destructor Documentation

◆ RenderSystem() [1/2]

C3D_API castor3d::RenderSystem::RenderSystem ( Engine & engine,
AshPluginDescription desc,
Extensions instanceExtensions = {},
Extensions deviceExtensions = {} )

Constructor.

Parameters
[in]engineThe engine.
[in]descThe Ashes plugin description.
[in]instanceExtensionsThe instance extensions.
[in]deviceExtensionsThe device extensions.

◆ RenderSystem() [2/2]

C3D_API castor3d::RenderSystem::RenderSystem ( Engine & engine,
Renderer renderer,
Extensions deviceExtensions = {} )

Constructor.

Parameters
[in]engineThe engine.
[in]rendererThe selected renderer.
[in]deviceExtensionsThe device extensions.

Member Function Documentation

◆ compileShader() [1/4]

C3D_API SpirVShader const & castor3d::RenderSystem::compileShader ( ProgramModule & shaderModule,
ast::EntryPointConfig const & entryPoint )

Compiles a shader module to the necessary shader language.

Parameters
[in]shaderModuleThe shader to compile.
[in]entryPointThe shader entry point to compile.
Returns
The compiled shader.

◆ compileShader() [2/4]

C3D_API SpirVShader const & castor3d::RenderSystem::compileShader ( ShaderModule & shaderModule)

Compiles a shader module to the necessary shader language.

Parameters
[in]shaderModuleThe shader to compile.
Returns
The compiled shader.

◆ compileShader() [3/4]

C3D_API SpirVShader castor3d::RenderSystem::compileShader ( VkShaderStageFlagBits stage,
castor::String const & name,
ast::Shader const & shader,
ast::EntryPointConfig const & entryPoint )

Compiles a shader module to the necessary shader language.

Parameters
[in]stageThe shader stage.
[in]nameThe shader name.
[in]shaderThe shader to compile.
[in]entryPointThe shader entry point to compile.
Returns
The compiled shader.

◆ compileShader() [4/4]

C3D_API SpirVShader castor3d::RenderSystem::compileShader ( VkShaderStageFlagBits stage,
castor::String const & name,
castor::MbString const & glsl ) const

Compiles a shader module to the necessary shader language.

Parameters
[in]stageThe shader stage.
[in]nameThe shader name.
[in]glslThe shader to compile.
Returns
The compiled shader.

◆ completeLayerNames()

static C3D_API void castor3d::RenderSystem::completeLayerNames ( Engine const & engine,
ashes::VkLayerPropertiesArray const & layers,
ashes::StringArray & names )
static

Adds the instance layers names to the given names.

Parameters
[in]engineThe engine.
[in]layersThe available layers.
[in,out]namesThe liste to fill.

◆ createInstance()

static C3D_API ashes::InstancePtr castor3d::RenderSystem::createInstance ( Engine const & engine,
AshPluginDescription const & desc,
Extensions & instanceExtensions )
static

Creates a Vulkan instance usable with Castor3D.

Parameters
[in]engineThe engine.
[in]descThe Ashes plugin description.
[in]instanceExtensionsThe instance extensions.

◆ getDescription()

AshPluginDescription const & castor3d::RenderSystem::getDescription ( ) const
inlinenoexcept

References castor3d::Renderer::desc.

Referenced by getRendererType(), and hasSsbo().

Here is the caller graph for this function:

◆ getFeatures()

VkPhysicalDeviceFeatures const & castor3d::RenderSystem::getFeatures ( ) const
inlinenoexcept

◆ getFrustum()

C3D_API castor::Matrix4x4f castor3d::RenderSystem::getFrustum ( float left,
float right,
float bottom,
float top,
float zNear,
float zFar ) const

Computes an frustum projection matrix.

Parameters
[in]left,rightThe left and right planes position.
[in]top,bottomThe top and bottom planes position.
[in]zNear,zFarThe near and far planes position.

◆ getGpuInformations()

GpuInformations const & castor3d::RenderSystem::getGpuInformations ( ) const
inlinenoexcept

◆ getInfinitePerspective()

C3D_API castor::Matrix4x4f castor3d::RenderSystem::getInfinitePerspective ( castor::Angle const & fovy,
float aspect,
float zNear ) const

Computes a perspective projection matrix with no far plane clipping.

Parameters
[in]fovyThe vertical aperture angle.
[in]aspectThe width / height ratio.
[in]zNearThe near plane position.

◆ getInstance()

ashes::Instance const & castor3d::RenderSystem::getInstance ( ) const
inlinenoexcept

◆ getMemoryProperties()

VkPhysicalDeviceMemoryProperties const & castor3d::RenderSystem::getMemoryProperties ( ) const
inlinenoexcept

◆ getOrtho()

C3D_API castor::Matrix4x4f castor3d::RenderSystem::getOrtho ( float left,
float right,
float bottom,
float top,
float zNear,
float zFar ) const

Computes an orthographic projection matrix.

Parameters
[in]left,rightThe left and right planes position.
[in]top,bottomThe top and bottom planes position.
[in]zNear,zFarThe near and far planes position.

◆ getPerspective()

C3D_API castor::Matrix4x4f castor3d::RenderSystem::getPerspective ( castor::Angle const & fovy,
float aspect,
float zNear,
float zFar ) const

Computes a perspective projection matrix.

Parameters
[in]fovyThe vertical aperture angle.
[in]aspectThe width / height ratio.
[in]zNearThe near plane position.
[in]zFarThe far plane position.

◆ getPhysicalDevice()

ashes::PhysicalDevice const & castor3d::RenderSystem::getPhysicalDevice ( ) const
inlinenoexcept

◆ getPrefilteredBrdfTexture()

C3D_API Texture const & castor3d::RenderSystem::getPrefilteredBrdfTexture ( ) const

◆ getProperties()

VkPhysicalDeviceProperties const & castor3d::RenderSystem::getProperties ( ) const
inlinenoexcept

◆ getRandomStorage()

ashes::Buffer< castor::Point4f > const & castor3d::RenderSystem::getRandomStorage ( ) const
inlinenoexcept

◆ getRenderDevice()

RenderDevice & castor3d::RenderSystem::getRenderDevice ( ) const
inlinenoexcept

References CU_Require, and hasDevice().

Here is the call graph for this function:

◆ getRendererType()

castor::String castor3d::RenderSystem::getRendererType ( ) const
inlinenoexcept

References getDescription(), and castor::makeString().

Here is the call graph for this function:

◆ getValue() [1/2]

uint32_t castor3d::RenderSystem::getValue ( GpuMax index) const
inlinenoexcept

References castor3d::GpuInformations::getValue().

Here is the call graph for this function:

◆ getValue() [2/2]

uint32_t castor3d::RenderSystem::getValue ( GpuMin index) const
inlinenoexcept

References castor3d::GpuInformations::getValue().

Here is the call graph for this function:

◆ hasDevice()

bool castor3d::RenderSystem::hasDevice ( ) const
inlinenoexcept

Referenced by getRenderDevice().

Here is the caller graph for this function:

◆ hasFeature()

bool castor3d::RenderSystem::hasFeature ( GpuFeature feature) const
inlinenoexcept

References castor3d::GpuInformations::hasFeature().

Here is the call graph for this function:

◆ hasLLPV()

bool castor3d::RenderSystem::hasLLPV ( ) const
inlinenoexcept

◆ hasShaderStorageBuffers()

bool castor3d::RenderSystem::hasShaderStorageBuffers ( ) const
inlinenoexcept

References castor3d::GpuInformations::hasShaderStorageBuffers().

Here is the call graph for this function:

◆ hasShaderType()

bool castor3d::RenderSystem::hasShaderType ( VkShaderStageFlagBits type) const
inlinenoexcept

References castor3d::GpuInformations::hasShaderType().

Here is the call graph for this function:

◆ hasSsbo()

bool castor3d::RenderSystem::hasSsbo ( ) const
inlinenoexcept

References getDescription().

Here is the call graph for this function:

◆ hasStereoRendering()

bool castor3d::RenderSystem::hasStereoRendering ( ) const
inlinenoexcept

References castor3d::GpuInformations::hasStereoRendering().

Here is the call graph for this function:

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