Pyrogenesis
trunk
|
#include <Device.h>
Public Member Functions | |
CDevice () | |
~CDevice () override | |
Backend | GetBackend () const override |
const std::string & | GetName () const override |
const std::string & | GetVersion () const override |
const std::string & | GetDriverInformation () const override |
const std::vector< std::string > & | GetExtensions () const override |
void | Report (const ScriptRequest &rq, JS::HandleValue settings) override |
std::unique_ptr< IDeviceCommandContext > | CreateCommandContext () override |
std::unique_ptr< IGraphicsPipelineState > | CreateGraphicsPipelineState (const SGraphicsPipelineStateDesc &pipelineStateDesc) override |
Creates a graphics pipeline state. More... | |
std::unique_ptr< IVertexInputLayout > | CreateVertexInputLayout (const PS::span< const SVertexAttributeFormat > attributes) override |
Creates a vertex input layout. More... | |
std::unique_ptr< ITexture > | CreateTexture (const char *name, const ITexture::Type type, const uint32_t usage, const Format format, const uint32_t width, const uint32_t height, const Sampler::Desc &defaultSamplerDesc, const uint32_t MIPLevelCount, const uint32_t sampleCount) override |
std::unique_ptr< ITexture > | CreateTexture2D (const char *name, const uint32_t usage, const Format format, const uint32_t width, const uint32_t height, const Sampler::Desc &defaultSamplerDesc, const uint32_t MIPLevelCount=1, const uint32_t sampleCount=1) override |
std::unique_ptr< IFramebuffer > | CreateFramebuffer (const char *name, SColorAttachment *colorAttachment, SDepthStencilAttachment *depthStencilAttachment) override |
std::unique_ptr< IBuffer > | CreateBuffer (const char *name, const IBuffer::Type type, const uint32_t size, const bool dynamic) override |
std::unique_ptr< IShaderProgram > | CreateShaderProgram (const CStr &name, const CShaderDefines &defines) override |
bool | AcquireNextBackbuffer () override |
Acquires a backbuffer for rendering a frame. More... | |
IFramebuffer * | GetCurrentBackbuffer (const AttachmentLoadOp, const AttachmentStoreOp, const AttachmentLoadOp, const AttachmentStoreOp) override |
Returns a framebuffer for the current backbuffer with the required attachment operations. More... | |
void | Present () override |
Presents the backbuffer to the swapchain queue to be flipped on a screen. More... | |
void | OnWindowResize (const uint32_t width, const uint32_t height) override |
Should be called on window surface resize. More... | |
bool | IsTextureFormatSupported (const Format format) const override |
bool | IsFramebufferFormatSupported (const Format format) const override |
Format | GetPreferredDepthStencilFormat (const uint32_t usage, const bool depth, const bool stencil) const override |
Returns the most suitable format for the usage. More... | |
const Capabilities & | GetCapabilities () const override |
Public Member Functions inherited from Renderer::Backend::IDevice | |
virtual | ~IDevice () |
Protected Attributes | |
std::string | m_Name |
std::string | m_Version |
std::string | m_DriverInformation |
std::vector< std::string > | m_Extensions |
std::unique_ptr< IFramebuffer > | m_Backbuffer |
Capabilities | m_Capabilities {} |
Renderer::Backend::Dummy::CDevice::CDevice | ( | ) |
|
overridedefault |
|
overridevirtual |
Acquires a backbuffer for rendering a frame.
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Implements Renderer::Backend::IDevice.
|
overridevirtual |
The color attachment and the depth-stencil attachment should not be nullptr at the same time. There should not be many different clear colors along all color attachments for all framebuffers created for the device.
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Creates a graphics pipeline state.
It's a caller responsibility to guarantee a lifespan of IShaderProgram stored in the description.
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Creates a vertex input layout.
It's recommended to use as few different layouts as posible.
Implements Renderer::Backend::IDevice.
|
inlineoverridevirtual |
Implements Renderer::Backend::IDevice.
|
inlineoverridevirtual |
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Returns a framebuffer for the current backbuffer with the required attachment operations.
It should not be called if the last AcquireNextBackbuffer call returned false.
It's guaranteed that for the same acquired backbuffer this function returns a framebuffer with the same attachments and properties except load and store operations.
Implements Renderer::Backend::IDevice.
|
inlineoverridevirtual |
Implements Renderer::Backend::IDevice.
|
inlineoverridevirtual |
Implements Renderer::Backend::IDevice.
|
inlineoverridevirtual |
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Returns the most suitable format for the usage.
Returns Format::UNDEFINED if there is no such format.
Implements Renderer::Backend::IDevice.
|
inlineoverridevirtual |
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Should be called on window surface resize.
It's the device owner responsibility to call that function. Shouldn't be called during rendering to an acquired backbuffer.
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Presents the backbuffer to the swapchain queue to be flipped on a screen.
Should be called only if the last AcquireNextBackbuffer call returned true.
Implements Renderer::Backend::IDevice.
|
overridevirtual |
Implements Renderer::Backend::IDevice.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |