![]() |
Qt 6.x
The Qt SDK
|
#include <qopenglframebufferobject_p.h>
Classes | |
struct | ColorAttachment |
Public Member Functions | |
QOpenGLFramebufferObjectPrivate () | |
~QOpenGLFramebufferObjectPrivate () | |
void | init (QOpenGLFramebufferObject *q, const QSize &size, QOpenGLFramebufferObject::Attachment attachment, GLenum texture_target, GLenum internal_format, GLint samples=0, bool mipmap=false) |
void | initTexture (int idx) |
void | initColorBuffer (int idx, GLint *samples) |
void | initDepthStencilAttachments (QOpenGLContext *ctx, QOpenGLFramebufferObject::Attachment attachment) |
bool | checkFramebufferStatus (QOpenGLContext *ctx) const |
GLuint | fbo () const |
Definition at line 73 of file qopenglframebufferobject_p.h.
|
inline |
Definition at line 76 of file qopenglframebufferobject_p.h.
|
inline |
Definition at line 79 of file qopenglframebufferobject_p.h.
bool QOpenGLFramebufferObjectPrivate::checkFramebufferStatus | ( | QOpenGLContext * | ctx | ) | const |
Definition at line 391 of file qopenglframebufferobject.cpp.
References GL_FRAMEBUFFER, GL_FRAMEBUFFER_COMPLETE, GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT, GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER, GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT, GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE, GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER, GL_FRAMEBUFFER_UNSUPPORTED, GLenum(), and qDebug.
Referenced by initColorBuffer(), initDepthStencilAttachments(), and initTexture().
|
inline |
Definition at line 111 of file qopenglframebufferobject_p.h.
References fbo_guard, and QOpenGLSharedResourceGuard::id().
Referenced by Q_TRACE_INSTRUMENT().
void QOpenGLFramebufferObjectPrivate::init | ( | QOpenGLFramebufferObject * | q, |
const QSize & | size, | ||
QOpenGLFramebufferObject::Attachment | attachment, | ||
GLenum | texture_target, | ||
GLenum | internal_format, | ||
GLint | samples = 0 , |
||
bool | mipmap = false |
||
) |
Definition at line 580 of file qopenglframebufferobject.cpp.
References checkFramebufferStatus(), colorAttachments, QOpenGLContext::currentContext(), funcs, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER, GL_RENDERBUFFER, GL_RENDERBUFFER_SAMPLES, GL_RGB10, GL_RGB10_A2, GL_RGBA, GL_RGBA8, QOpenGLFunctions::glBindRenderbuffer(), QOpenGLFunctions::glDeleteRenderbuffers(), GLenum(), QOpenGLFunctions::glFramebufferRenderbuffer(), QOpenGLFunctions::glGenRenderbuffers(), QOpenGLFunctions::glGetRenderbufferParameteriv(), QOpenGLExtraFunctions::glRenderbufferStorageMultisample(), GLuint, QOpenGLExtensions::hasOpenGLExtension(), QT_CHECK_GLERROR, QOpenGLExtensions::Sized8Formats, and valid.
Referenced by Q_TRACE_INSTRUMENT().
void QOpenGLFramebufferObjectPrivate::initDepthStencilAttachments | ( | QOpenGLContext * | ctx, |
QOpenGLFramebufferObject::Attachment | attachment | ||
) |
Definition at line 620 of file qopenglframebufferobject.cpp.
References checkFramebufferStatus(), QOpenGLFramebufferObject::CombinedDepthStencil, QOpenGLFramebufferObject::Depth, QOpenGLExtensions::Depth24, depth_buffer_guard, dsSize, fbo_attachment, QOpenGLExtensions::FramebufferMultisample, QOpenGLSharedResource::free(), funcs, GL_DEPTH24_STENCIL8, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24, GL_DEPTH_STENCIL, GL_DEPTH_STENCIL_ATTACHMENT, GL_FRAMEBUFFER, GL_RENDERBUFFER, GL_STENCIL_ATTACHMENT, GL_STENCIL_INDEX, GL_STENCIL_INDEX8, QOpenGLFunctions::glBindRenderbuffer(), QOpenGLFunctions::glDeleteRenderbuffers(), GLenum(), QOpenGLFunctions::glFramebufferRenderbuffer(), QOpenGLFunctions::glGenRenderbuffers(), QOpenGLFunctions::glIsRenderbuffer(), QOpenGLFunctions::glRenderbufferStorage(), QOpenGLExtraFunctions::glRenderbufferStorageMultisample(), GLuint, QOpenGLExtensions::hasOpenGLExtension(), QSize::height(), QOpenGLFramebufferObject::NoAttachment, QOpenGLExtensions::PackedDepthStencil, Q_ASSERT, QT_CHECK_GLERROR, requestedSamples, stencil_buffer_guard, storage, valid, and QSize::width().
Referenced by Q_TRACE_INSTRUMENT().
void QOpenGLFramebufferObjectPrivate::initTexture | ( | int | idx | ) |
Definition at line 530 of file qopenglframebufferobject.cpp.
References checkFramebufferStatus(), colorAttachments, QOpenGLContext::currentContext(), funcs, GL_CLAMP_TO_EDGE, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER, GL_HALF_FLOAT, GL_RGB10, GL_RGB10_A2, GL_RGB16, GL_RGB16F, GL_RGBA, GL_RGBA16, GL_RGBA16F, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT_2_10_10_10_REV, QOpenGLFunctions::glBindTexture(), QOpenGLFunctions::glDeleteTextures(), QOpenGLFunctions::glFramebufferTexture2D(), QOpenGLFunctions::glGenTextures(), QOpenGLFunctions::glTexImage2D(), QOpenGLFunctions::glTexParameteri(), GLuint, qMax(), QT_CHECK_GLERROR, and valid.
Referenced by Q_TRACE_INSTRUMENT().
QVarLengthArray<ColorAttachment, 8> QOpenGLFramebufferObjectPrivate::colorAttachments |
Definition at line 109 of file qopenglframebufferobject_p.h.
Referenced by initColorBuffer(), initTexture(), and Q_TRACE_INSTRUMENT().
QOpenGLSharedResourceGuard* QOpenGLFramebufferObjectPrivate::depth_buffer_guard |
Definition at line 91 of file qopenglframebufferobject_p.h.
Referenced by initDepthStencilAttachments().
QSize QOpenGLFramebufferObjectPrivate::dsSize |
Definition at line 94 of file qopenglframebufferobject_p.h.
Referenced by initDepthStencilAttachments(), and Q_TRACE_INSTRUMENT().
QOpenGLFramebufferObject::Attachment QOpenGLFramebufferObjectPrivate::fbo_attachment |
Definition at line 98 of file qopenglframebufferobject_p.h.
Referenced by initDepthStencilAttachments().
QOpenGLSharedResourceGuard* QOpenGLFramebufferObjectPrivate::fbo_guard |
Definition at line 90 of file qopenglframebufferobject_p.h.
Referenced by fbo(), and Q_TRACE_INSTRUMENT().
QOpenGLFramebufferObjectFormat QOpenGLFramebufferObjectPrivate::format |
Definition at line 95 of file qopenglframebufferobject_p.h.
QOpenGLExtensions QOpenGLFramebufferObjectPrivate::funcs |
Definition at line 99 of file qopenglframebufferobject_p.h.
Referenced by initColorBuffer(), initDepthStencilAttachments(), initTexture(), and Q_TRACE_INSTRUMENT().
int QOpenGLFramebufferObjectPrivate::requestedSamples |
Definition at line 96 of file qopenglframebufferobject_p.h.
Referenced by initDepthStencilAttachments(), and Q_TRACE_INSTRUMENT().
QOpenGLSharedResourceGuard* QOpenGLFramebufferObjectPrivate::stencil_buffer_guard |
Definition at line 92 of file qopenglframebufferobject_p.h.
Referenced by initDepthStencilAttachments().
GLenum QOpenGLFramebufferObjectPrivate::target |
Definition at line 93 of file qopenglframebufferobject_p.h.
uint QOpenGLFramebufferObjectPrivate::valid |
Definition at line 97 of file qopenglframebufferobject_p.h.
Referenced by initColorBuffer(), initDepthStencilAttachments(), initTexture(), and Q_TRACE_INSTRUMENT().