clay icon indicating copy to clipboard operation
clay copied to clipboard

[Renderers] Extract Clay Renderer API into a separate header file

Open OleksiiBulba opened this issue 2 months ago • 1 comments

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.

OleksiiBulba avatar Dec 20 '24 16:12 OleksiiBulba