Skip to content

Improve loading performance of DrawText operator #38

@glopesdev

Description

@glopesdev

The DrawText operator currently uses the Bonsai.Vision.Drawing namespace to synthesize an IplImage object which is then uploaded to the GPU for rasterization.

This introduces unpredictable delay on the first frame of render, and on every frame where parameters to the DrawText operator are changed. This jitter can be logged accurately but it would be preferable to minimize it as much as possible.

There are a few possible paths to explore:

  1. Pre-cache the first frame as early as possible, immediately on subscription, so that all cost can be paid before the render loop begins;
  2. Add operators allowing cache and storage of text images separately, so that we can effectively create a "load state" where all resources are fully constructed separately from rendering;
  3. Use an alternative approach to render dynamic text (e.g. font texture atlas, dear ImGUI, etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalRequest for a new feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions