Closed LukasBanana closed 6 years ago
Why not adding concept of command encoder, maybe have the render pass command encoder and naturally you would support parallel command encoders on metal backend, what do you think? I'm adding something similar here https://github.com/amerkoleci/alimer/blob/master/Source/Alimer/Graphics/CommandBuffer.h
First of all: thanks for your suggestion :)
I currently have no plans for adding support for multi threading (if that's what you mean by parallel command encoders). This is very tricky especially on the OpenGL backend. It's on my TODO list, but not scheduled yet.
Right now, the interface of LLGL is under heavy construction. But every change I make, has the consequence that I have to update all the five backends that I'm maintaining.
Moreover, I'm trying to keep the number of interfaces that are required to submit draw calls as low as possible. Adding another interface for a "command encoder" is currently not what I'm looking for.
Done with a625707.
Metal has no function to clear the framebuffer attachments on demand. They can only be cleared when a new render-pass begins.
The same functionality is provided in Vulkan, even though it provides the functionality to clear the color attachments on demand, too.
The new
RenderPass
interface will be used for theGraphicsPipelineDescriptor
structure instead of theRenderTarget
interface to specfiy the color attachment formats.Proposal:
The render pass will replace the
SetRenderTarget
functions andRenderContext
will finally inherit fromRenderTarget
:Before:
After: