mirror of https://github.com/buggins/dlangui.git
fixes for OSX
This commit is contained in:
parent
88a7aaf7f2
commit
c7964762c4
|
@ -150,8 +150,14 @@ class SDLWindow : Window {
|
|||
static if (ENABLE_OPENGL) {
|
||||
if (_enableOpengl)
|
||||
windowFlags |= SDL_WINDOW_OPENGL;
|
||||
if (!_glSupport)
|
||||
_glSupport = new GLSupport();
|
||||
if (!_glSupport) {
|
||||
version(OSX) {
|
||||
bool useLegacyOpengl = true;
|
||||
} else {
|
||||
bool useLegacyOpengl = false;
|
||||
}
|
||||
_glSupport = new GLSupport(useLegacyOpengl);
|
||||
}
|
||||
}
|
||||
_win = SDL_CreateWindow(toUTF8(_caption).toStringz, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
|
||||
_dx, _dy,
|
||||
|
|
|
@ -214,19 +214,22 @@ class X11Window : DWindow {
|
|||
EnterWindowMask | LeaveWindowMask | PointerMotionMask | ButtonMotionMask | ExposureMask | VisibilityChangeMask |
|
||||
FocusChangeMask | KeymapStateMask | StructureNotifyMask;
|
||||
Visual * visual = DefaultVisual(x11display, x11screen);
|
||||
int depth = DefaultDepth(x11display, x11screen);
|
||||
static if (ENABLE_OPENGL) {
|
||||
if (_enableOpengl) {
|
||||
swamask |= CWColormap;
|
||||
swa.colormap = x11cmap;
|
||||
visual = cast(Visual*)x11visual.visual;
|
||||
depth = x11visutal.depth;
|
||||
}
|
||||
}
|
||||
|
||||
_win = XCreateWindow(x11display, DefaultRootWindow(x11display),
|
||||
0, 0,
|
||||
_dx, _dy, 0,
|
||||
x11visual.depth, InputOutput,
|
||||
visual,
|
||||
depth,
|
||||
InputOutput,
|
||||
visual,
|
||||
swamask,
|
||||
&swa);
|
||||
// _win = XCreateSimpleWindow(x11display, DefaultRootWindow(x11display),
|
||||
|
|
Loading…
Reference in New Issue