![]() |
Vireo
0.0
Vireo 3D Rendering Hardware Interface
|
Main abstraction class.
Manual page : The Vireo class
Public Member Functions | |
| virtual void | waitIdle () |
| virtual std::shared_ptr< SwapChain > | createSwapChain (ImageFormat format, const std::shared_ptr< const SubmitQueue > &presentQueue, void *windowHandle, PresentMode presentMode=PresentMode::VSYNC, uint32_t framesInFlight=2) const = 0 |
| virtual std::shared_ptr< SubmitQueue > | createSubmitQueue (CommandType commandType, const std::string &name="SubmitQueue") const = 0 |
| virtual std::shared_ptr< Fence > | createFence (bool createSignaled=false, const std::string &name="Fence") const = 0 |
| virtual std::shared_ptr< Semaphore > | createSemaphore (SemaphoreType type, const std::string &name="Semaphore") const = 0 |
| virtual std::shared_ptr< CommandAllocator > | createCommandAllocator (CommandType type) const = 0 |
| virtual std::shared_ptr< VertexInputLayout > | createVertexLayout (size_t size, const std::vector< VertexAttributeDesc > &attributesDescriptions) const = 0 |
| virtual std::shared_ptr< ShaderModule > | createShaderModule (const std::string &fileName) const = 0 |
| virtual std::shared_ptr< ShaderModule > | createShaderModule (const std::vector< char > &data) const = 0 |
| virtual std::shared_ptr< PipelineResources > | createPipelineResources (const std::vector< std::shared_ptr< DescriptorLayout >> &descriptorLayouts={}, const PushConstantsDesc &pushConstant={}, const std::string &name="PipelineResource") const = 0 |
| virtual std::shared_ptr< ComputePipeline > | createComputePipeline (const std::shared_ptr< PipelineResources > &pipelineResources, const std::shared_ptr< const ShaderModule > &shader, const std::string &name="ComputePipeline") const = 0 |
| virtual std::shared_ptr< GraphicPipeline > | createGraphicPipeline (const GraphicPipelineConfiguration &configuration, const std::string &name="GraphicPipeline") const = 0 |
| virtual std::shared_ptr< Buffer > | createBuffer (BufferType type, size_t size, size_t count=1, const std::string &name="Buffer") const = 0 |
| virtual std::shared_ptr< Image > | createImage (ImageFormat format, uint32_t width, uint32_t height, uint32_t mipLevels=1, uint32_t arraySize=1, const std::string &name="Image") const = 0 |
| virtual std::shared_ptr< Image > | createReadWriteImage (ImageFormat format, uint32_t width, uint32_t height, uint32_t mipLevels=1, uint32_t arraySize=1, const std::string &name="RWImage") const = 0 |
| virtual std::shared_ptr< RenderTarget > | createRenderTarget (ImageFormat format, uint32_t width, uint32_t height, RenderTargetType type=RenderTargetType::COLOR, ClearValue clearValue={}, uint32_t arraySize=1, MSAA msaa=MSAA::NONE, const std::string &name="RenderTarget") const = 0 |
| virtual std::shared_ptr< RenderTarget > | createRenderTarget (const std::shared_ptr< const SwapChain > &swapChain, ClearValue clearValue={}, MSAA msaa=MSAA::NONE, const std::string &name="RenderTarget") const = 0 |
| virtual std::shared_ptr< DescriptorLayout > | createDescriptorLayout (const std::string &name="DescriptorLayout") const = 0 |
| virtual std::shared_ptr< DescriptorLayout > | createSamplerDescriptorLayout (const std::string &name="createSamplerDescriptorLayout") const = 0 |
| std::shared_ptr< DescriptorLayout > | createDynamicUniformDescriptorLayout (const std::string &name="createDynamicUniformDescriptorLayout") const |
| virtual std::shared_ptr< DescriptorSet > | createDescriptorSet (const std::shared_ptr< const DescriptorLayout > &layout, const std::string &name="DescriptorSet") const = 0 |
| virtual std::shared_ptr< Sampler > | createSampler (Filter minFilter, Filter magFilter, AddressMode addressModeU, AddressMode addressModeV, AddressMode addressModeW, float minLod=0.0f, float maxLod=Sampler::LOD_CLAMP_NONE, bool anisotropyEnable=true, MipMapMode mipMapMode=MipMapMode::LINEAR, CompareOp compareOp=CompareOp::NEVER) const = 0 |
| virtual std::string | getShaderFileExtension () const = 0 |
| auto | getPhysicalDevice () const |
| auto | getDevice () const |
| auto | getInstance () const |
| virtual | ~Vireo () = default |
| Vireo () = default | |
| Vireo (Vireo &) = delete | |
| Vireo & | operator= (const Vireo &) = delete |
Static Public Member Functions | |
| static std::shared_ptr< Vireo > | create (Backend backend, uint32_t maxDirectX12Descriptors=3000, uint32_t maxDirectX12Samplers=100) |
| static bool | isBackendSupported (Backend backend) |
Protected Attributes | |
| std::shared_ptr< Instance > | instance |
| std::shared_ptr< PhysicalDevice > | physicalDevice |
| std::shared_ptr< Device > | device |
|
virtualdefault |
|
default |
|
delete |
|
static |
Creates a new Vireo class using the given backend.
|
pure virtual |
Creates a data buffer in VRAM. For types UNIFORM & TRANSFER the buffer will be created in host visible memory/upload heap type. For types VERTEX & INDEX the buffer will be created in device local memory/default heap type
| type | Type of buffer to create. |
| size | Size of one element in bytes |
| count | Number of elements |
| name | Object name for debug |
|
pure virtual |
Creates a command allocator (command pool) for a given command type
| type | Type of commands that will be used with command lists created from this allocator |
|
pure virtual |
Creates a compute pipeline
| pipelineResources | Resources for the shader |
| shader | The shader |
| name | Object name for debug |
|
pure virtual |
Creates an empty description layout.
| name | Object name for debug |
|
pure virtual |
Creates an empty descriptor set
| layout | Layout of the set |
| name | Object name for debug |
| std::shared_ptr<DescriptorLayout> createDynamicUniformDescriptorLayout | ( | const std::string & | name = "createDynamicUniformDescriptorLayout" | ) | const |
Creates an empty description layout for UNIFORM_DYNAMIX resources types
| name | Object name for debug |
|
pure virtual |
Creates a fence for CPU/GPU synchronization
| createSignaled | Create the fence in signaled state |
| name | Object name for debug |
|
pure virtual |
Creates a graphic pipeline. At least one shader must be used.
| configuration | Pipeline configuration |
| name | Object name for debug |
|
pure virtual |
Creates a read-only image in VRAM
| format | Pixel format |
| width | With in pixels |
| height | Height in pixels |
| mipLevels | Number of mips levels |
| arraySize | Number of layers/array size |
| name | Object name for debug |
|
pure virtual |
Creates a pipeline resources description. Describe resources that can be accessed by the shaders associated with the future pipelines.
| descriptorLayouts | Descriptions of the resources (can be empty) |
| pushConstant | Description of an optional push constant |
| name | Object name for debug |
|
pure virtual |
Creates a read/write image in VRAM
| format | Pixel format |
| width | With in pixels |
| height | Height in pixels |
| mipLevels | Number of mips levels |
| arraySize | Number of layers/array size |
| name | Object name for debug |
|
pure virtual |
Creates a read/write image in VRAM for use as a render target with a similar format as a swap chain.
| swapChain | Swap chain to copy format & size from |
| clearValue | A clear value used for optimized clearing. Must be the same as the clear value used when rendering. |
| msaa | Number of samples for MSAA. A value of 1 disables MSAA. |
| name | Object name for debug |
|
pure virtual |
Creates a read/write image in VRAM for use as a render target
| format | Pixel format |
| width | With in pixels |
| height | Height in pixels |
| type | Type of render target use |
| clearValue | A clear value used for optimized clearing. Must be the same as the clear value used when rendering. |
| arraySize | Number of layers of the image |
| msaa | Number of samples for MSAA. A value of 1 disables MSAA. |
| name | Object name for debug |
|
pure virtual |
Creates a texture sampler.
|
pure virtual |
Creates an empty description layout for SAMPLER resources types
| name | Object name for debug |
|
pure virtual |
Creates a semaphore for GPU/GPU synchronization
| type | Semaphore type |
| name | Object name for debug |
|
pure virtual |
Load a compiled shader and creates a shader module
| fileName | File name without the extension. The file name extension must be .spvfor Vulkan et .dxil for DirectX |
|
pure virtual |
Load a compiled shader and creates a shader module from an input stream
Creates a shader module
|
pure virtual |
Creates a submission queue
| commandType | Type of commands that will be used with this queue. |
| name | Objet name for debug |
|
pure virtual |
Creates a swap chain.
| format | Color format of the swap chain images |
| presentQueue | Queue used to present the swap chain images in the window surface |
| presentMode | Presentation mode |
| windowHandle | Opaque window handle to present the swap chain images |
| framesInFlight | Number of concurrent swap chain images |
|
pure virtual |
Creates an input vertex layout from a description
| size | Size in bytes of a vertex |
| attributesDescriptions | Description of all the vertex attributes |
|
inline |
|
inline |
|
inline |
Returns the physical device/adapter object
|
pure virtual |
|
static |
Returns true if the backend API is supported
|
delete |
|
inlinevirtual |
|
protected |
|
protected |
|
protected |