You can get the hwnd without modifying BRL module. Just do some copy work.
C side:
BMX side:
This works on win32. No idea about Macos (since I don't have one).
C side:
#include <windows.h> /* copied from BRL.glgraphics */ typedef struct BBGLContext{ struct BBGLContext *succ; int mode,width,height,depth,hertz,flags; HDC hdc; HWND hwnd; HGLRC hglrc; } BBGLContext; HWND getGLhwnd(BBGLContext *c){ return c->hwnd; }
BMX side:
Import "glhwnd.c" Extern Function getGLhwnd:int(c:Int) End Extern 'test Local g:TGLGraphics = TGLGraphics(GLGraphics(640, 480)) 'get GLGraphics print getGLhwnd(g._context)
This works on win32. No idea about Macos (since I don't have one).