Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches

Detailed Description

Hardware framebuffer stream data

Typedefs

typedef void(* game_proc_address_t) (void)
 Hardware framebuffer process function address
 

Class Documentation

◆ game_hw_rendering_properties

struct game_hw_rendering_properties

Hardware rendering properties

These properties are needed early on, so instead of passing them when the stream is opened, they are passed in EnableHardwareRendering(). As a result, the struct passed to OpenStream() is empty.

Class Members
GAME_HW_CONTEXT_TYPE context_type The API to use.
bool depth Set to true if render buffers should have a depth component attached.
Todo
: Obsolete
bool stencil Set to true if stencil buffers should be attached.

If depth and stencil are true, a packed 24/8 buffer will be added. Only attaching stencil is invalid and will be ignored.

Todo
: Obsolete
bool bottom_left_origin Use the conventional bottom-left origin.

If false, standard top-left origin semantics are used.

Todo
: Move to GL specific interface
unsigned int version_major Major version number for the core GL context or GLES 3.1+.
unsigned int version_minor Minor version number for the core GL context or GLES 3.1+.
bool cache_context If true, the frontend will go to great lengths to avoid resetting the context in scenarios like toggling fullscreen, etc.
Todo
: Obsolete? Maybe frontend should just always assume this...

The reset callback might still be called in extreme situations such as if the context is lost beyond recovery.

For optimal stability, set this to false, and allow context to be reset at any time.

bool debug_context Creates a debug context.

◆ game_stream_hw_framebuffer_buffer

struct game_stream_hw_framebuffer_buffer

Hardware framebuffer buffer

Class Members
uintptr_t framebuffer

◆ game_stream_hw_framebuffer_packet

struct game_stream_hw_framebuffer_packet

Hardware framebuffer packet

Class Members
uintptr_t framebuffer
unsigned int width Size of the image the client just drew.

The framebuffer is allocated at the largest size the client said it would ever need, and a frame usually fills only part of it. Without these the rest of the framebuffer is shown along with the image.

unsigned int height
float display_aspect_ratio Display aspect ratio (DAR) to use when showing the video frame.

An aspect ratio of 0.0 indicates square pixels, i.e. a DAR of W/H.

GAME_VIDEO_ROTATION rotation Video rotation angle defined by GAME_VIDEO_ROTATION.

◆ game_stream_hw_framebuffer_properties

struct game_stream_hw_framebuffer_properties

Hardware framebuffer properties

The remaining hardware rendering properties are passed earlier, via EnableHardwareRendering(). Display geometry is carried here, because it comes from the client's system AV info, which is not available that early.

Class Members
unsigned int max_width The largest frame width the client will render, in pixels.

The frontend allocates its framebuffer at this size, so the client can render any frame into it without it being reallocated mid-game.

The framebuffer must exist before the stream is opened, because clients typically ask for it from inside HwContextReset(), which the frontend invokes as soon as the stream is open.

unsigned int max_height The largest frame height the client will render, in pixels.
float nominal_display_aspect_ratio The nominal display aspect ratio (DAR) used to show the video frame.

An aspect ratio of 0.0 indicates square pixels, i.e. a DAR of W/H.

Typedef Documentation

◆ game_proc_address_t

typedef void(* game_proc_address_t) (void)

Hardware framebuffer process function address

Enumeration Type Documentation

◆ GAME_HW_CONTEXT_TYPE

Hardware framebuffer type

Enumerator
GAME_HW_CONTEXT_NONE 

No context.

GAME_HW_CONTEXT_OPENGL 

OpenGL 2.x. The driver can choose to use the latest compatibility context.

GAME_HW_CONTEXT_OPENGLES2 

OpenGL ES 2.0.

GAME_HW_CONTEXT_OPENGL_CORE 

Modern desktop core GL context. Use the major and minor fields to set the GL version.

GAME_HW_CONTEXT_OPENGLES3 

OpenGL ES 3.0.

GAME_HW_CONTEXT_OPENGLES_VERSION 

OpenGL ES 3.1+. Set major/minor fields.

GAME_HW_CONTEXT_VULKAN 

Vulkan.