Skip to content

Commit

Permalink
Readme: Add BeginFrame and PresentFrame to the example code (#683)
Browse files Browse the repository at this point in the history
* docs: add BeginFrame and PresentFrame to the example code.

* Some rephrasing, use backend procedures, move BeginFrame down

---------

Co-authored-by: Michael Ragazzon <[email protected]>
  • Loading branch information
std-microblock and mikke89 authored Oct 6, 2024
1 parent 14bf5fc commit 1c14a7c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,17 @@ int main(int argc, char** argv)
// modified and added elements, or changed data in data bindings.
context->Update();

// Prepare the application for rendering, such as by clearing the window. This calls
// into the RmlUi backend interface, replace with your own procedures as appropriate.
Backend::BeginFrame();
// Render the user interface. All geometry and other rendering commands are now
// submitted through the render interface.
context->Render();

// Present the rendered content, such as by swapping the swapchain. This calls into
// the RmlUi backend interface, replace with your own procedures as appropriate.
Backend::PresentFrame();
}

Rml::Shutdown();
Expand Down

0 comments on commit 1c14a7c

Please sign in to comment.