Qt 4.8
Functions
qglpixelbuffer.cpp File Reference
#include <QtCore/qglobal.h>
#include <private/qpaintengineex_opengl2_p.h>
#include <qglpixelbuffer.h>
#include <private/qglpixelbuffer_p.h>
#include <private/qfont_p.h>
#include <qimage.h>
#include <private/qpaintengine_opengl_p.h>

Go to the source code of this file.

Functions

void qgl_cleanup_glyph_cache (QGLContext *)
 
QImage qt_gl_read_framebuffer (const QSize &, bool, bool)
 

Function Documentation

◆ qgl_cleanup_glyph_cache()

void qgl_cleanup_glyph_cache ( QGLContext )

Definition at line 4917 of file qpaintengine_opengl.cpp.

Referenced by QGLPixelBuffer::~QGLPixelBuffer().

4918 {
4919  qt_glyph_cache()->cleanupContext(ctx);
4920 }
#define ctx
Definition: qgl.cpp:6094

◆ qt_gl_read_framebuffer()

QImage qt_gl_read_framebuffer ( const QSize ,
bool  ,
bool   
)

Definition at line 1860 of file qgl.cpp.

Referenced by QGLPixelBuffer::toImage().

1861 {
1862  QImage img(size, (alpha_format && include_alpha) ? QImage::Format_ARGB32_Premultiplied
1864  int w = size.width();
1865  int h = size.height();
1866  glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, img.bits());
1867  convertFromGLImage(img, w, h, alpha_format, include_alpha);
1868  return img;
1869 }
static void convertFromGLImage(QImage &img, int w, int h, bool alpha_format, bool include_alpha)
Definition: qgl.cpp:1818
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
#define GL_UNSIGNED_BYTE
#define GL_RGBA