Sunshine0.0.5917
Sunshine 0.0.5917
Self-hosted game stream host for Moonlight.
Loading...
Searching...
No Matches
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:

Public Member Functions

 gpu_cursor_t ()=default
 Initialize a cursor viewport with no area and the full depth range.
void set_pos (LONG new_topleft_x, LONG new_topleft_y, LONG new_display_width, LONG new_display_height, DXGI_MODE_ROTATION new_display_rotation, bool new_visible)
 Update the cursor position and display geometry used for rendering.
void set_texture (LONG new_texture_width, LONG new_texture_height, texture2d_t &&new_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 {0, 0, 0, 0, 0.0f, 1.0f}
 Cursor view with the full depth range.
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 new_topleft_x,
LONG new_topleft_y,
LONG new_display_width,
LONG new_display_height,
DXGI_MODE_ROTATION new_display_rotation,
bool new_visible )
inline

Update the cursor position and display geometry used for rendering.

Parameters
new_topleft_xCursor left edge in desktop coordinates.
new_topleft_yCursor top edge in desktop coordinates.
new_display_widthCaptured display width in pixels.
new_display_heightCaptured display height in pixels.
new_display_rotationDXGI rotation applied to the captured display.
new_visibleWhether the cursor should be visible in the frame.

◆ set_texture()

void platf::dxgi::gpu_cursor_t::set_texture ( LONG new_texture_width,
LONG new_texture_height,
texture2d_t && new_texture )
inline

Replace the cursor texture and update its render viewport.

Parameters
new_texture_widthCursor texture width in pixels.
new_texture_heightCursor texture height in pixels.
new_textureD3D11 cursor texture to render.

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