Qt 4.8
|
The QGLContext class encapsulates an OpenGL rendering context. More...
#include <qgl.h>
Public Types | |
enum | BindOption { NoBindOption = 0x0000, InvertedYBindOption = 0x0001, MipmapBindOption = 0x0002, PremultipliedAlphaBindOption = 0x0004, LinearFilteringBindOption = 0x0008, MemoryManagedBindOption = 0x0010, CanFlipNativePixmapBindOption = 0x0020, DefaultBindOption, InternalBindOption } |
A set of options to decide how to bind a texture using bindTexture(). More... | |
Public Functions | |
GLuint | bindTexture (const QImage &image, GLenum target, GLint format, BindOptions options) |
Generates and binds a 2D GL texture to the current context, based on image. More... | |
GLuint | bindTexture (const QPixmap &pixmap, GLenum target, GLint format, BindOptions options) |
Generates and binds a 2D GL texture to the current context, based on pixmap. More... | |
GLuint | bindTexture (const QImage &image, GLenum target=GL_TEXTURE_2D, GLint format=GL_RGBA) |
Generates and binds a 2D GL texture to the current context, based on image. More... | |
GLuint | bindTexture (const QPixmap &pixmap, GLenum target=GL_TEXTURE_2D, GLint format=GL_RGBA) |
Generates and binds a 2D GL texture based on pixmap. More... | |
GLuint | bindTexture (const QString &fileName) |
Reads the compressed texture file fileName and generates a 2D GL texture from it. More... | |
void | deleteTexture (GLuint tx_id) |
Removes the texture identified by id from the texture cache, and calls glDeleteTextures() to delete the texture from the context. More... | |
void | drawTexture (const QRectF &target, GLuint textureId, GLenum textureTarget=GL_TEXTURE_2D) |
This function supports the following use cases: More... | |
void | drawTexture (const QPointF &point, GLuint textureId, GLenum textureTarget=GL_TEXTURE_2D) |
This function supports the following use cases: More... | |
QGLContext (const QGLFormat &format, QPaintDevice *device) | |
Constructs an OpenGL context for the given paint device, which can be a widget or a pixmap. More... | |
QGLContext (const QGLFormat &format) | |
Constructs an OpenGL context with the given format which specifies several display options for the context. More... | |
void | setFormat (const QGLFormat &format) |
Sets a format for this context. More... | |
void | updatePaintDevice () |
virtual | ~QGLContext () |
Destroys the OpenGL context and frees its resources. More... | |
Static Public Functions | |
static bool | areSharing (const QGLContext *context1, const QGLContext *context2) |
Returns true if context1 and context2 are sharing their GL resources such as textures, shader programs, etc; otherwise returns false. More... | |
static void | setTextureCacheLimit (int size) |
This function sets the limit for the texture cache to size, expressed in kilobytes. More... | |
static int | textureCacheLimit () |
Returns the current texture cache limit in kilobytes. More... | |
Protected Functions | |
virtual void * | chooseMacVisual (GDHandle) |
Mac OS X only: This virtual function tries to find a visual that matches the format, reducing the demands if the original request cannot be met. More... | |
uint | colorIndex (const QColor &c) const |
Returns a colormap index for the color c, in ColorIndex mode. More... | |
void | setDevice (QPaintDevice *pDev) |
Static Protected Variables | |
static QGLContext * | currentCtx = 0 |
Properties | |
QScopedPointer< QGLContextPrivate > | d_ptr |
Friends | |
class | QGL2PaintEngineEx |
class | QGL2PaintEngineExPrivate |
class | QGLContextGroup |
class | QGLContextResourceBase |
class | QGLEngineShaderManager |
class | QGLExtensions |
class | QGLFBOGLPaintDevice |
QGLFormat::OpenGLVersionFlags | QGLFormat::openGLVersionFlags () |
class | QGLFramebufferObject |
class | QGLFramebufferObjectPrivate |
class | QGLGlyphCache |
struct | QGLGlyphTexture |
class | QGLPaintDevice |
class | QGLPixelBuffer |
class | QGLPixelBufferPrivate |
class | QGLPixmapBlurFilter |
class | QGLPixmapData |
class | QGLPixmapFilterBase |
class | QGLSharedResourceGuard |
class | QGLTexture |
class | QGLTextureGlyphCache |
class | QGLWidget |
class | QGLWidgetGLPaintDevice |
class | QGLWidgetPrivate |
class | QGLWindowSurface |
class | QMacGLWindowChangeEvent |
class | QOpenGLPaintEngine |
class | QOpenGLPaintEnginePrivate |
QGLContextPrivate * | qt_phonon_get_dptr (const QGLContext *) |
class | QX11GLPixmapData |
class | QX11GLSharedContexts |
virtual bool | create (const QGLContext *shareContext=0) |
Creates the GL context. More... | |
bool | isValid () const |
Returns true if a GL rendering context has been successfully created; otherwise returns false. More... | |
bool | isSharing () const |
Returns true if this context is sharing its GL context with another QGLContext, otherwise false is returned. More... | |
void | reset () |
Resets the context and makes it invalid. More... | |
QGLFormat | format () const |
Returns the frame buffer format that was obtained (this may be a subset of what was requested). More... | |
QGLFormat | requestedFormat () const |
Returns the frame buffer format that was originally requested in the constructor or setFormat(). More... | |
virtual void | makeCurrent () |
Makes this context the current OpenGL rendering context. More... | |
virtual void | doneCurrent () |
Makes no GL context the current context. More... | |
virtual void | swapBuffers () const |
Swaps the screen contents with an off-screen buffer. More... | |
void * | getProcAddress (const QString &proc) const |
Returns a function pointer to the GL extension function passed in proc. More... | |
QPaintDevice * | device () const |
Returns the paint device set for this context. More... | |
QColor | overlayTransparentColor () const |
If this context is a valid context in an overlay plane, returns the plane's transparent color. More... | |
static const QGLContext * | currentContext () |
Returns the current context, i.e. More... | |
virtual bool | chooseContext (const QGLContext *shareContext=0) |
This semi-internal function is called by create(). More... | |
virtual int | choosePixelFormat (void *pfd, HDC pdc) |
Win32 only: This virtual function chooses a pixel format that matches the OpenGL format. More... | |
virtual void * | tryVisual (const QGLFormat &f, int bufDepth=1) |
virtual void * | chooseVisual () |
X11 only: This virtual function tries to find a visual that matches the format, reducing the demands if the original request cannot be met. More... | |
bool | deviceIsPixmap () const |
Returns true if the paint device of this context is a pixmap; otherwise returns false. More... | |
bool | windowCreated () const |
Returns true if a window has been created for this context; otherwise returns false. More... | |
void | setWindowCreated (bool on) |
If on is true the context has had a window created for it. More... | |
bool | initialized () const |
Returns true if this context has been initialized, i. More... | |
void | setInitialized (bool on) |
If on is true the context has been initialized, i. More... | |
void | generateFontDisplayLists (const QFont &fnt, int listBase) |
Generates a set of 256 display lists for the 256 first characters in the font font. More... | |
void | setValid (bool valid) |
Forces the GL rendering context to be valid. More... | |
The QGLContext class encapsulates an OpenGL rendering context.
An OpenGL rendering context is a complete set of OpenGL state variables. The rendering context's QGL::FormatOption {format} is set in the constructor, but it can also be set later with setFormat(). The format options that are actually set are returned by format(); the options you asked for are returned by requestedFormat(). Note that after a QGLContext object has been constructed, the actual OpenGL context must be created by explicitly calling the create() function. The makeCurrent() function makes this context the current rendering context. You can make no context current using doneCurrent(). The reset() function will reset the context and make it invalid.
You can examine properties of the context with, e.g. isValid(), isSharing(), initialized(), windowCreated() and overlayTransparentColor().
If you're using double buffering you can swap the screen contents with the off-screen buffer using swapBuffers().
Please note that QGLContext is not thread-safe.
A set of options to decide how to bind a texture using bindTexture().
GL_SGIS_generate_mipmap
extension, mipmaps will be automatically generated for the texture. Mipmap generation is only supported for the GL_TEXTURE_2D
target.QGLContext::QGLContext | ( | const QGLFormat & | format, |
QPaintDevice * | device | ||
) |
Constructs an OpenGL context for the given paint device, which can be a widget or a pixmap.
The format specifies several display options for the context.
If the underlying OpenGL/Window system cannot satisfy all the features requested in format, the nearest subset of features will be used. After creation, the format() method will return the actual format obtained.
Note that after a QGLContext object has been constructed, create() must be called explicitly to create the actual OpenGL context. The context will be isValid(){invalid} if it was not possible to obtain a GL context at all.
Definition at line 2133 of file qgl.cpp.
Referenced by QGLWidget::event().
QGLContext::QGLContext | ( | const QGLFormat & | format | ) |
Constructs an OpenGL context with the given format which specifies several display options for the context.
If the underlying OpenGL/Window system cannot satisfy all the features requested in format, the nearest subset of features will be used. After creation, the format() method will return the actual format obtained.
Note that after a QGLContext object has been constructed, create() must be called explicitly to create the actual OpenGL context. The context will be isValid(){invalid} if it was not possible to obtain a GL context at all.
Definition at line 2155 of file qgl.cpp.
|
virtual |
Destroys the OpenGL context and frees its resources.
Definition at line 2166 of file qgl.cpp.
|
static |
Returns true if context1 and context2 are sharing their GL resources such as textures, shader programs, etc; otherwise returns false.
Definition at line 3319 of file qgl.cpp.
Referenced by QGLShaderProgram::addShader(), QOpenGLPaintEngine::begin(), QGLBuffer::bind(), QGLShaderProgram::bind(), QGLGlyphCache::cacheGlyphs(), QGLGradientCache::getBuffer(), QGLProgramCache::getProgram(), QGLOffscreen::initialize(), QGLPixmapData::isValidContext(), QGLShader::QGLShader(), QGLShareContextScope::QGLShareContextScope(), and QGLShaderProgram::release().
GLuint QGLContext::bindTexture | ( | const QImage & | image, |
GLenum | target, | ||
GLint | format, | ||
BindOptions | options | ||
) |
Generates and binds a 2D GL texture to the current context, based on image.
The generated texture id is returned and can be used in later glBindTexture()
calls.
The target parameter specifies the texture target. The default target is GL_TEXTURE_2D
.
The format parameter sets the internal format for the texture. The default format is GL_RGBA
.
The binding options are a set of options used to decide how to bind the texture to the context.
The texture that is generated is cached, so multiple calls to bindTexture() with the same QImage will return the same texture id.
Note that we assume default values for the glPixelStore() and glPixelTransfer() parameters.
Definition at line 2854 of file qgl.cpp.
Referenced by QGLPixmapFilterBase::bindTexture(), QOpenGLPaintEnginePrivate::composite(), QGL2PaintEngineEx::drawImage(), QGL2PaintEngineEx::drawPixmap(), and QGL2PaintEngineExPrivate::updateBrushTexture().
GLuint QGLContext::bindTexture | ( | const QPixmap & | pixmap, |
GLenum | target, | ||
GLint | format, | ||
BindOptions | options | ||
) |
Generates and binds a 2D GL texture to the current context, based on pixmap.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2916 of file qgl.cpp.
GLuint QGLContext::bindTexture | ( | const QImage & | image, |
GLenum | target = GL_TEXTURE_2D , |
||
GLint | format = GL_RGBA |
||
) |
Generates and binds a 2D GL texture to the current context, based on image.
The generated texture id is returned and can be used in later glBindTexture()
calls.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2816 of file qgl.cpp.
GLuint QGLContext::bindTexture | ( | const QPixmap & | pixmap, |
GLenum | target = GL_TEXTURE_2D , |
||
GLint | format = GL_RGBA |
||
) |
Generates and binds a 2D GL texture based on pixmap.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2896 of file qgl.cpp.
GLuint QGLContext::bindTexture | ( | const QString & | fileName | ) |
Reads the compressed texture file fileName and generates a 2D GL texture from it.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This function can load DirectDrawSurface (DDS) textures in the DXT1, DXT3 and DXT5 DDS formats if the GL_ARB_texture_compression
and GL_EXT_texture_compression_s3tc
extensions are supported.
Since 4.6.1, textures in the ETC1 format can be loaded if the GL_OES_compressed_ETC1_RGB8_texture
extension is supported and the ETC1 texture has been encapsulated in the PVR container format. Also, textures in the PVRTC2 and PVRTC4 formats can be loaded if the GL_IMG_texture_compression_pvrtc
extension is supported.
Definition at line 2250 of file qgl.cpp.
|
protectedvirtual |
This semi-internal function is called by create().
It creates a system-dependent OpenGL handle that matches the format() of shareContext as closely as possible, returning true if successful or false if a suitable handle could not be found.
On Windows, it calls the virtual function choosePixelFormat(), which finds a matching pixel format identifier. On X11, it calls the virtual function chooseVisual() which finds an appropriate X visual. On other platforms it may work differently.
Definition at line 190 of file qgl_mac.mm.
Referenced by buildSpec(), qDeleteQGLContext(), qt_egl_create_surface(), and QGLContextPrivate::updateFormatVersion().
|
protectedvirtual |
Mac OS X only: This virtual function tries to find a visual that matches the format, reducing the demands if the original request cannot be met.
The algorithm for reducing the demands of the format is quite simple-minded, so override this method in your subclass if your application has spcific requirements on visual selection.
The handle argument is always zero and is not used
Definition at line 492 of file qgl_mac.mm.
|
protectedvirtual |
Win32 only: This virtual function chooses a pixel format that matches the OpenGL format.
Reimplement this function in a subclass if you need a custom context.
PIXELFORMATDESCRIPTOR*
. We use void
to avoid using Windows-specific types in our header files.Definition at line 1015 of file qgl_win.cpp.
Referenced by qLogEq().
|
protectedvirtual |
X11 only: This virtual function tries to find a visual that matches the format, reducing the demands if the original request cannot be met.
The algorithm for reducing the demands of the format is quite simple-minded, so override this method in your subclass if your application has spcific requirements on visual selection.
Definition at line 762 of file qgl_x11.cpp.
Returns a colormap index for the color c, in ColorIndex mode.
Used by qglColor() and qglClearColor().
Definition at line 367 of file qgl_egl.cpp.
Referenced by choosePixelFormat(), qDeleteQGLContext(), and qt_transparent_pixel().
|
virtual |
Creates the GL context.
Returns true if it was successful in creating a valid GL rendering context on the paint device specified in the constructor; otherwise returns false (i.e. the context is invalid).
After successful creation, format() returns the set of features of the created GL rendering context.
If shareContext points to a valid QGLContext, this method will try to establish OpenGL display list and texture object sharing between this context and the shareContext. Note that this may fail if the two contexts have different format() {formats}. Use isSharing() to see if sharing is in effect.
Definition at line 3454 of file qgl.cpp.
Referenced by QGLWindowSurface::hijackWindow(), and nearest_gl_texture_size().
|
static |
Returns the current context, i.e.
the context to which any OpenGL commands will currently be directed. Returns 0 if no context is current.
Definition at line 3545 of file qgl.cpp.
Referenced by QGLPaintDevice::beginPaint(), QGLFramebufferObject::bind(), QGLBuffer::bind(), QGLShaderProgram::bind(), QGLFramebufferObject::bindDefault(), QGLPixmapFilterBase::bindTexture(), QGLFramebufferObject::blitFramebuffer(), buildSpec(), QGLGlyphCache::cleanCache(), QGLFBOGLPaintDevice::context(), QGLBuffer::create(), ShaderEffect::draw(), QGL2PaintEngineExPrivate::drawCachedGlyphs(), drawTexture(), QGLFramebufferObject::drawTexture(), QGLPaintDevice::ensureActiveTarget(), QX11GLWindowSurface::flush(), QGLWindowSurface::flush(), QGLTextureDestroyer::freeTexture_slot(), QX11GLWindowSurface::grabWidget(), QGLShaderProgram::hasOpenGLShaderPrograms(), QGLShader::hasOpenGLShaders(), QGLFramebufferObjectPrivate::init(), QGLShaderProgram::init(), QMeeGoExtensions::initialize(), QGLFramebufferObject::isBound(), ShaderEffectItem::paint(), QGLPixmapData::paintEngine(), QGLEngineSelector::preferredPaintEngine(), QGLPixmapBlurFilter::processGL(), QGLPixmapDropShadowFilter::processGL(), qglfResolveCheckFramebufferStatus(), qglfResolveCreateProgram(), qglfResolveCreateShader(), qglfResolveGetAttribLocation(), qglfResolveGetUniformLocation(), qglfResolveIsBuffer(), qglfResolveIsFramebuffer(), qglfResolveIsProgram(), qglfResolveIsRenderbuffer(), qglfResolveIsShader(), QGLShader::QGLShader(), QGLShareContextScope::QGLShareContextScope(), qt_format_to_attrib_list(), qt_gl_functions(), QGLFramebufferObject::release(), QGLBuffer::release(), QGLShaderProgram::release(), ShaderEffectItem::renderEffect(), QX11GLWindowSurface::scroll(), QGLFBOGLPaintDevice::setFBO(), QGLContextPrivate::unbindPixmapFromTexture(), ShaderEffectSource::updateBackbuffer(), QGL2PaintEngineExPrivate::updateBrushTexture(), QGLWindowSurface::updateGeometry(), QGLGlyphTexture::~QGLGlyphTexture(), and QGLPixelBuffer::~QGLPixelBuffer().
void QGLContext::deleteTexture | ( | GLuint | id | ) |
Removes the texture identified by id from the texture cache, and calls glDeleteTextures() to delete the texture from the context.
Definition at line 2957 of file qgl.cpp.
QPaintDevice * QGLContext::device | ( | ) | const |
Returns the paint device set for this context.
Definition at line 3507 of file qgl.cpp.
Referenced by QGLFramebufferObject::blitFramebuffer(), QGLGlyphCache::cacheGlyphs(), QGLOverlayWidget::paintGL(), qDeleteQGLContext(), qStoreColors(), and QGLWidgetPrivate::updateColormap().
|
protected |
Returns true if the paint device of this context is a pixmap; otherwise returns false.
Definition at line 3513 of file qgl.cpp.
Referenced by QGLOverlayWidget::paintGL(), qStoreColors(), and QGLWidgetPrivate::updateColormap().
|
virtual |
Makes no GL context the current context.
Normally, you do not need to call this function; QGLContext calls it as necessary.
Definition at line 277 of file qgl_egl.cpp.
Referenced by choosePixelFormat(), qDeleteQGLContext(), tryVisual(), QGLWindowSurface::updateGeometry(), updatePaintDevice(), and QGLThreadContext::~QGLThreadContext().
void QGLContext::drawTexture | ( | const QRectF & | target, |
GLuint | textureId, | ||
GLenum | textureTarget = GL_TEXTURE_2D |
||
) |
This function supports the following use cases:
On OpenGL and OpenGL ES 1.
x it draws the given texture, textureId, to the given target rectangle, target, in OpenGL model space. The textureTarget should be a 2D texture target.
Definition at line 3067 of file qgl.cpp.
void QGLContext::drawTexture | ( | const QPointF & | point, |
GLuint | textureId, | ||
GLenum | textureTarget = GL_TEXTURE_2D |
||
) |
This function supports the following use cases:
By default it draws the given texture, textureId, at the given point in OpenGL model space.
The textureTarget should be a 2D texture target.
Definition at line 3146 of file qgl.cpp.
QGLFormat QGLContext::format | ( | ) | const |
Returns the frame buffer format that was obtained (this may be a subset of what was requested).
Definition at line 3495 of file qgl.cpp.
Referenced by QGLWindowSurface::beginPaint(), buildSpec(), chooseContext(), QGLWindowSurface::flush(), QGLPaintDevice::format(), nearest_gl_texture_size(), QGLOverlayWidget::paintGL(), and QGLFBOGLPaintDevice::setFBO().
|
protected |
Generates a set of 256 display lists for the 256 first characters in the font font.
Definition at line 373 of file qgl_egl.cpp.
Referenced by choosePixelFormat(), qDeleteQGLContext(), and qgl_use_font().
void * QGLContext::getProcAddress | ( | const QString & | proc | ) | const |
Returns a function pointer to the GL extension function passed in proc.
0 is returned if a pointer to the function could not be obtained.
Definition at line 379 of file qgl_egl.cpp.
Referenced by choosePixelFormat(), qDeleteQGLContext(), qgl_use_font(), qt_getOpenGLBundle(), qt_gl_getProcAddress_search(), qt_resolve_eglimage_gl_extensions(), qt_resolve_frag_program_extensions(), qt_resolve_glsl_extensions(), qt_resolve_stencil_face_extension(), qt_resolve_version_1_3_functions(), and qt_resolve_version_2_0_functions().
|
protected |
Returns true if this context has been initialized, i.
e. if QGLWidget::initializeGL() has been performed on it; otherwise returns false.
Definition at line 3533 of file qgl.cpp.
bool QGLContext::isSharing | ( | ) | const |
Returns true if this context is sharing its GL context with another QGLContext, otherwise false is returned.
Note that context sharing might not be supported between contexts with different formats.
Definition at line 3489 of file qgl.cpp.
Referenced by QGLProgramCache::cleanupPrograms(), nearest_gl_texture_size(), and QGLWidgetPrivate::updateColormap().
bool QGLContext::isValid | ( | ) | const |
Returns true if a GL rendering context has been successfully created; otherwise returns false.
Definition at line 3477 of file qgl.cpp.
Referenced by buildSpec(), QGLGlyphCache::cacheGlyphs(), chooseContext(), QX11GLWindowSurface::flush(), QX11GLWindowSurface::grabWidget(), QGLWindowSurface::hijackWindow(), and QX11GLWindowSurface::scroll().
|
virtual |
Makes this context the current OpenGL rendering context.
All GL functions you call operate on this context until another context is made current.
In some very rare cases the underlying call may fail. If this occurs an error message is output to stderr.
Definition at line 213 of file qgl_egl.cpp.
Referenced by QOpenGLPaintEngine::begin(), QGLPaintDevice::beginPaint(), chooseMacVisual(), choosePixelFormat(), QX11GLPixmapData::copy(), QGLPaintDevice::ensureActiveTarget(), QX11GLPixmapData::fill(), QGLWindowSurface::flush(), QGLTextureDestroyer::freeTexture_slot(), QGLWindowSurface::paintDevice(), qDeleteQGLContext(), QGLShareContextScope::QGLShareContextScope(), QX11GLPixmapData::scroll(), tryVisual(), QGLWindowSurface::updateGeometry(), and QGLPixelBuffer::~QGLPixelBuffer().
QColor QGLContext::overlayTransparentColor | ( | ) | const |
If this context is a valid context in an overlay plane, returns the plane's transparent color.
Otherwise returns an QColor::isValid()}{invalid} color.
The returned QColor object will generally work as expected only when passed as the argument to QGLWidget::qglColor() or QGLWidget::qglClearColor(). Under certain circumstances it can also be used to draw transparent graphics with a QPainter.
Definition at line 362 of file qgl_egl.cpp.
Referenced by choosePixelFormat(), QGLOverlayWidget::initializeGL(), qDeleteQGLContext(), tryVisual(), and updatePaintDevice().
QGLFormat QGLContext::requestedFormat | ( | ) | const |
Returns the frame buffer format that was originally requested in the constructor or setFormat().
Definition at line 3501 of file qgl.cpp.
void QGLContext::reset | ( | ) |
Resets the context and makes it invalid.
Definition at line 191 of file qgl_egl.cpp.
Referenced by chooseMacVisual(), choosePixelFormat(), qDeleteQGLContext(), and tryVisual().
|
protected |
Definition at line 3267 of file qgl.cpp.
Referenced by qDeleteQGLContext().
void QGLContext::setFormat | ( | const QGLFormat & | format | ) |
Sets a format for this context.
The context is reset.
Call create() to create a new GL context that tries to match the new format.
Definition at line 3257 of file qgl.cpp.
|
protected |
If on is true the context has been initialized, i.
e. QGLContext::setInitialized() has been called on it. If on is false the context has not been initialized.
Definition at line 3539 of file qgl.cpp.
|
static |
This function sets the limit for the texture cache to size, expressed in kilobytes.
By default, the cache limit is approximately 64 MB.
Definition at line 3205 of file qgl.cpp.
|
protected |
|
protected |
If on is true the context has had a window created for it.
If on is false no window has been created for the context.
Definition at line 3527 of file qgl.cpp.
|
virtual |
Swaps the screen contents with an off-screen buffer.
Only works if the context is in double buffer mode.
Definition at line 287 of file qgl_egl.cpp.
Referenced by choosePixelFormat(), QGLWindowSurface::flush(), qDeleteQGLContext(), tryVisual(), and updatePaintDevice().
|
static |
Returns the current texture cache limit in kilobytes.
Definition at line 3215 of file qgl.cpp.
|
protectedvirtual |
X11 only: This virtual function chooses a visual that matches the OpenGL format. Reimplement this function in a subclass if you need a custom visual.
Definition at line 828 of file qgl_x11.cpp.
void QGLContext::updatePaintDevice | ( | ) |
Definition at line 583 of file qgl_mac.mm.
Referenced by QGLWindowSurface::updateGeometry().
|
protected |
Returns true if a window has been created for this context; otherwise returns false.
Definition at line 3520 of file qgl.cpp.
Referenced by QGLOverlayWidget::paintGL().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
staticprotected |
|
private |
Definition at line 430 of file qgl.h.
Referenced by QOpenGLPaintEngine::begin(), QGLPaintDevice::beginPaint(), QGLFramebufferObject::bind(), QGLFramebufferObject::bindDefault(), QGLFramebufferObject::blitFramebuffer(), QGLContextPrivate::contextGroup(), QGLPixmapData::copy(), QGLPixmapData::copyBackFromRenderFbo(), QGLTextureGlyphCache::createTextureData(), QOpenGLPaintEngine::end(), QGLPaintDevice::endPaint(), QGL2PaintEngineEx::ensureActive(), QGLPaintDevice::ensureActiveTarget(), QGLContextPrivate::extensionFuncs(), QGLTextureGlyphCache::fillTexture(), QGLWindowSurface::flush(), QGLFramebufferObjectPrivate::init(), QGLContextResourceBase::insert(), QGLFramebufferObject::isBound(), QGLTextureGlyphCache::maxTextureHeight(), QGLTextureGlyphCache::maxTextureWidth(), QGLGlyphTexture::QGLGlyphTexture(), QGLFramebufferObject::release(), QGLTextureGlyphCache::resizeTextureData(), QGLWindowSurface::updateGeometry(), and QGLContextResourceBase::value().