![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <RenderSystem.hpp>


Public Member Functions | |
| C3D_API | RenderSystem (Engine &engine, AshPluginDescription desc, Extensions instanceExtensions={}, Extensions deviceExtensions={}) |
| Constructor. More... | |
| C3D_API | RenderSystem (Engine &engine, Renderer renderer, Extensions deviceExtensions={}) |
| Constructor. More... | |
| C3D_API void | pushScene (Scene *scene) |
| Pushes a scene on the stack. More... | |
| C3D_API void | popScene () |
| Pops a scene from the stack. More... | |
| C3D_API Scene * | getTopScene () const |
| C3D_API SpirVShader | compileShader (VkShaderStageFlagBits stage, castor::String const &name, ast::Shader const &shader) const |
| Compiles a shader module to the necessary shader language. More... | |
| C3D_API SpirVShader | compileShader (VkShaderStageFlagBits stage, castor::String const &name, castor::String const &glsl) const |
| Compiles a shader module to the necessary shader language. More... | |
| C3D_API SpirVShader | compileShader (ShaderModule const &module) const |
| Compiles a shader module to the necessary shader language. More... | |
| C3D_API castor::Matrix4x4f | getFrustum (float left, float right, float bottom, float top, float zNear, float zFar) const |
| Computes an frustum projection matrix. More... | |
| 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 |
| Computes an orthographic projection matrix. More... | |
| C3D_API castor::Matrix4x4f | getInfinitePerspective (float radiansFovY, float aspect, float zNear) const |
Getters. | |
| AshPluginDescription const & | getDescription () const |
| GpuInformations const & | getGpuInformations () const |
| castor::String | getRendererType () const |
| bool | hasDevice () const |
| RenderDevice const & | getRenderDevice () const |
| OverlayRendererSPtr | getOverlayRenderer () const |
| castor::Nanoseconds const & | getGpuTime () const |
| bool | hasSsbo () const |
| ashes::Instance const & | getInstance () const |
| VkPhysicalDeviceProperties const & | getProperties () const |
| VkPhysicalDeviceMemoryProperties const & | getMemoryProperties () const |
| VkPhysicalDeviceFeatures const & | getFeatures () const |
| ashes::PhysicalDevice const & | getPhysicalDevice () const |
| bool | hasFeature (GpuFeature feature) const |
| bool | hasStereoRendering () const |
| bool | hasShaderStorageBuffers () const |
| bool | hasShaderType (VkShaderStageFlagBits type) const |
| uint32_t | getValue (GpuMin index) const |
| uint32_t | getValue (GpuMax index) const |
| bool | hasLLPV () const |
| template<class Rep , class Period > | |
| void | incGpuTime (std::chrono::duration< Rep, Period > const &time) |
| void | resetGpuTime () |
Static Public Member Functions | |
| static C3D_API ashes::InstancePtr | createInstance (Engine &engine, AshPluginDescription const &desc, Extensions &instanceExtensions) |
| Creates a Vulkan instance usable with Castor3D. More... | |
| static C3D_API void | completeLayerNames (Engine const &engine, ashes::VkLayerPropertiesArray const &layers, ashes::StringArray &names) |
| Adds the instance layers names to the given names. More... | |
| C3D_API castor3d::RenderSystem::RenderSystem | ( | Engine & | engine, |
| AshPluginDescription | desc, | ||
| Extensions | instanceExtensions = {}, |
||
| Extensions | deviceExtensions = {} |
||
| ) |
Constructor.
| [in] | engine | The engine. |
| [in] | desc | The Ashes plugin description. |
| [in] | instanceExtensions | The instance extensions. |
| [in] | deviceExtensions | The device extensions. |
| C3D_API castor3d::RenderSystem::RenderSystem | ( | Engine & | engine, |
| Renderer | renderer, | ||
| Extensions | deviceExtensions = {} |
||
| ) |
Constructor.
| [in] | engine | The engine. |
| [in] | renderer | The selected renderer. |
| [in] | deviceExtensions | The device extensions. |
| C3D_API SpirVShader castor3d::RenderSystem::compileShader | ( | ShaderModule const & | module | ) | const |
Compiles a shader module to the necessary shader language.
| [in] | module | The shader to compile. |
| C3D_API SpirVShader castor3d::RenderSystem::compileShader | ( | VkShaderStageFlagBits | stage, |
| castor::String const & | name, | ||
| ast::Shader const & | shader | ||
| ) | const |
Compiles a shader module to the necessary shader language.
| [in] | stage | The shader stage. |
| [in] | name | The shader name. |
| [in] | shader | The shader to compile. |
| C3D_API SpirVShader castor3d::RenderSystem::compileShader | ( | VkShaderStageFlagBits | stage, |
| castor::String const & | name, | ||
| castor::String const & | glsl | ||
| ) | const |
Compiles a shader module to the necessary shader language.
| [in] | stage | The shader stage. |
| [in] | name | The shader name. |
| [in] | glsl | The shader to compile. |
|
static |
Adds the instance layers names to the given names.
| [in] | engine | The engine. |
| [in] | layers | The available layers. |
| [in,out] | names | The liste to fill. |
|
static |
Creates a Vulkan instance usable with Castor3D.
| [in] | engine | The engine. |
| [in] | desc | The Ashes plugin description. |
| [in] | instanceExtensions | The instance extensions. |
|
inline |
References castor3d::Renderer::desc.
Referenced by getRendererType(), and hasSsbo().

|
inline |
| 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.
| [in] | left,right | The left and right planes position. |
| [in] | top,bottom | The top and bottom planes position. |
| [in] | zNear,zFar | The near and far planes position. |
|
inline |
|
inline |
| C3D_API castor::Matrix4x4f castor3d::RenderSystem::getInfinitePerspective | ( | float | radiansFovY, |
| float | aspect, | ||
| float | zNear | ||
| ) | const |
Computes a perspective projection matrix with no far plane clipping.
| [in] | radiansFovY | The vertical aperture angle. |
| [in] | aspect | The width / height ratio. |
| [in] | zNear | The near plane position. |
|
inline |
References castor3d::Renderer::instance.
|
inline |
| 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.
| [in] | left,right | The left and right planes position. |
| [in] | top,bottom | The top and bottom planes position. |
| [in] | zNear,zFar | The near and far planes position. |
|
inline |
| C3D_API castor::Matrix4x4f castor3d::RenderSystem::getPerspective | ( | castor::Angle const & | fovy, |
| float | aspect, | ||
| float | zNear, | ||
| float | zFar | ||
| ) | const |
Computes a perspective projection matrix.
| [in] | fovy | The vertical aperture angle. |
| [in] | aspect | The width / height ratio. |
| [in] | zNear | The near plane position. |
| [in] | zFar | The far plane position. |
|
inline |
References castor3d::Renderer::gpu.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References castor3d::GpuInformations::hasShaderStorageBuffers().

|
inline |
|
inline |
|
inline |
References castor3d::GpuInformations::hasStereoRendering().

|
inline |
name Mutators.
| C3D_API void castor3d::RenderSystem::popScene | ( | ) |
Pops a scene from the stack.
Pushes a scene on the stack.
| [in] | scene | The scene |
|
inline |