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

GPU rendering #5

Open
nx10 opened this issue Sep 17, 2021 · 1 comment
Open

GPU rendering #5

nx10 opened this issue Sep 17, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@nx10
Copy link
Owner

nx10 commented Sep 17, 2021

Is your proposal related to a problem?

Raster graphics rendering is currently only possible via Cairo, which is CPU based. While there is a OpenGL based backend for Cairo it seems to be difficult to compile on Windows and not very optimized.

Describe the solution you'd like

Implement a custom low-level GPU renderer to accelerate raster graphics generation.
OpenGL 3.x should have the best adoption rate with acceptable features.
(Vulkan would be great but is definitely out of scope for now.)

Describe alternatives you've considered

  • Cairo OpenGL backend (cross platform difficulties, not optimized)
  • Skia (massive overhead, nightmare to compile)

Additional context

It might make sense to encapsulate the low level code in a seperate package to keep the httpgd repository smaller.

@nx10 nx10 added the enhancement New feature or request label Sep 17, 2021
@nx10 nx10 mentioned this issue Oct 25, 2021
4 tasks
@nx10 nx10 transferred this issue from nx10/httpgd Sep 17, 2022
@nx10
Copy link
Owner Author

nx10 commented Oct 20, 2022

Brief update:

Actively working on a prototype for this.

I am using modern OpenGL (3.3) + Harfbuzz & Freetype for text shaping and rasterization. Currently using GLFW for window creation and GLM for some math but will replace both with my own implementations after the prototype is done. Harfbuzz and Freetype will stay as I am not a madman (and we already depend on them anyway).

There is still a lot (!) to do but I wanted to share some very early screenshots of some of the first R plots rendered directly on a GPU (to my knowledge). Seeing R graphics in wireframe mode feels fun to me:

rsession-utf8_3P3bESjOXY
rsession-utf8_faMrMnum5g

rsession-utf8_3WOWfFkPJV
rsession-utf8_6uCIdDJVqj

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

No branches or pull requests

1 participant