-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
We need efficient rendering without exposing the underlying graphical APIs
The Rendering API is split into two parts:
<GFX/Pipeline.hpp>- Core functionality that includes setup and drawing operations. This is not exposed to the user.<Magnet/Rendering.hpp>- Publicly exposed functionality that the user interacts with to define custom rendering.
Commands
Run arbitrary Graphics API code, like setting global state, or rendering something under a Shader program.
DrawMeshCommand: Includes the mesh to be drawn, shaderID and uniform buffer information for updating and binding a uniform buffer.
Command Buffer
Useful for overlaying, debug drawing, etc...
Implement a Circular buffer (fixed-size) of N Commands, each Command should hold a ShaderID and enough information for the rendering system to perform the action (e.g., mesh, shader params).
- For performance, the queue should be sorted by
ShaderID, to minimize switching of shaders - Allow changing global state (e.g. To render on-top rather than depth)
uint16_tis probably a reasonable range, honestly if we're surpassing a couple thousand commands, we'd probably be doing something very wrong.
Metadata
Metadata
Assignees
Labels
No labels