libER 0.1.4.2
ELDEN RING API library
|
Abstract graphics draw task base. More...
#include <draw.hpp>
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. | |
ID3D12Device & | get_device () noexcept |
Get the ID3D12Device interface. | |
ID3D12RootSignature & | get_root_signature () noexcept |
Get the ID3D12RootSignature interface. | |
ID3D12CommandQueue & | get_command_queue () noexcept |
Get the ID3D12CommandQueue interface. | |
D3D12_CPU_DESCRIPTOR_HANDLE & | get_render_target_view () noexcept |
Get the render target view handle. | |
D3D12_CPU_DESCRIPTOR_HANDLE & | get_depth_stencil_view () noexcept |
Get the depth stencil view handle. | |
const D3D12_VIEWPORT & | get_viewport () noexcept |
Get the current viewport dimensions. | |
const D3D12_RECT & | get_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. | |
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.
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.
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.
|
inlinenoexcept |
Get the ID3D12CommandQueue interface.
|
inlinenoexcept |
Get the delta time of this frame.
|
inlinenoexcept |
Get the depth stencil view handle.
|
inlinenoexcept |
Get the ID3D12Device interface.
Guaranteed to be initialized when called from from::GXBS::GXDrawTask::draw
|
inlinenoexcept |
Get the render target view handle.
|
inlinenoexcept |
Get the ID3D12RootSignature interface.
|
inlinenoexcept |
Get the scene, which selects the layer to draw on.
|
inlinenoexcept |
Get the scissor rect dimensions.
|
inlinenoexcept |
Get how many times this draw task has been called.
|
inlinenoexcept |
Get the current viewport dimensions.
|
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.
task_group | is ignored, always from::CS::CSTaskGroup::GraphicsStep |
Set the scene object, which selects the layer to draw on.
new_scene | scene layer selection enum value to use |