4#ifndef GREM_GRAPHICS_DEVICE_HPP
5#define GREM_GRAPHICS_DEVICE_HPP
28struct DeviceImplementation;
229 blit(renderTarget,
Offset2D{.x = 0, .y = 0}, renderSource);
300 [[nodiscard]] DeviceImplementation*
get() noexcept {
301 return implementation.get();
312 [[nodiscard]]
const DeviceImplementation*
get() const noexcept {
313 return implementation.get();
Base interface for a filesystem.
Definition Filesystem.hpp:25
Nullable RAII data pointer with exclusive ownership of an object that is automatically destroyed on p...
Definition UniquePointer.hpp:77
Device & operator=(Device &&)=delete
Moving a device is not allowed.
void blit(TextureSubresourceReference renderTarget, TextureRegion2DConstReference renderSource)
Copy and paste a rectangular region of a texture at its original size onto another texture at its bot...
Definition Device.hpp:228
Device(Window &window, const DeviceOptions &options={})
Construct a device.
void render(const RenderPass &renderPass)
Submit a list of graphics commands to be rendered.
bool awaitPresentation(const Swapchain &swapchain, PresentationSubmissionID presentationSubmissionID, Duration timeout={}) noexcept
Wait for a specific frame to finish being rendered and presented.
Device(const Device &)=delete
Copying a device is not allowed.
Device(Filesystem &filesystem, Window &window, const DeviceOptions &options={})
Construct a device with an associated filesystem, allowing for graphics pipelines to be cached.
const DeviceImplementation * get() const noexcept
Get a pointer to the underlying resource implementation.
Definition Device.hpp:312
Device(Device &&)=delete
Moving a device is not allowed.
DeviceImplementation * get() noexcept
Get a pointer to the underlying resource implementation.
Definition Device.hpp:300
PresentationSubmission present(Swapchain &swapchain)
Submit the current back buffer of a swapchain for display to its associated window,...
void blit(TextureSubresourceReference renderTarget, Offset2D targetOffset, TextureRegion2DConstReference renderSource)
Copy and paste a rectangular region of a texture at its original size onto another texture at a speci...
const FeatureSupport & getSupportedFeatures() const noexcept
Get the features supported by the device.
Device & operator=(const Device &)=delete
Copying a device is not allowed.
void await() noexcept
Wait for all submitted graphics commands to finish being rendered and presented.
void blit(TextureRegion2DReference renderTarget, TextureRegion2DConstReference renderSource, TextureFilter filter)
Copy and paste a rectangular region of a texture onto a region of another texture.
Backend-specific implementation of RenderPass.
Definition RenderPass.hpp:38
Render target texture holding a chain of images leading to a window to be presented to.
Definition Swapchain.hpp:61
Graphical window that can be rendered to.
Definition Window.hpp:131
Definition buffer_layouts.hpp:20
PresentationSubmissionID
Backend-specific implementation of Device.
Definition Device.hpp:33
TextureFilter
Filtering mode for the sampler of a Texture.
Definition Texture.hpp:473
Clock::duration Duration
Definition Clock.hpp:25
Offset< 2 > Offset2D
Offset in a 2D data region.
Definition extents.hpp:21
StringBase< char, std::char_traits< char >, std::allocator< char > > String
Definition String.hpp:17
Configuration options for a Device.
Definition Device.hpp:38
String shaderCacheOutputFilepath
Virtual output filepath to save the shader cache to when the rendering context is destroyed,...
Definition Device.hpp:57
String shaderCacheInputFilepath
Virtual input filepath to load the shader cache from when the rendering context is created,...
Definition Device.hpp:46
Information about a frame that has been submitted for presentation.
Definition Device.hpp:73
PresentationSubmissionID id
Identifier for the frame.
Definition Device.hpp:77
size_t totalRenderPassCount
Total number of render passes rendered in the frame.
Definition Device.hpp:94
size_t totalBlitCount
Total number of texture blits performed in the frame.
Definition Device.hpp:99
Duration totalWaitTime
Estimation of the total time spent waiting for resources to become available while preparing the fram...
Definition Device.hpp:89
RenderPass::Statistics totalRenderPassStatistics
Total accumulated statistics of all render passes rendered in the frame.
Definition Device.hpp:83
Declarations of special features supported by a Device.
Definition FeatureSupport.hpp:18
Performance-related statistics of a render pass.
Definition RenderPass.hpp:43
Read-only reference to a 2D region of a texture.
Definition Texture.hpp:396
Reference to a 2D region of a texture.
Definition Texture.hpp:388
Reference to a subresource of a texture.
Definition Texture.hpp:372