I'm trying to use Adam's simpledisplay on a mac with XQuartz which is installed + running. When I try to create a window, it crashes when calling XDisplayConnection.get()
. I'm just building dub and have added "arsd-official:simpledisplay"
as a dependency. Before I installed XQuartz, it wouldn't link because of the X related libs missing, so the XQuartz libs did seem to get installed to the right place. The native cocoa implementation seemed less well tested than the X version so I haven't looked into that too much.
Any idea what's going wrong? Or is there an example that seems to work with the native cocoa version? I'm only planning to use really basic functionality (display an image and maybe capture some key presses)
Also, Adam, if you have an idea of what needs to be done to get native macos support working, I'm willing to try to give it a shot.
object.Exception@../../../.dub/packages/arsd-official-10.3.8/arsd-official/simpledisplay.d(12578): Unable to open X display
----------------
../../../.dub/packages/arsd-official-10.3.8/arsd-official/simpledisplay.d:12578 arsd.simpledisplay.Display* arsd.simpledisplay.XDisplayConnection.get() [0x10f49cc8e]
../../../.dub/packages/arsd-official-10.3.8/arsd-official/simpledisplay.d:13072 void arsd.simpledisplay.SimpleWindow.impl.createWindow(int, int, immutable(char)[], in arsd.simpledisplay.OpenGlOptions, arsd.simpledisplay.SimpleWindow) [0x10f4882ec]
../../../.dub/packages/arsd-official-10.3.8/arsd-official/simpledisplay.d:1688 arsd.simpledisplay.SimpleWindow arsd.simpledisplay.SimpleWindow.__ctor(int, int, immutable(char)[], arsd.simpledisplay.OpenGlOptions, arsd.simpledisplay.Resizability, arsd.simpledisplay.WindowTypes, int, arsd.simpledisplay.SimpleWindow) [0x10f486017]
source/app.d:869 _Dmain [0x10f47dff2]
Program exited with code 1```