Skip to content

Rendering Pipeline #16

@IgorAlexey

Description

@IgorAlexey

We need efficient rendering without exposing the underlying graphical APIs

The Rendering API is split into two parts:

  1. <GFX/Pipeline.hpp> - Core functionality that includes setup and drawing operations. This is not exposed to the user.
  2. <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_t is 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
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions