Sunshine master
Self-hosted game stream host for Moonlight.
platf::dxgi::gpu_cursor_t Class Reference

GPU resources used to render a captured cursor shape. More...

#include <src/platform/windows/display.h>

Collaboration diagram for platf::dxgi::gpu_cursor_t:
[legend]

Public Member Functions

void set_pos (LONG topleft_x, LONG topleft_y, LONG display_width, LONG display_height, DXGI_MODE_ROTATION display_rotation, bool visible)
 Update the cursor position and display geometry used for rendering.
 
void set_texture (LONG texture_width, LONG texture_height, texture2d_t &&texture)
 Replace the cursor texture and update its render viewport.
 
void update_viewport ()
 Recalculate the D3D viewport for the cursor texture.
 

Public Attributes

D3D11_VIEWPORT cursor_view
 Cursor view.
 
LONG display_height
 Display height.
 
DXGI_MODE_ROTATION display_rotation
 Display rotation.
 
LONG display_width
 Display width.
 
shader_res_t input_res
 Input res.
 
texture2d_t texture
 D3D11 texture backing the captured frame.
 
LONG texture_height
 Texture height.
 
LONG texture_width
 Texture width.
 
LONG topleft_x
 Topleft x.
 
LONG topleft_y
 Topleft y.
 
bool visible
 Whether the cursor is visible.
 

Detailed Description

GPU resources used to render a captured cursor shape.

Member Function Documentation

◆ set_pos()

void platf::dxgi::gpu_cursor_t::set_pos ( LONG topleft_x,
LONG topleft_y,
LONG display_width,
LONG display_height,
DXGI_MODE_ROTATION display_rotation,
bool visible )
inline

Update the cursor position and display geometry used for rendering.

Parameters
topleft_xCursor left edge in desktop coordinates.
topleft_yCursor top edge in desktop coordinates.
display_widthCaptured display width in pixels.
display_heightCaptured display height in pixels.
display_rotationDXGI rotation applied to the captured display.
visibleWhether the cursor should be visible in the frame.

◆ set_texture()

void platf::dxgi::gpu_cursor_t::set_texture ( LONG texture_width,
LONG texture_height,
texture2d_t && texture )
inline

Replace the cursor texture and update its render viewport.

Parameters
texture_widthCursor texture width in pixels.
texture_heightCursor texture height in pixels.
textureD3D11 cursor texture to render.

The documentation for this class was generated from the following file: