Framebuffer attachment state.
More...
#include <kanzi/core.ui/graphics3d/composition_target_render_pass.hpp>
|
| bool | attachTarget (Renderer &renderer, const AttachmentPoint &attachmentPoint, Surface::APIAttachment attachment) |
| | Attaches a single attachment point to output index. More...
|
| |
| void | attachTarget (Renderer &renderer, const Texture &texture, Surface::APIAttachment attachment) |
| | Attaches a single texture to output index. More...
|
| |
| void | attachTarget (Renderer &renderer, const Renderbuffer &renderbuffer, Surface::APIAttachment attachment) |
| | Attaches a single renderbuffer to output index. More...
|
| |
| void | clear () |
| | Clear internal state. More...
|
| |
| | Framebuffer ()=default |
| | Default constructor. More...
|
| |
| unsigned int | getDrawBufferCount () const |
| | Gets the draw buffer count for binding. More...
|
| |
| unsigned int | getNativeHandle () const |
| | Gets the native framebuffer handle. More...
|
| |
| bool | hasAttachedDepthTarget () const |
| | Indicates whether a depth target has been bound. More...
|
| |
| void | recreateFramebuffer (Domain *domain) |
| | Recreates the framebuffer based on existing textures. More...
|
| |
| bool | update (Domain *domain, array< TextureSharedPtr, 4u > &colorTexture, array< RenderbufferSharedPtr, 4u > &colorRenderbuffer, TextureSharedPtr depthTexture, RenderbufferSharedPtr depthStencilRenderbuffer) |
| | Updates the framebuffer state. More...
|
| |
Framebuffer attachment state.
Handles the attachment state for a framebuffer that combines multiple textures and renderbuffers into one render context.
| kanzi::CompositionTargetRenderPass::Framebuffer::Framebuffer |
( |
| ) |
|
|
explicitdefault |
| unsigned int kanzi::CompositionTargetRenderPass::Framebuffer::getDrawBufferCount |
( |
| ) |
const |
|
inline |
Gets the draw buffer count for binding.
- Returns
- Draw buffer count.
| unsigned int kanzi::CompositionTargetRenderPass::Framebuffer::getNativeHandle |
( |
| ) |
const |
|
inline |
Gets the native framebuffer handle.
- Returns
- Native handle ID.
| void kanzi::CompositionTargetRenderPass::Framebuffer::clear |
( |
| ) |
|
Clear internal state.
After calling this function, the framebuffer does not own any GPU resources.
Updates the framebuffer state.
Recreates the framebuffer when any attachment state changes:
- If color renderbuffer is specified, selects it instead of texture.
- If depth/stencil renderbuffer is specified, selects it instead of texture.
- Does not check the size or format. Requires the given textures and renderbuffers to have the correct settings.
- Parameters
-
| domain | Domain to use. |
| colorTexture0 | First color texture target. |
| colorRenderbuffer0 | First color renderbuffer target. |
| colorTexture1 | Second color texture target. |
| colorRenderbuffer1 | Second color renderbuffer target. |
| colorTexture2 | Third color texture target. |
| colorRenderbuffer2 | Third color renderbuffer target. |
| colorTexture3 | Fourth color texture target. |
| colorRenderbuffer3 | Fourth color renderbuffer target. |
| depthTexture | Depth texture target. |
| depthRequired | Indicates whether depth is required (if depth texture not specified). |
| stencilRequired | Indicates whether stencil is required. |
- Returns
- If the framebuffer was recreated true, otherwise false.
| void kanzi::CompositionTargetRenderPass::Framebuffer::recreateFramebuffer |
( |
Domain * |
domain | ) |
|
Recreates the framebuffer based on existing textures.
- Parameters
-
Attaches a single attachment point to output index.
Favors renderbuffer.
- Parameters
-
| renderer | Renderer to use. |
| attachmentPoint | Attachment point input (texture or renderbuffer). |
| attachment | Surface attachment target. Color buffer index or depth buffer. |
- Returns
- If any target was attached true, otherwise false.
Attaches a single texture to output index.
- Parameters
-
| renderer | Renderer to use. |
| texture | Color texture to attach. |
| attachment | Surface attachment target. Color buffer index or depth buffer. |
Attaches a single renderbuffer to output index.
- Parameters
-
| renderer | Renderer to use. |
| renderbuffer | Attachment point to attach. |
| attachment | Surface attachment target. Color buffer index or depth buffer. |
| bool kanzi::CompositionTargetRenderPass::Framebuffer::hasAttachedDepthTarget |
( |
| ) |
const |
|
inline |
Indicates whether a depth target has been bound.
Returns true if a depth texture is attached or a depth renderbuffer exists.
- Returns
- If a depth target is bound, true, otherwise false.
| array<AttachmentPoint, 4> kanzi::CompositionTargetRenderPass::Framebuffer::m_colorAttachments |
|
protected |
Array of color attachments.
| TextureSharedPtr kanzi::CompositionTargetRenderPass::Framebuffer::m_depthTexture |
|
protected |
Depth/stencil renderbuffer.
| unsigned int kanzi::CompositionTargetRenderPass::Framebuffer::m_drawBufferCount |
|
protected |
Number of draw buffers in use after last update.
The documentation for this class was generated from the following file: