|
| QRhiViewport ()=default |
| Constructs a viewport description with an empty rectangle and a depth range of 0.0f - 1.0f.
|
|
| QRhiViewport (float x, float y, float w, float h, float minDepth=0.0f, float maxDepth=1.0f) |
| Constructs a viewport description with the rectangle specified by x, y, w, h and the depth range minDepth and maxDepth.
|
|
std::array< float, 4 > | viewport () const |
|
void | setViewport (float x, float y, float w, float h) |
| Sets the viewport's position and size to x, y, w, and h.
|
|
float | minDepth () const |
|
void | setMinDepth (float minDepth) |
| Sets the minDepth of the depth range of the viewport.
|
|
float | maxDepth () const |
|
void | setMaxDepth (float maxDepth) |
| Sets the maxDepth of the depth range of the viewport.
|
|
\inmodule QtGui
- Since
- 6.6
Specifies a viewport rectangle.
Used with QRhiCommandBuffer::setViewport().
QRhi assumes OpenGL-style viewport coordinates, meaning x and y are bottom-left. Negative width or height are not allowed.
Typical usage is like the following:
const QSize outputSizeInPixels = swapchain->currentPixelSize();
cb->beginPass(swapchain->currentFrameRenderTarget(),
Qt::black, { 1.0f, 0 });
cb->setGraphicsPipeline(ps);
std::array< float, 4 > viewport() const
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)
- Note
- This is a RHI API with limited compatibility guarantees, see \l QRhi for details.
- See also
- QRhiCommandBuffer::setViewport(), QRhi::clipSpaceCorrMatrix(), QRhiScissor
Definition at line 84 of file qrhi.h.