The RenderContext class provides a rendering context for a graphical application.
More...
#include <candlewick/core/RenderContext.h>
The RenderContext class provides a rendering context for a graphical application.
- See also
- Scene
-
Device
-
Mesh
◆ RenderContext() [1/3]
candlewick::RenderContext::RenderContext |
( |
NoInitT | | ) |
|
|
inline |
◆ RenderContext() [2/3]
candlewick::RenderContext::RenderContext |
( |
Device && | device, |
|
|
Window && | window, |
|
|
SDL_GPUTextureFormat | suggested_depth_format = SDL_GPU_TEXTUREFORMAT_INVALID ) |
Constructor. The last argument (the depth texture format) is optional. By default, it is set to INVALID, and no depth texture is created.
◆ RenderContext() [3/3]
◆ ~RenderContext()
candlewick::RenderContext::~RenderContext |
( |
| ) |
|
|
inlinenoexcept |
◆ acquireCommandBuffer()
CommandBuffer candlewick::RenderContext::acquireCommandBuffer |
( |
| ) |
const |
|
inline |
Acquire the command buffer, starting a frame.
◆ acquireSwapchain()
bool candlewick::RenderContext::acquireSwapchain |
( |
CommandBuffer & | command_buffer | ) |
|
Acquire GPU swapchain.
- Warning
- This can only be called from the main thread (see SDL docs for the meaning of "main thread").
◆ colorFormat()
SDL_GPUTextureFormat candlewick::RenderContext::colorFormat |
( |
| ) |
const |
|
inline |
◆ colorTarget()
const Texture & candlewick::RenderContext::colorTarget |
( |
| ) |
const |
|
inline |
◆ depthFormat()
SDL_GPUTextureFormat candlewick::RenderContext::depthFormat |
( |
| ) |
const |
|
inline |
◆ depthTarget()
const Texture & candlewick::RenderContext::depthTarget |
( |
| ) |
const |
|
inline |
◆ destroy()
void candlewick::RenderContext::destroy |
( |
| ) |
|
|
noexcept |
◆ disableMSAA()
void candlewick::RenderContext::disableMSAA |
( |
| ) |
|
|
inline |
◆ enableMSAA()
void candlewick::RenderContext::enableMSAA |
( |
SDL_GPUSampleCount | samples | ) |
|
|
inline |
◆ getMsaaSampleCount()
SDL_GPUSampleCount candlewick::RenderContext::getMsaaSampleCount |
( |
| ) |
const |
|
inline |
◆ getSwapchainTextureFormat()
SDL_GPUTextureFormat candlewick::RenderContext::getSwapchainTextureFormat |
( |
| ) |
const |
|
inline |
◆ hasDepthTexture()
bool candlewick::RenderContext::hasDepthTexture |
( |
| ) |
const |
|
inline |
Check if a depth texture was created.
◆ initialized()
bool candlewick::RenderContext::initialized |
( |
| ) |
const |
|
inline |
◆ msaaEnabled()
bool candlewick::RenderContext::msaaEnabled |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ presentToSwapchain()
void candlewick::RenderContext::presentToSwapchain |
( |
CommandBuffer & | command_buffer | ) |
|
Present the resolved texture to the swapchain. You must acquire the swapchain beforehand.
◆ resolvedColorTarget()
const Texture & candlewick::RenderContext::resolvedColorTarget |
( |
| ) |
const |
|
inline |
◆ setSwapchainParameters()
void candlewick::RenderContext::setSwapchainParameters |
( |
SDL_GPUSwapchainComposition | composition, |
|
|
SDL_GPUPresentMode | present_mode ) |
|
inline |
◆ waitAndAcquireSwapchain()
bool candlewick::RenderContext::waitAndAcquireSwapchain |
( |
CommandBuffer & | command_buffer | ) |
|
◆ waitForSwapchain()
bool candlewick::RenderContext::waitForSwapchain |
( |
| ) |
|
|
inline |
Wait for the swapchain to be available.
◆ device
Device candlewick::RenderContext::device |
◆ window
Window candlewick::RenderContext::window |
The documentation for this struct was generated from the following file: