Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract Clay Renderer API into a separate header file #65

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

OleksiiBulba
Copy link
Contributor

In order to not depend on the specific renderer I suggest extracting renderer functions into its own header api file. Here what I did:

  • Extracted clay_renderer_raylib.h;
  • Modified Raylib and Cairo renderers to follow renderer api;

For Clay_Renderer_Initialize I've created an opaque struct type Clay_Renderer_Data so each renderer can populate its own config: for Raylib it's just window dimensions, title, and flags, for Cairo it's cairo_t type.

I'm not sure if it's ok to modify Cairo renderer, as it has own License notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant