![]() |
Qt 6.x
The Qt SDK
|
#include "qopenglframebufferobject.h"
#include "qopenglframebufferobject_p.h"
#include <qdebug.h>
#include <private/qopengl_p.h>
#include <private/qopenglcontext_p.h>
#include <private/qopenglextensions_p.h>
#include <private/qfont_p.h>
#include <qwindow.h>
#include <qimage.h>
#include <QtCore/qbytearray.h>
#include <qtopengl_tracepoints_p.h>
Go to the source code of this file.
Macros | |
#define | QT_RESET_GLERROR() |
#define | QT_CHECK_GLERROR() |
#define | GL_MAX_SAMPLES 0x8D57 |
#define | GL_RENDERBUFFER_SAMPLES 0x8CAB |
#define | GL_DEPTH24_STENCIL8 0x88F0 |
#define | GL_DEPTH_COMPONENT24 0x81A6 |
#define | GL_DEPTH_COMPONENT24_OES 0x81A6 |
#define | GL_READ_FRAMEBUFFER 0x8CA8 |
#define | GL_DRAW_FRAMEBUFFER 0x8CA9 |
#define | GL_RGB8 0x8051 |
#define | GL_RGB10 0x8052 |
#define | GL_RGB16 0x8054 |
#define | GL_RGBA8 0x8058 |
#define | GL_RGB10_A2 0x8059 |
#define | GL_RGBA16 0x805B |
#define | GL_BGRA 0x80E1 |
#define | GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 |
#define | GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 |
#define | GL_CONTEXT_LOST 0x0507 |
#define | GL_DEPTH_STENCIL_ATTACHMENT 0x821A |
#define | GL_DEPTH_STENCIL 0x84F9 |
#define | GL_HALF_FLOAT 0x140B |
#define | GL_RGBA32F 0x8814 |
#define | GL_RGB32F 0x8815 |
#define | GL_RGBA16F 0x881A |
#define | GL_RGB16F 0x881B |
#define GL_BGRA 0x80E1 |
Definition at line 105 of file qopenglframebufferobject.cpp.
#define GL_CONTEXT_LOST 0x0507 |
Definition at line 117 of file qopenglframebufferobject.cpp.
#define GL_DEPTH24_STENCIL8 0x88F0 |
Definition at line 61 of file qopenglframebufferobject.cpp.
#define GL_DEPTH_COMPONENT24 0x81A6 |
Definition at line 65 of file qopenglframebufferobject.cpp.
#define GL_DEPTH_COMPONENT24_OES 0x81A6 |
Definition at line 69 of file qopenglframebufferobject.cpp.
#define GL_DEPTH_STENCIL 0x84F9 |
Definition at line 125 of file qopenglframebufferobject.cpp.
#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A |
Definition at line 121 of file qopenglframebufferobject.cpp.
#define GL_DRAW_FRAMEBUFFER 0x8CA9 |
Definition at line 77 of file qopenglframebufferobject.cpp.
#define GL_HALF_FLOAT 0x140B |
Definition at line 129 of file qopenglframebufferobject.cpp.
#define GL_MAX_SAMPLES 0x8D57 |
Definition at line 53 of file qopenglframebufferobject.cpp.
#define GL_READ_FRAMEBUFFER 0x8CA8 |
Definition at line 73 of file qopenglframebufferobject.cpp.
#define GL_RENDERBUFFER_SAMPLES 0x8CAB |
Definition at line 57 of file qopenglframebufferobject.cpp.
#define GL_RGB10 0x8052 |
Definition at line 85 of file qopenglframebufferobject.cpp.
#define GL_RGB10_A2 0x8059 |
Definition at line 97 of file qopenglframebufferobject.cpp.
#define GL_RGB16 0x8054 |
Definition at line 89 of file qopenglframebufferobject.cpp.
#define GL_RGB16F 0x881B |
Definition at line 145 of file qopenglframebufferobject.cpp.
#define GL_RGB32F 0x8815 |
Definition at line 137 of file qopenglframebufferobject.cpp.
#define GL_RGB8 0x8051 |
Definition at line 81 of file qopenglframebufferobject.cpp.
#define GL_RGBA16 0x805B |
Definition at line 101 of file qopenglframebufferobject.cpp.
#define GL_RGBA16F 0x881A |
Definition at line 141 of file qopenglframebufferobject.cpp.
#define GL_RGBA32F 0x8814 |
Definition at line 133 of file qopenglframebufferobject.cpp.
#define GL_RGBA8 0x8058 |
Definition at line 93 of file qopenglframebufferobject.cpp.
#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 |
Definition at line 113 of file qopenglframebufferobject.cpp.
#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 |
Definition at line 109 of file qopenglframebufferobject.cpp.
#define QT_CHECK_GLERROR | ( | ) |
Definition at line 39 of file qopenglframebufferobject.cpp.
#define QT_RESET_GLERROR | ( | ) |
Definition at line 31 of file qopenglframebufferobject.cpp.
Definition at line 875 of file qopenglframebufferobject.cpp.
References QOpenGLContext::currentContext(), GL_RGBA, GL_RGBA8, and QOpenGLContext::isOpenGLES().
Referenced by QOpenGLFramebufferObject::QOpenGLFramebufferObject(), QOpenGLFramebufferObject::QOpenGLFramebufferObject(), QOpenGLFramebufferObject::QOpenGLFramebufferObject(), and QOpenGLFramebufferObject::addColorAttachment().
void Q_TRACE_INSTRUMENT | ( | qtopengl | ) |
Definition at line 464 of file qopenglframebufferobject.cpp.
References QOpenGLFramebufferObjectPrivate::colorAttachments, QOpenGLContext::currentContext(), QOpenGLFramebufferObjectPrivate::dsSize, QOpenGLFramebufferObjectPrivate::fbo(), QOpenGLFramebufferObjectPrivate::fbo_guard, QOpenGLExtensions::FramebufferBlit, QOpenGLExtensions::FramebufferMultisample, QOpenGLFunctions::Framebuffers, QOpenGLFramebufferObjectPrivate::funcs, QOpenGLContextPrivate::get(), GL_FRAMEBUFFER, GL_MAX_SAMPLES, QOpenGLFunctions::glBindFramebuffer(), QOpenGLFunctions::glDeleteFramebuffers(), QOpenGLFunctions::glGenFramebuffers(), QOpenGLFunctions::glGetIntegerv(), GLint(), GLuint, QOpenGLExtensions::hasOpenGLExtension(), QOpenGLFunctions::hasOpenGLFeature(), QOpenGLFramebufferObjectPrivate::initColorBuffer(), QOpenGLFramebufferObjectPrivate::initDepthStencilAttachments(), QOpenGLFunctions::initializeOpenGLFunctions(), QOpenGLFramebufferObjectPrivate::initTexture(), Q_TRACE_SCOPE, Q_UNUSED, qBound(), QOpenGLContextPrivate::qgl_current_fbo_invalid, qMax(), QT_CHECK_GLERROR, QT_RESET_GLERROR, QOpenGLFramebufferObjectPrivate::requestedSamples, and QOpenGLFramebufferObjectPrivate::valid.
Q_TRACE_METADATA | ( | qtopengl | , |
"ENUM { } QOpenGLFramebufferObject::Attachment; " | |||
) |
Q_TRACE_PARAM_REPLACE | ( | GLenum | , |
int | |||
) |
Q_TRACE_PARAM_REPLACE | ( | GLint | , |
int | |||
) |
QT_BEGIN_NAMESPACE Q_TRACE_PREFIX | ( | qtopengl | , |
"#include <private/qopengl2pexvertexarray_p.h>" "#include <private/qopengltextureuploader_p.h>" "#include <qopenglframebufferobject.h>" | |||
) |
Q_OPENGL_EXPORT QImage qt_gl_read_framebuffer | ( | const QSize & | size, |
bool | alpha_format, | ||
bool | include_alpha | ||
) |
Definition at line 1436 of file qopenglframebufferobject.cpp.
References GL_RGBA, and qt_gl_read_framebuffer().
|
static |
Definition at line 1398 of file qopenglframebufferobject.cpp.
References QOpenGLContext::currentContext(), error, funcs, GL_CONTEXT_LOST, GL_RGB10, GL_RGB10_A2, GL_RGB16, GL_RGB16F, GL_RGB32F, GL_RGB8, GL_RGBA, GL_RGBA16, GL_RGBA16F, GL_RGBA32F, GL_RGBA8, GLenum(), QImage::mirrored(), qt_gl_read_framebuffer_rgb10a2(), qt_gl_read_framebuffer_rgba16(), qt_gl_read_framebuffer_rgba16f(), qt_gl_read_framebuffer_rgba32f(), and qt_gl_read_framebuffer_rgba8().
Referenced by QOpenGLWindow::grabFramebuffer(), QOpenGLWidgetPrivate::grabFramebuffer(), qt_gl_read_framebuffer(), and QOpenGLFramebufferObject::toImage().
|
inlinestatic |
Definition at line 1363 of file qopenglframebufferobject.cpp.
References context, QImage::Format_A2BGR30_Premultiplied, QImage::Format_BGR30, GL_RGBA, and GL_UNSIGNED_INT_2_10_10_10_REV.
Referenced by qt_gl_read_framebuffer().
|
inlinestatic |
Definition at line 1372 of file qopenglframebufferobject.cpp.
References context, QImage::Format_RGBA64_Premultiplied, QImage::Format_RGBX64, and GL_RGBA.
Referenced by qt_gl_read_framebuffer().
|
inlinestatic |
Definition at line 1381 of file qopenglframebufferobject.cpp.
References context, QImage::Format_RGBA16FPx4_Premultiplied, QImage::Format_RGBX16FPx4, GL_HALF_FLOAT, and GL_RGBA.
Referenced by qt_gl_read_framebuffer().
|
inlinestatic |
Definition at line 1390 of file qopenglframebufferobject.cpp.
References context, QImage::Format_RGBA32FPx4_Premultiplied, QImage::Format_RGBX32FPx4, GL_FLOAT, and GL_RGBA.
Referenced by qt_gl_read_framebuffer().
|
inlinestatic |
Definition at line 1339 of file qopenglframebufferobject.cpp.
References QImage::bits(), context, QImage::Format_ARGB32_Premultiplied, QImage::Format_RGB32, QImage::Format_RGBA8888_Premultiplied, QImage::Format_RGBX8888, funcs, GL_BGRA, GL_RGBA, GL_UNSIGNED_BYTE, GL_UNSIGNED_INT_8_8_8_8_REV, and QImage::isNull().
Referenced by qt_gl_read_framebuffer().