mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-10 03:13:28 +00:00
Unfinished Wayland PR (#1)
moved from the github repo. current progress: <img width="389" alt="image.png" src="attachments/6a2cb365-7348-44b4-8fa7-9980df965a67"> Other notes: - took the opportunity to remove MwLLSetBackground which I was told was deprecated - Updated .gitignore to more accurately cover/remove example binaries - Uses OpenGL as the backend. - New LL function for swapping buffers, MwLLEndDraw - [TODO] Uses weak linking for all libraries so that systems that don't support Wayland or even have it installed can launch without it. Reviewed-on: https://gitea.nishi.boats/pyrite-dev/milsko/pulls/1 Co-authored-by: IoIxD <alphaproject217@gmail.com> Co-committed-by: IoIxD <alphaproject217@gmail.com>
This commit is contained in:
@@ -25,7 +25,8 @@ typedef void* MwLLPixmap;
|
||||
|
||||
enum MwLLBackends {
|
||||
MwLLBackendX11 = 0,
|
||||
MwLLBackendGDI
|
||||
MwLLBackendGDI,
|
||||
MwLLBackendWayland,
|
||||
};
|
||||
|
||||
struct _MwLLCommon {
|
||||
@@ -55,6 +56,9 @@ struct _MwLLCommonPixmap {
|
||||
#ifdef USE_GDI
|
||||
#include <Mw/LowLevel/GDI.h>
|
||||
#endif
|
||||
#ifdef USE_WAYLAND
|
||||
#include <Mw/LowLevel/Wayland.h>
|
||||
#endif
|
||||
|
||||
union _MwLL {
|
||||
struct _MwLLCommon common;
|
||||
@@ -64,6 +68,9 @@ union _MwLL {
|
||||
#ifdef USE_GDI
|
||||
struct _MwLLGDI gdi;
|
||||
#endif
|
||||
#ifdef USE_WAYLAND
|
||||
struct _MwLLWayland wayland;
|
||||
#endif
|
||||
};
|
||||
|
||||
union _MwLLColor {
|
||||
@@ -74,6 +81,9 @@ union _MwLLColor {
|
||||
#ifdef USE_GDI
|
||||
struct _MwLLGDIColor gdi;
|
||||
#endif
|
||||
#ifdef USE_WAYLAND
|
||||
struct _MwLLWaylandColor wayland;
|
||||
#endif
|
||||
};
|
||||
|
||||
union _MwLLPixmap {
|
||||
@@ -84,6 +94,9 @@ union _MwLLPixmap {
|
||||
#ifdef USE_GDI
|
||||
struct _MwLLGDIPixmap gdi;
|
||||
#endif
|
||||
#ifdef USE_WAYLAND
|
||||
struct _MwLLWaylandPixmap wayland;
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
#include <Mw/TypeDefs.h>
|
||||
@@ -149,6 +162,8 @@ MWDECL void (*MwLLDestroy)(MwLL handle);
|
||||
|
||||
MWDECL void (*MwLLPolygon)(MwLL handle, MwPoint* points, int points_count, MwLLColor color);
|
||||
MWDECL void (*MwLLLine)(MwLL handle, MwPoint* points, MwLLColor color);
|
||||
MWDECL void (*MwLLBeginDraw)(MwLL handle);
|
||||
MWDECL void (*MwLLEndDraw)(MwLL handle);
|
||||
|
||||
MWDECL MwLLColor (*MwLLAllocColor)(MwLL handle, int r, int g, int b);
|
||||
MWDECL void (*MwLLColorUpdate)(MwLL handle, MwLLColor c, int r, int g, int b);
|
||||
|
||||
Reference in New Issue
Block a user