Framebuffer creation parameters. More...
#include <kanzi/core.ui/platform/graphics_backend/gl/framebuffer.hpp>
Public Types | |
| enum | Status { StatusMissingColorAttachments, StatusMultipleRenderTargetsNotSupported, StatusAttachmentUnsupportedFormat, StatusInvalidFace, StatusInvalidMipmapLevel, StatusInvalidUsage, StatusSampleCountMismatch, StatusValid } |
| Status of Framebuffer creation parameters, returned as result of validate(). More... | |
Public Member Functions | |
| CreateInfo (Surface::Usage usage) | |
| void | setAttachment (AttachmentPoint attachmentPoint, const Attachment &attachment) |
| Set attachment, cloning existing attachment. More... | |
| void | setAttachment (AttachmentPoint attachmentPoint, SurfaceSharedPtr surface) |
| Set attachment for specified attachment point. More... | |
| void | setAttachment (AttachmentPoint attachmentPoint, TextureSharedPtr texture, unsigned int mipmapLevel) |
| Set attachment for specified attachment point. More... | |
| void | setAttachment (AttachmentPoint attachmentPoint, TextureSharedPtr texture, Surface::Face face, unsigned int mipmapLevel) |
| Set attachment for specified attachment point. More... | |
| SurfaceSharedPtr | getSurface (AttachmentPoint attachmentPoint) const |
| Get surface for specified attachment point. More... | |
| Attachment | getAttachment (AttachmentPoint attachmentPoint) const |
| Get attachment information for specified attachment point. More... | |
| Status | validate (Renderer *renderer) const |
| Perform validation of framebuffer creation parameters. More... | |
Public Attributes | |
| Surface::Usage | usage |
| How Framebuffer will be used. More... | |
| array< Attachment, AttachmentPointCount > | attachments |
Framebuffer creation parameters.
Status of Framebuffer creation parameters, returned as result of validate().
| Enumerator | |
|---|---|
| StatusMissingColorAttachments |
Color buffers must be attached without gaps in used attachment points. |
| StatusMultipleRenderTargetsNotSupported |
Multiple rendertargets are not supported by graphics device.
|
| StatusAttachmentUnsupportedFormat |
Attachment uses graphics format which is not supported. |
| StatusInvalidFace |
An attachment has non-existent cubemap face setting. |
| StatusInvalidMipmapLevel |
An attachment has non-existent mipmap level setting. |
| StatusInvalidUsage |
Requested Framebuffer usage is not valid. |
| StatusSampleCountMismatch |
Number of samples in creation parameters do not match. |
| StatusValid |
Framebuffer creation parameters are valid and can be used to create a new Framebuffer. |
|
explicit |
| void kanzi::Framebuffer::CreateInfo::setAttachment | ( | AttachmentPoint | attachmentPoint, |
| const Attachment & | attachment | ||
| ) |
Set attachment, cloning existing attachment.
| attachmentPoint | Attachment point to set. |
| attachment | Existing attachment. |
| void kanzi::Framebuffer::CreateInfo::setAttachment | ( | AttachmentPoint | attachmentPoint, |
| SurfaceSharedPtr | surface | ||
| ) |
Set attachment for specified attachment point.
The surface is assumed to be non-cubemap Texture or Renderbuffer. If surface is Texture, the base level will be used.
| attachmentPoint | Attachment point to set. |
| surface | Surface to place in the attachment point. This can be either Texture or Renderbuffer. |
| void kanzi::Framebuffer::CreateInfo::setAttachment | ( | AttachmentPoint | attachmentPoint, |
| TextureSharedPtr | texture, | ||
| unsigned int | mipmapLevel | ||
| ) |
Set attachment for specified attachment point.
| attachmentPoint | Attachment point to set. |
| texture | Texture to place in the attachment point. |
| mipmapLevel | Mipmap level of texture to place in the attachment point. |
| void kanzi::Framebuffer::CreateInfo::setAttachment | ( | AttachmentPoint | attachmentPoint, |
| TextureSharedPtr | texture, | ||
| Surface::Face | face, | ||
| unsigned int | mipmapLevel | ||
| ) |
Set attachment for specified attachment point.
| attachmentPoint | Attachment point to set. |
| texture | Texture to place in the attachment point. This should be a cubemap texture. |
| face | Cubemap face. |
| mipmapLevel | Mipmap level of texture to place in the attachment point. |
| SurfaceSharedPtr kanzi::Framebuffer::CreateInfo::getSurface | ( | AttachmentPoint | attachmentPoint | ) | const |
Get surface for specified attachment point.
| attachmentPoint | Attachment point to query. |
| Attachment kanzi::Framebuffer::CreateInfo::getAttachment | ( | AttachmentPoint | attachmentPoint | ) | const |
Get attachment information for specified attachment point.
| attachmentPoint | Attachment point to query. |
Perform validation of framebuffer creation parameters.
You can call validate() to see if framebuffer creation parameters are valid before you pass the creation parameters to Framebuffer::create().
| renderer | Renderer to validate with. |
| Surface::Usage kanzi::Framebuffer::CreateInfo::usage |
How Framebuffer will be used.
| array<Attachment, AttachmentPointCount> kanzi::Framebuffer::CreateInfo::attachments |