Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,21 @@

"dependencies": {
"derelict-util": "~>2.0.1"
}
},

"configurations": [
{
"name": "x11",
"platforms": ["linux"],
"versions": ["EglX11"]
},
{
"name": "wayland",
"platforms": ["linux"],
"versions": ["EglWayland"]
},
{
"name": "library"
}
]
}
32 changes: 16 additions & 16 deletions source/derelict/gles/eglplatform.d
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ else static if( Derelict_OS_Android ) {
else static if( Derelict_OS_Posix && !Derelict_OS_Mac ) {
alias EGLint = int;

// static if( wayland ) {
// struct wl_display;
// struct wl_egl_pixmap;
// struct wl_egl_window;
// There are multiple bindings to X11, no need to give preference.
// Client code must cast to void*
version (EglWayland)
{
alias EGLNativeDisplayType = void*; // wl_display*
alias EGLNativeWindowType = void*; // wl_egl_window*
alias EGLNativePixmapType = void*; // should not be used
}

// alias EGLNativeWindowType = wl_display*;
// alias EGLNativePixmapType = wl_egl_pixmap*;
// alias EGLNativeDisplayType = wl_egl_window*;
// } else {
// FIXME: Assume X for now.
struct Display;

alias EGLNativeWindowType = Display*;
alias EGLNativePixmapType = uint;
alias EGLNativeDisplayType = uint;
// }
version(EglX11)
{
alias EGLNativeDisplayType = void*; // Display*
alias EGLNativeWindowType = uint; // Window
alias EGLNativePixmapType = uint; // Pixmap
}
}
else
else {
static assert( 0, "Need to implement EGL types for this operating system." );
}