A descriptor, used when creating a context along with its window.
More...
A descriptor, used when creating a context along with its window.
See RenderContextManager::createRenderContext() for more information.
◆ RenderContextDescriptor() [1/5]
| nkGraphics::RenderContextDescriptor::RenderContextDescriptor |
( |
| ) |
|
|
noexcept |
◆ RenderContextDescriptor() [2/5]
| nkGraphics::RenderContextDescriptor::RenderContextDescriptor |
( |
nkWinUi::Window * |
window, |
|
|
bool |
vsync = false |
|
) |
| |
|
noexcept |
On window constructor.
- Parameters
-
| window | The window the context described should render to. |
| vsync | Whether the context described should use vsync (true) or not (false). |
◆ RenderContextDescriptor() [3/5]
| nkGraphics::RenderContextDescriptor::RenderContextDescriptor |
( |
Texture * |
colorTarget | ) |
|
|
noexcept |
On texture constructor. The texture will be used as the color target.
- Parameters
-
| colorTarget | The texture the context described should render to. |
◆ RenderContextDescriptor() [4/5]
| nkGraphics::RenderContextDescriptor::RenderContextDescriptor |
( |
Texture * |
colorTarget, |
|
|
Texture * |
depthTarget |
|
) |
| |
|
noexcept |
On textures constructor.
- Parameters
-
| colorTarget | The texture the context described should render to. |
| depthTarget | The texture the context described should use as a depth buffer. |
◆ RenderContextDescriptor() [5/5]
| nkGraphics::RenderContextDescriptor::RenderContextDescriptor |
( |
unsigned int |
width, |
|
|
unsigned int |
height, |
|
|
bool |
forOffscreen, |
|
|
bool |
vsync = false |
|
) |
| |
|
noexcept |
Automatic constructor.
- Parameters
-
| width | The width of the context described, in pixels. |
| height | The height of the context described, in pixels. |
| forOffscreen | Whether the context described should be off-screen (true) or not (false). |
| vsync | Whether the context described should use vsync (true) or not (false). This can only work when rendering to a window. |
◆ getWidth()
| unsigned int nkGraphics::RenderContextDescriptor::getWidth |
( |
| ) |
const |
- Returns
- The width set into the descriptor.
◆ getHeight()
| unsigned int nkGraphics::RenderContextDescriptor::getHeight |
( |
| ) |
const |
- Returns
- The height set into the descriptor.
◆ getWindow()
- Returns
- The window set into the descriptor.
◆ getColorTarget()
| Texture* nkGraphics::RenderContextDescriptor::getColorTarget |
( |
| ) |
const |
- Returns
- The color target set into the descriptor.
◆ getDepthTarget()
| Texture* nkGraphics::RenderContextDescriptor::getDepthTarget |
( |
| ) |
const |
- Returns
- The depth target set into the descriptor.
◆ getOffscreenContext()
| bool nkGraphics::RenderContextDescriptor::getOffscreenContext |
( |
| ) |
const |
- Returns
- Whether the descriptor has been set as offscreen (true) or not (false).
◆ getVsync()
| bool nkGraphics::RenderContextDescriptor::getVsync |
( |
| ) |
const |
- Returns
- Whether the descriptor has been set to use vertical sync (true) or not (false).
◆ getUseStencil()
| bool nkGraphics::RenderContextDescriptor::getUseStencil |
( |
| ) |
const |
- Returns
- Whether the descriptor has been set to use a depth buffer with stencil (true) or not (false).
◆ setUseStencil()
| void nkGraphics::RenderContextDescriptor::setUseStencil |
( |
bool |
v | ) |
|
Sets whether the render context should prepare to allow stencil use, or not. This value is only used if the depth target needs to be created by the render context. In other words, if an external texture is provided, the texture format takes precedence over this parameter.
Defaults to false.
- Parameters
-
| v | If stencil is required (true) or not (false). |
The documentation for this class was generated from the following file: