![]() |
Qt 6.x
The Qt SDK
|
#include <qrhigles2_p.h>
Public Member Functions | |
QGles2RenderBuffer (QRhiImplementation *rhi, Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint) | |
~QGles2RenderBuffer () | |
void | destroy () override |
Releases (or requests deferred releasing of) the underlying native graphics resources. | |
bool | create () override |
Creates the corresponding native graphics resources. | |
bool | createFrom (NativeRenderBuffer src) override |
Similar to create() except that no new native renderbuffer objects are created. | |
QRhiTexture::Format | backingFormat () const override |
![]() | |
QRhiResource::Type | resourceType () const override |
Type | type () const |
void | setType (Type t) |
Sets the type to t. | |
QSize | pixelSize () const |
void | setPixelSize (const QSize &sz) |
Sets the size (in pixels) to sz. | |
int | sampleCount () const |
void | setSampleCount (int s) |
Sets the sample count to s. | |
Flags | flags () const |
void | setFlags (Flags f) |
Sets the flags to f. | |
virtual bool | create ()=0 |
Creates the corresponding native graphics resources. | |
virtual bool | createFrom (NativeRenderBuffer src) |
Similar to create() except that no new native renderbuffer objects are created. | |
virtual QRhiTexture::Format | backingFormat () const =0 |
![]() | |
virtual | ~QRhiResource () |
Destructor. | |
virtual Type | resourceType () const =0 |
virtual void | destroy ()=0 |
Releases (or requests deferred releasing of) the underlying native graphics resources. | |
void | deleteLater () |
When called without a frame being recorded, this function is equivalent to deleting the object. | |
QByteArray | name () const |
void | setName (const QByteArray &name) |
Sets a name for the object. | |
quint64 | globalResourceId () const |
QRhi * | rhi () const |
Public Attributes | |
GLuint | renderbuffer = 0 |
GLuint | stencilRenderbuffer = 0 |
int | samples |
bool | owns = true |
uint | generation = 0 |
Friends | |
class | QRhiGles2 |
Definition at line 62 of file qrhigles2_p.h.
QGles2RenderBuffer::QGles2RenderBuffer | ( | QRhiImplementation * | rhi, |
Type | type, | ||
const QSize & | pixelSize, | ||
int | sampleCount, | ||
QRhiRenderBuffer::Flags | flags, | ||
QRhiTexture::Format | backingFormatHint | ||
) |
Definition at line 5080 of file qrhigles2.cpp.
QGles2RenderBuffer::~QGles2RenderBuffer | ( | ) |
Definition at line 5087 of file qrhigles2.cpp.
References destroy().
|
overridevirtual |
Implements QRhiRenderBuffer.
Definition at line 5222 of file qrhigles2.cpp.
References QRhiRenderBuffer::Color, QRhiRenderBuffer::m_backingFormatHint, QRhiRenderBuffer::m_type, QRhiTexture::RGBA8, and QRhiTexture::UnknownFormat.
|
overridevirtual |
Creates the corresponding native graphics resources.
If there are already resources present due to an earlier create() with no corresponding destroy(), then destroy() is called implicitly first.
true
when successful, false
when a graphics operation failed. Regardless of the return value, calling destroy() is always safe. Implements QRhiRenderBuffer.
Definition at line 5114 of file qrhigles2.cpp.
References QRhiRenderBuffer::Color, QRhiRenderBuffer::DepthStencil, destroy(), generation, GL_DEPTH24_STENCIL8, GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24, GL_DEPTH_STENCIL, GL_RENDERBUFFER, GL_RGBA8, GL_STENCIL_INDEX, GL_STENCIL_INDEX8, GLenum(), QSize::isEmpty(), QRhiRenderBuffer::m_backingFormatHint, QRhiRenderBuffer::m_flags, QRhiRenderBuffer::m_pixelSize, QRhiRenderBuffer::m_sampleCount, QRhiRenderBuffer::m_type, owns, QRHI_RES_RHI, qWarning, stencilRenderbuffer, storage, toGlTextureFormat(), QRhiTexture::UnknownFormat, and QRhiRenderBuffer::UsedWithSwapChainOnly.
|
overridevirtual |
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.
false
.true
when successful, false
when not supported. Reimplemented from QRhiRenderBuffer.
Definition at line 5197 of file qrhigles2.cpp.
References destroy(), generation, QRhiRenderBuffer::m_flags, QRhiRenderBuffer::m_sampleCount, owns, QRHI_RES_RHI, qWarning, and QRhiRenderBuffer::UsedWithSwapChainOnly.
|
overridevirtual |
Releases (or requests deferred releasing of) the underlying native graphics resources.
Safe to call multiple times, subsequent invocations will be a no-op then.
Once destroy() is called, the QRhiResource instance can be reused, by calling create()
again. That will then result in creating new native graphics resources underneath.
The QRhiResource destructor also performs the same task, so calling this function is not necessary before deleting a QRhiResource.
Implements QRhiResource.
Definition at line 5092 of file qrhigles2.cpp.
References e, owns, QRHI_RES_RHI, renderbuffer, QRhiGles2::DeferredReleaseEntry::RenderBuffer, and stencilRenderbuffer.
Referenced by ~QGles2RenderBuffer(), create(), and createFrom().
|
friend |
Definition at line 78 of file qrhigles2_p.h.
uint QGles2RenderBuffer::generation = 0 |
Definition at line 77 of file qrhigles2_p.h.
Referenced by create(), and createFrom().
bool QGles2RenderBuffer::owns = true |
Definition at line 76 of file qrhigles2_p.h.
Referenced by create(), createFrom(), and destroy().
GLuint QGles2RenderBuffer::renderbuffer = 0 |
Definition at line 73 of file qrhigles2_p.h.
Referenced by QGles2TextureRenderTarget::create(), destroy(), and QRhiGles2::endPass().
int QGles2RenderBuffer::samples |
Definition at line 75 of file qrhigles2_p.h.
Referenced by QGles2TextureRenderTarget::create().
GLuint QGles2RenderBuffer::stencilRenderbuffer = 0 |
Definition at line 74 of file qrhigles2_p.h.
Referenced by create(), QGles2TextureRenderTarget::create(), and destroy().