#include <qrhi_p.h>
|
enum | Type { DepthStencil
, Color
} |
|
enum | Flag { UsedWithSwapChainOnly = 1 << 0
} |
|
enum | Type {
Buffer
, Texture
, Sampler
, RenderBuffer
,
RenderPassDescriptor
, RenderTarget
, TextureRenderTarget
, ShaderResourceBindings
,
GraphicsPipeline
, SwapChain
, ComputePipeline
, CommandBuffer
} |
|
Definition at line 937 of file qrhi_p.h.
◆ Flag
Flag values for flags() and setFlags()
\value UsedWithSwapChainOnly For DepthStencil renderbuffers this indicates that the renderbuffer is only used in combination with a QRhiSwapChain, and never in any other way. This provides automatic sizing and resource rebuilding, so calling setPixelSize() or create() is not needed whenever this flag is set. This flag value may also trigger backend-specific behavior, for example with OpenGL, where a separate windowing system interface API is in use (EGL, GLX, etc.), the flag is especially important as it avoids creating any actual renderbuffer resource as there is already a windowing system provided depth/stencil buffer as requested by QSurfaceFormat.
Enumerator |
---|
UsedWithSwapChainOnly | |
Definition at line 945 of file qrhi_p.h.
◆ Type
Specifies the type of the renderbuffer
\value DepthStencil Combined depth/stencil \value Color Color
Enumerator |
---|
DepthStencil | |
Color | |
Definition at line 940 of file qrhi_p.h.
◆ QRhiRenderBuffer()
◆ backingFormat()
◆ create()
bool QRhiRenderBuffer::create |
( |
| ) |
|
|
pure virtual |
◆ createFrom()
Similar to create() except that no new native renderbuffer objects are created. Instead, the native renderbuffer object specified by src is used.
This allows importing an existing renderbuffer object (which must belong to the same device or sharing context, depending on the graphics API) from an external graphics engine.
- Note
- This is currently applicable to OpenGL only. This function exists solely to allow importing a renderbuffer object that is bound to some special, external object, such as an EGLImageKHR. Once the application performed the glEGLImageTargetRenderbufferStorageOES call, the renderbuffer object can be passed to this function to create a wrapping QRhiRenderBuffer, which in turn can be passed in as a color attachment to a QRhiTextureRenderTarget to enable rendering to the EGLImage.
-
pixelSize(), sampleCount(), and flags() must still be set correctly. Passing incorrect sizes and other values to QRhi::newRenderBuffer() and then following it with a createFrom() expecting that the native renderbuffer object alone is sufficient to deduce such values is wrong and will lead to problems.
-
QRhiRenderBuffer does not take ownership of the native object, and destroy() will not release that object.
-
This function is only implemented when the QRhi::RenderBufferImport feature is reported as \l{QRhi::isFeatureSupported()}{supported}. Otherwise, the function does nothing and the return value is
false
.
- Returns
true
when successful, false
when not supported.
Reimplemented in QGles2RenderBuffer.
Definition at line 2423 of file qrhi.cpp.
◆ flags()
Flags QRhiRenderBuffer::flags |
( |
| ) |
const |
|
inline |
◆ pixelSize()
QSize QRhiRenderBuffer::pixelSize |
( |
| ) |
const |
|
inline |
◆ resourceType()
◆ sampleCount()
int QRhiRenderBuffer::sampleCount |
( |
| ) |
const |
|
inline |
◆ setFlags()
◆ setPixelSize()
◆ setSampleCount()
void QRhiRenderBuffer::setSampleCount |
( |
int |
s | ) |
|
|
inline |
◆ setType()
void QRhiRenderBuffer::setType |
( |
Type |
t | ) |
|
|
inline |
◆ type()
Type QRhiRenderBuffer::type |
( |
| ) |
const |
|
inline |
◆ m_backingFormatHint
◆ m_flags
Flags QRhiRenderBuffer::m_flags |
|
protected |
◆ m_pixelSize
QSize QRhiRenderBuffer::m_pixelSize |
|
protected |
◆ m_sampleCount
int QRhiRenderBuffer::m_sampleCount |
|
protected |
◆ m_type
Type QRhiRenderBuffer::m_type |
|
protected |
The documentation for this class was generated from the following files: