LukasBanana / LLGL

Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal
BSD 3-Clause "New" or "Revised" License
2.05k stars 139 forks source link

Would you give me some suggestion about how the command buffers work or any link would be helpful. ? #35

Closed vedon closed 5 years ago

LukasBanana commented 5 years ago

The CommandBuffer interface mimics the API of D3D12, Vulkan, and Metal. For these APIs, the interface merely forwards the calls to underlying API (for the most part). For D3D11 and OpenGL, the implementation emulates the features of a command buffer. The default command buffer is very similar to the "Immediate Context" in D3D11, where the calls are submitted to the driver immediately. A "deferred" or "secondary" command buffer must guarantee to store commands in a buffer before they are submitted to the GPU. D3D12, Vulkan, and Metal support this feature natively, but for D3D11 and OpenGL it must be emulated, i.e. the actual API calls are executed when CommandQueue::Submit is called.

vedon commented 5 years ago

thx ,that helps me a lot .LOL.