Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add *optional* resolve attachments to "RenderTarget" interface #46

Closed
LukasBanana opened this issue Sep 13, 2019 · 1 comment
Closed
Assignees
Labels
feature request Requested features and TODO lists reminder

Comments

@LukasBanana
Copy link
Owner

LukasBanana commented Sep 13, 2019

Instead of automatic generation of multi-sampled attachments that get resolved into the actual render target attachments, the user should be able to specify their custom multi-sampled textures. For OpenGL, a Texture that has not the BindFlags::Sampled flag bit, a renderbuffer should be used internally, which is currently only done in GLRenderTarget for the auto.-generated multi-sampled attachments. This feature should be optional, though, and not required for convenience.

Before:

struct RenderTargetDescriptor
{
    const RenderPass*                   renderPass          = nullptr;
    Extent2D                            resolution;
    std::uint32_t                       samples             = 1;
    bool                                customMultiSampling = false;
    std::vector<AttachmentDescriptor>   attachments;
};

After:

struct RenderTargetDescriptor
{
    const RenderPass*       renderPass                      = nullptr;
    Extent2D                resolution;
    AttachmentDescriptor    colorAttachments[8];
    AttachmentDescriptor    resolveAttachments[8];
    AttachmentDescriptor    depthStencilAttachment;
};

The samples parameter is taken from the specified (or default) render pass, i.e. RenderPassDescriptor::samples.

@LukasBanana LukasBanana added reminder feature request Requested features and TODO lists labels Sep 13, 2019
@LukasBanana LukasBanana self-assigned this Sep 13, 2019
@LukasBanana LukasBanana added this to To Do in LLGL Project Sep 15, 2019
@LukasBanana
Copy link
Owner Author

Fixed with 13b8af5.

LLGL Project automation moved this from To Do to Completed May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requested features and TODO lists reminder
Projects
LLGL Project
  
Completed
Development

No branches or pull requests

1 participant