-
Notifications
You must be signed in to change notification settings - Fork 0
Library APIs
In this section, get to know what client-end APIs exist with Radiant.h. These APIs typically belong to a namespace/singleton instance where the API functionality can be accessed (ex. Renderer::Begin). All APIs should be initialized and ready to use by the client upon the creation of a new child Application.
The Renderer is used to submit draw calls to Radiant's back-end rendering pipeline. Draw calls require a complete render context, or mesh, that needs to be configured in every draw call. This is done by calling Renderer::Begin(), the calling of any set of mesh configuration draw calls, and Renderer::End().
/* Render Draw Call Example */
Renderer::Begin(renderable.layer);
Renderer::SetModel(sprite.model);
Renderer::SetTransform(transform);
Renderer::SetTexture(renderable.texture);
Renderer::SetFillColor(renderable.fillColor);
Renderer::End();
All render draw calls are stored in a mesh buffer and submitted all at once with Renderer::Render(). (Note: Called internally at the end of the game loop)