Open GWRon opened 1 year ago
gtkgadget.bmx:
Method AttachGraphics:TGraphics( flags:Long )
Mode = flags
End Method
Method CanvasGraphics:TGraphics()
If Not canvas Then
canvas = BRL.Graphics.AttachGraphics(gdk_x11_window_get_xid(gtk_widget_get_window(handle)), Mode)
End If
Return canvas
End Method
fails to attach the graphics.
BTW it is interesting to see the Method AttachGraphics
to say it returns a TGraphics instance but does not return ... anything (than null)
Maybe sdlgraphics.mod/sdlgraphics.bmx:
Method AttachGraphics:TSDLGraphics( widget:Byte Ptr,flags:Long ) Override
Local t:TSDLGraphics=New TSDLGraphics
't._context=bbGLGraphicsAttachGraphics( widget,flags )
Return t
End Method
needs some ... functionality (context...) ?
I would like to see MaxGUI working with SDL (so eg sdlrendermax2d).
For now this is not possible as MaxGUI's GTK3Driver initializes its own systemdriver. First step is extending this system driver to use TSDLSystem instead ... also
(I actually copied the whole mode and made it a maxgui.mod/SDLGTK3MaxGUI.mod)
Next thing to comment out is
but I am not sure if it needs something similar at the end - or if SDL handles it for us already.
It then compiles the following - but segfaults on "cls" (null element) and asserts that
AttachGraphics failed:Assert failedAttachGraphics failed
:(code adjusted from Midimasters sample at discord)