You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To create a xlib surface, you need to provide a X's Display, a Drawable (a Window or Pixmap) and a Visual (a kind of image format). How to get them? SDL2 should provide it via the info structs.
As a preliminar test, I created a LibX11 as a duplicate of LibC but defined these methods:
I added a draft demo of the surface working in a branch that has "93-" as prefix.
It worked on my Debian with wayland. It draws directly to the main window. It doesn't make sense to invest time on this right now. To draw on a separate image (not the window), we should implement 2 functions: https://tronche.com/gui/x/xlib/pixmap-and-cursor/pixmap.html
Related to #92 and #91. There seems to exist a x11 backend for cairo, that allows user to create a platform-specific surface that I guess may be optimized, at least, for some scenarios: https://www.cairographics.org/manual/cairo-XLib-Surfaces.html
This is a demo: https://github.com/msteinert/cairo-demo/blob/master/cairo-demo-x11.c
To create a xlib surface, you need to provide a X's Display, a Drawable (a Window or Pixmap) and a Visual (a kind of image format). How to get them? SDL2 should provide it via the info structs.
As a preliminar test, I created a LibX11 as a duplicate of LibC but defined these methods:
The width and height were right, when executed on a Workspace:
This should be enough to try the cairo-xlib surface create function.
The text was updated successfully, but these errors were encountered: