Kodi Development  20.0
for Binary and Script based Add-Ons
3. Hardware rendering operations

Detailed Description

Hardware rendering operations


Hardware rendering operation parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.

Header parts:

GAME_ERROR
Game add-on error codes
Definition: game.h:34
virtual GAME_ERROR HwContextDestroy()
Called before the context is destroyed.
Definition: Game.h:622
virtual GAME_ERROR HwContextReset()
Invalidates the current HW context and reinitializes GPU resources.
Definition: Game.h:609

Source parts:

GAME_ERROR CMyInstance::HwContextReset()
{
}
GAME_ERROR CMyInstance::HwContextDestroy()
{
}
@ GAME_ERROR_NOT_IMPLEMENTED
the method that the frontend called is not implemented
Definition: game.h:42

Modules

 Group header include
 
 Group source include
 

Function Documentation

◆ HwContextReset()

virtual GAME_ERROR HwContextReset ( )
inlinevirtual

Invalidates the current HW context and reinitializes GPU resources.

Any GL state is lost, and must not be deinitialized explicitly.

Returns
the error, or GAME_ERROR_NO_ERROR if the HW context was reset

◆ HwContextDestroy()

virtual GAME_ERROR HwContextDestroy ( )
inlinevirtual

Called before the context is destroyed.

Resources can be deinitialized at this step.

Returns
the error, or GAME_ERROR_NO_ERROR if the HW context was destroyed

◆ HwGetProcAddress()

game_proc_address_t HwGetProcAddress ( const char *  sym)
inline

Callback to Kodi Function
Get a symbol from the hardware context

Parameters
[in]symThe symbol's name
Returns
A function pointer for the specified symbol
Remarks
Only called from addon itself