14struct ID3D12RootSignature;
15struct ID3D12CommandQueue;
18struct D3D12_CPU_DESCRIPTOR_HANDLE;
23using D3D12_RECT = tagRECT;
74 CS::CSTaskGroup task_group = CS::CSTaskGroup::INVALID)
override {
94 return this->draw_scene;
103 this->draw_scene = new_scene;
115 return *this->device;
124 return *this->root_signature;
133 return *this->command_queue;
142 return *this->render_target_view;
151 return *this->depth_stencil_view;
160 return *this->viewport;
169 return *this->scissor_rect;
178 return this->delta_time;
187 return this->times_called;
193 friend bool liber_draw_callback(uintptr_t device_context,
GXDrawTask* task);
195 ID3D12Device* device =
nullptr;
196 ID3D12RootSignature* root_signature =
nullptr;
197 ID3D12CommandQueue* command_queue =
nullptr;
198 D3D12_CPU_DESCRIPTOR_HANDLE* render_target_view =
nullptr;
199 D3D12_CPU_DESCRIPTOR_HANDLE* depth_stencil_view =
nullptr;
200 D3D12_VIEWPORT* viewport =
nullptr;
201 D3D12_RECT* scissor_rect =
nullptr;
202 scene draw_scene = HDR_SCENE;
203 float delta_time = 0.0f;
204 int times_called = 0;
Inherit from this minimal task interface to create a custom task.
Definition task.hpp:51
virtual LIBERAPI void register_task(CSTaskGroup task_group)
Register a task to be called in a specified task group.
Abstract graphics draw task base.
Definition draw.hpp:45
scene get_scene() const noexcept
Get the scene, which selects the layer to draw on.
Definition draw.hpp:93
virtual void draw()=0
The abstract method that is called whenever the task executes after being registered by from::GXBS::G...
void set_scene(scene new_scene) noexcept
Set the scene object, which selects the layer to draw on.
Definition draw.hpp:102
int get_times_called() noexcept
Get how many times this draw task has been called.
Definition draw.hpp:186
scene
Whether the task should draw on top of the UI.
Definition draw.hpp:57
const D3D12_VIEWPORT & get_viewport() noexcept
Get the current viewport dimensions.
Definition draw.hpp:159
D3D12_CPU_DESCRIPTOR_HANDLE & get_render_target_view() noexcept
Get the render target view handle.
Definition draw.hpp:141
D3D12_CPU_DESCRIPTOR_HANDLE & get_depth_stencil_view() noexcept
Get the depth stencil view handle.
Definition draw.hpp:150
ID3D12CommandQueue & get_command_queue() noexcept
Get the ID3D12CommandQueue interface.
Definition draw.hpp:132
ID3D12RootSignature & get_root_signature() noexcept
Get the ID3D12RootSignature interface.
Definition draw.hpp:123
void register_task(CS::CSTaskGroup task_group=CS::CSTaskGroup::INVALID) override
Register the draw task, i.e. start its execution.
Definition draw.hpp:73
float get_delta_time() noexcept
Get the delta time of this frame.
Definition draw.hpp:177
ID3D12Device & get_device() noexcept
Get the ID3D12Device interface.
Definition draw.hpp:114
const D3D12_RECT & get_scissor_rect() noexcept
Get the scissor rect dimensions.
Definition draw.hpp:168
The data passed to tasks on execution.
Definition fd4_task.hpp:55
Namespace CS task interface.