I'll try a canvas. In BlitzPlus, canvases were not good for OpenGL viewports.
I also found the solution for panels. This is really nice because I don't have to have a bunch of extra render calls in every waitevent() loop:
I also found the solution for panels. This is really nice because I don't have to have a bunch of extra render calls in every waitevent() loop:
Extern "Win32" Function SetWindowLong(hwnd:Int,index:Int,newlong:Int) = "SetWindowLongA@12" Function CallWindowProc:Int(prevwndfunc:Int,hwnd:Int,msg:Int,wparam:Byte Ptr,lparam:Byte Ptr) = "CallWindowProcA@20" EndExtern Const GWL_WNDPROC=-4 Const WM_PAINT=15 hwnd=QueryGadget(Viewport.panel,QUERY_HWND) Global OldWindowCallback=SetWindowLong(hwnd,GWL_WNDPROC,Int(Byte Ptr(WindowCallback))) Function WindowCallback(hwnd,msg,wparam:Byte Ptr,lparam:Byte Ptr) "win32" Select msg Case WM_PAINT renderworld sync EndSelect Return CallWindowProc(OldWindowCallback,hwnd,msg,wparam,lparam) End Function