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

[Renderers] 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.

@nicbarker
Copy link
Owner

Hello, apologies for the delay, and thank you for this work! This is a great initiative, but it will be important to make sure we really get it right, so I'll leave this one open until we get a couple more renderers into the codebase and we can really see what the shared API surface will look like 🙂

@nicbarker nicbarker changed the title Extract Clay Renderer API into a separate header file [Renderers] Extract Clay Renderer API into a separate header file Dec 25, 2024
@nicbarker nicbarker added the enhancement New feature or request label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants