libER 0.1.4.2
ELDEN RING API library
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
from::GXBS::GXDrawTask Class Referenceabstract

Abstract graphics draw task base. More...

#include <draw.hpp>

Inheritance diagram for from::GXBS::GXDrawTask:
from::CS::CSEzTask

Public Types

enum  scene { HDR_SCENE , UI_SCENE }
 Whether the task should draw on top of the UI. More...
 

Public Member Functions

void register_task (CS::CSTaskGroup task_group=CS::CSTaskGroup::INVALID) override
 Register the draw task, i.e. start its execution.
 
virtual void draw ()=0
 The abstract method that is called whenever the task executes after being registered by from::GXBS::GXDrawTask::register_task.
 
scene get_scene () const noexcept
 Get the scene, which selects the layer to draw on.
 
void set_scene (scene new_scene) noexcept
 Set the scene object, which selects the layer to draw on.
 
ID3D12Deviceget_device () noexcept
 Get the ID3D12Device interface.
 
ID3D12RootSignatureget_root_signature () noexcept
 Get the ID3D12RootSignature interface.
 
ID3D12CommandQueueget_command_queue () noexcept
 Get the ID3D12CommandQueue interface.
 
D3D12_CPU_DESCRIPTOR_HANDLEget_render_target_view () noexcept
 Get the render target view handle.
 
D3D12_CPU_DESCRIPTOR_HANDLEget_depth_stencil_view () noexcept
 Get the depth stencil view handle.
 
const D3D12_VIEWPORTget_viewport () noexcept
 Get the current viewport dimensions.
 
const D3D12_RECTget_scissor_rect () noexcept
 Get the scissor rect dimensions.
 
float get_delta_time () noexcept
 Get the delta time of this frame.
 
int get_times_called () noexcept
 Get how many times this draw task has been called.
 

Detailed Description

Abstract graphics draw task base.

Based on CS::CSEzTask , this task executes during the CS::CSTaskGroup::GraphicsStep once registered. Concrete classes that derive from it must implement the draw method, and may access DirectX 12 resources through other methods of this class.

Two layer options are provided by default, which determine if the D3D12 render target view returned by from::GXBS::GXDrawTask::get_render_target_view is above or below ELDEN RING's menu/UI.

See also
from::CS::CSEzTask

Member Enumeration Documentation

◆ scene

Whether the task should draw on top of the UI.

HDR_SCENE (called HDRScene by the game): draw before the UI is composited onto the final render target.

UI_SCENE (called UIScene by the game): draw on top of the composited UI, but below any 3rd party overlays.

Member Function Documentation

◆ draw()

virtual void from::GXBS::GXDrawTask::draw ( )
pure virtual

The abstract method that is called whenever the task executes after being registered by from::GXBS::GXDrawTask::register_task.

The DirectX 12 resources accessible through this class's methods are guaranteed to be initialized.

◆ get_command_queue()

ID3D12CommandQueue & from::GXBS::GXDrawTask::get_command_queue ( )
inlinenoexcept

Get the ID3D12CommandQueue interface.

Returns
ID3D12CommandQueue& reference to the interface

◆ get_delta_time()

float from::GXBS::GXDrawTask::get_delta_time ( )
inlinenoexcept

Get the delta time of this frame.

Returns
float delta time in seconds

◆ get_depth_stencil_view()

D3D12_CPU_DESCRIPTOR_HANDLE & from::GXBS::GXDrawTask::get_depth_stencil_view ( )
inlinenoexcept

Get the depth stencil view handle.

Returns
D3D12_CPU_DESCRIPTOR_HANDLE& dsv handle

◆ get_device()

ID3D12Device & from::GXBS::GXDrawTask::get_device ( )
inlinenoexcept

Get the ID3D12Device interface.

Guaranteed to be initialized when called from from::GXBS::GXDrawTask::draw

Returns
ID3D12Device& reference to the interface

◆ get_render_target_view()

D3D12_CPU_DESCRIPTOR_HANDLE & from::GXBS::GXDrawTask::get_render_target_view ( )
inlinenoexcept

Get the render target view handle.

Returns
D3D12_CPU_DESCRIPTOR_HANDLE& rtv handle

◆ get_root_signature()

ID3D12RootSignature & from::GXBS::GXDrawTask::get_root_signature ( )
inlinenoexcept

Get the ID3D12RootSignature interface.

Returns
ID3D12RootSignature& reference to the interface

◆ get_scene()

scene from::GXBS::GXDrawTask::get_scene ( ) const
inlinenoexcept

Get the scene, which selects the layer to draw on.

Returns
scene layer selection enum value

◆ get_scissor_rect()

const D3D12_RECT & from::GXBS::GXDrawTask::get_scissor_rect ( )
inlinenoexcept

Get the scissor rect dimensions.

Returns
const D3D12_RECT& reference to the scissor rectangle structure

◆ get_times_called()

int from::GXBS::GXDrawTask::get_times_called ( )
inlinenoexcept

Get how many times this draw task has been called.

Returns
int times called

◆ get_viewport()

const D3D12_VIEWPORT & from::GXBS::GXDrawTask::get_viewport ( )
inlinenoexcept

Get the current viewport dimensions.

Returns
const D3D12_VIEWPORT& reference to the viewport structure

◆ register_task()

void from::GXBS::GXDrawTask::register_task ( CS::CSTaskGroup  task_group = CS::CSTaskGroup::INVALID)
inlineoverride

Register the draw task, i.e. start its execution.

The drawing is sequenced in order of the tasks' registration. The task_group parameter is ignored, the tasks will always register in the from::CS::CSTaskGroup::GraphicsStep task group.

Parameters
task_groupis ignored, always from::CS::CSTaskGroup::GraphicsStep

◆ set_scene()

void from::GXBS::GXDrawTask::set_scene ( scene  new_scene)
inlinenoexcept

Set the scene object, which selects the layer to draw on.

Parameters
new_scenescene layer selection enum value to use

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