
Neither of the use cases for this control are functional/operable. This is a really cool control, and when combined with ANGLE and some shader voodoo it's possible for an addon to have a single piece of control rendering code that works on DirectX/GL/GLES: While this control is clearly rare/obscure in nature (I found a grand total of zero addons that use it today), I think that the control itself is very useful and should be made functional. Here is a clear and concise description of what was expected to happen: It's not "ideal" in any way but unless you need CBOnStop() it does seem to work: For my implementation I have no need for CBOnStop() for anything that could be cleaned up in the destructor. This appears to be a double-destruct problem, but I really didn't look into it that much. Without access to m_renderHelper, there is nothing an addon can do to duplicate the base class behavior.įor what it's worth, since this is a dev-kit concern, I was able to provide a work-around class implementation that works, but suffers from a problem when Kodi is closed while the applicable control is visible.

Static_cast(cbhdl)-> m_renderHelper-> End() Static_cast(cbhdl)-> m_renderHelper-> Begin()

If (! static_cast(cbhdl)-> m_renderHelper) Static void OnRenderCB(KODI_GUI_CLIENT_HANDLE cbhdl) Which ultimately calls this, but we're still in a constructor so the derived class' implementation is ignored: 5f), device))ĬServiceBroker::GetWinSystem()-> GetGfxContext(). GetHeight() - y ĭevice = DX::DeviceResources::Get()-> GetD3DDevice() GetHeight()) h = CServiceBroker::GetWinSystem()-> GetGfxContext(). If (y + h > CServiceBroker::GetWinSystem()-> GetGfxContext(). GetWidth()) w = CServiceBroker::GetWinSystem()-> GetGfxContext(). If (x CServiceBroker::GetWinSystem()-> GetGfxContext(). ScaleFinalYCoord( GetXPosition() + GetWidth(), GetYPosition() + GetHeight()) - y ScaleFinalXCoord( GetXPosition() + GetWidth(), GetYPosition() + GetHeight()) - x įloat h = CServiceBroker::GetWinSystem()-> GetGfxContext(). ScaleFinalYCoord( GetXPosition(), GetYPosition()) įloat w = CServiceBroker::GetWinSystem()-> GetGfxContext(). ScaleFinalXCoord( GetXPosition(), GetYPosition()) įloat y = CServiceBroker::GetWinSystem()-> GetGfxContext(). CaptureStateBlock() įloat x = CServiceBroker::GetWinSystem()-> GetGfxContext().

_func_, kodiBase, handle, addon ? addon-> ID() : "unknown ") Ĭontrol-> m_control-> InitCallback(control) īool CGUIRenderingControl::InitCallback(IRenderingCallback *callback)ĬServiceBroker::GetWinSystem()-> GetGfxContext(). "Interface_GUIControlAddonRendering::', "

Void (*renderCB)(KODI_GUI_CLIENT_HANDLE),ĬAddonDll* addon = static_cast(kodiBase) ĬGUIAddonRenderingControl* control = static_cast(handle) Void Interface_GUIControlAddonRendering::set_callbacks(īool (*createCB)(KODI_GUI_CLIENT_HANDLE, int, int, int, int, ADDON_HARDWARE_CONTEXT),
