#include <private/qtextengine_p.h>
#include <qdebug.h>
#include <private/qfontengine_p.h>
#include <private/qmath_p.h>
#include <private/qdrawhelper_p.h>
#include <private/qpaintengine_p.h>
#include "qapplication.h"
#include "qbrush.h"
#include "qgl.h"
#include <private/qgl_p.h>
#include "qmap.h"
#include <private/qpaintengine_opengl_p.h>
#include "qpen.h"
#include "qvarlengtharray.h"
#include <private/qpainter_p.h>
#include <qglpixelbuffer.h>
#include <private/qglpixelbuffer_p.h>
#include <private/qbezier_p.h>
#include <qglframebufferobject.h>
#include <private/qstroker_p.h>
#include <GL/glu.h>
#include <stdlib.h>
#include "qpaintengine_opengl_p.h"
#include "util/radial.frag"
#include "util/radial.glsl_quoted"
#include "util/conical.frag"
#include "util/conical.glsl_quoted"
#include "qpaintengine_opengl.moc"
Include dependency graph for qpaintengine_opengl.cpp:

Go to the source code of this file.
| #define GL_CLAMP_TO_EDGE 0x812F |
Definition at line 617 of file qpaintengine_opengl.cpp.
| #define GL_FRAGMENT_PROGRAM_ARB 0x8804 |
Definition at line 631 of file qpaintengine_opengl.cpp.
| #define GL_FRAGMENT_SHADER 0x8B30 |
Definition at line 637 of file qpaintengine_opengl.cpp.
| #define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 |
Definition at line 626 of file qpaintengine_opengl.cpp.
| #define GL_GENERATE_MIPMAP_SGIS 0x8191 |
Definition at line 625 of file qpaintengine_opengl.cpp.
| #define GL_LINK_STATUS 0x8B82 |
Definition at line 640 of file qpaintengine_opengl.cpp.
| #define GL_MIRRORED_REPEAT_IBM 0x8370 |
Definition at line 621 of file qpaintengine_opengl.cpp.
| #define GL_MULTISAMPLE 0x809D |
| #define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 |
Definition at line 632 of file qpaintengine_opengl.cpp.
| #define glAttachShader qt_glAttachShader |
Definition at line 714 of file qpaintengine_opengl.cpp.
| #define glBindProgramARB qt_glBindProgramARB |
Definition at line 702 of file qpaintengine_opengl.cpp.
| #define glCompileShader qt_glCompileShader |
Definition at line 710 of file qpaintengine_opengl.cpp.
| #define glCreateProgram qt_glCreateProgram |
Definition at line 713 of file qpaintengine_opengl.cpp.
| #define glCreateShader qt_glCreateShader |
Definition at line 708 of file qpaintengine_opengl.cpp.
| #define glDeleteProgram qt_glDeleteProgram |
Definition at line 718 of file qpaintengine_opengl.cpp.
| #define glDeleteProgramsARB qt_glDeleteProgramsARB |
Definition at line 703 of file qpaintengine_opengl.cpp.
| #define glDeleteShader qt_glDeleteShader |
Definition at line 711 of file qpaintengine_opengl.cpp.
| #define glDetachShader qt_glDetachShader |
Definition at line 715 of file qpaintengine_opengl.cpp.
| #define glGenProgramsARB qt_glGenProgramsARB |
Definition at line 704 of file qpaintengine_opengl.cpp.
| #define glGetProgramiv qt_glGetProgramiv |
Definition at line 721 of file qpaintengine_opengl.cpp.
| #define glGetShaderInfoLog qt_glGetShaderInfoLog |
Definition at line 720 of file qpaintengine_opengl.cpp.
| #define glGetUniformLocation qt_glGetUniformLocation |
Definition at line 723 of file qpaintengine_opengl.cpp.
| #define glLinkProgram qt_glLinkProgram |
Definition at line 716 of file qpaintengine_opengl.cpp.
| #define glProgramLocalParameter4fvARB qt_glProgramLocalParameter4fvARB |
Definition at line 705 of file qpaintengine_opengl.cpp.
| #define glProgramStringARB qt_glProgramStringARB |
Definition at line 701 of file qpaintengine_opengl.cpp.
| #define glShaderSource qt_glShaderSource |
Definition at line 709 of file qpaintengine_opengl.cpp.
| #define glUniform1fv qt_glUniform1fv |
Definition at line 727 of file qpaintengine_opengl.cpp.
| #define glUniform1i qt_glUniform1i |
Definition at line 728 of file qpaintengine_opengl.cpp.
| #define glUniform2fv qt_glUniform2fv |
Definition at line 726 of file qpaintengine_opengl.cpp.
| #define glUniform3fv qt_glUniform3fv |
Definition at line 725 of file qpaintengine_opengl.cpp.
| #define glUniform4fv qt_glUniform4fv |
Definition at line 724 of file qpaintengine_opengl.cpp.
| #define glUseProgram qt_glUseProgram |
Definition at line 717 of file qpaintengine_opengl.cpp.
| #define MAX_TESS_POINTS 80000 |
Definition at line 352 of file qpaintengine_opengl.cpp.
Referenced by QOpenGLPaintEnginePrivate::lineTo().
| #define QGL_D_FUNC_CONTEXT |
Definition at line 65 of file qpaintengine_opengl.cpp.
| #define QGL_FUNC_CONTEXT |
Definition at line 64 of file qpaintengine_opengl.cpp.
| #define QREAL_MAX 9e100 |
| #define QREAL_MIN -9e100 |
| typedef QHash<QGLContext*, QGLFontGlyphHash*> QGLContextHash |
Definition at line 2416 of file qpaintengine_opengl.cpp.
| typedef QHash<QFontEngine*, QGLGlyphHash*> QGLFontGlyphHash |
Definition at line 2414 of file qpaintengine_opengl.cpp.
| typedef QHash<quint64, QGLFontTexture*> QGLFontTexHash |
Definition at line 2415 of file qpaintengine_opengl.cpp.
| typedef QHash<glyph_t, QGLGlyphCoord*> QGLGlyphHash |
Definition at line 2413 of file qpaintengine_opengl.cpp.
| int nearest_gl_texture_size | ( | int | v | ) |
Definition at line 1274 of file qgl.cpp.
Referenced by QGLContextPrivate::bindTexture(), and QGLGlyphCache::cacheGlyphs().
01275 { 01276 int n = 0, last = 0; 01277 for (int s = 0; s < 32; ++s) { 01278 if (((v>>s) & 1) == 1) { 01279 ++n; 01280 last = s; 01281 } 01282 } 01283 if (n > 1) 01284 return 1 << (last+1); 01285 return 1 << last; 01286 }
| void qgl_cleanup_glyph_cache | ( | QGLContext * | ctx | ) |
Definition at line 2727 of file qpaintengine_opengl.cpp.
Referenced by QGLPixelBuffer::~QGLPixelBuffer().
| static void CALLBACK qgl_tess_combine | ( | GLdouble | coords[3], | |
| GLdouble * | [4], | |||
| GLfloat | [4], | |||
| GLdouble ** | dataOut | |||
| ) | [static] |
Definition at line 202 of file qpaintengine_opengl.cpp.
References vertexStorage.
00205 { 00206 GLdouble *vertex = (GLdouble *) malloc(3 * sizeof(GLdouble)); 00207 vertex[0] = coords[0]; 00208 vertex[1] = coords[1]; 00209 vertex[2] = coords[2]; 00210 *dataOut = vertex; 00211 vertexStorage.append(vertex); 00212 }
| static void CALLBACK qgl_tess_error | ( | GLenum | errorCode | ) | [static] |
Definition at line 214 of file qpaintengine_opengl.cpp.
References qWarning().
00215 { 00216 qWarning("QOpenGLPaintEngine: tessellation error: %s", gluErrorString(errorCode)); 00217 }
Here is the call graph for this function:

| void qt_painterpath_split | ( | const QPainterPath & | path, | |
| QDataBuffer< int > * | paths, | |||
| QDataBuffer< QSubpath > * | subpaths | |||
| ) |
Definition at line 109 of file qpaintengine_opengl.cpp.
References QDataBuffer< Type >::add(), QDataBuffer< Type >::at(), QPainterPath::CurveToElement, QDataBuffer< Type >::data(), QSubpath::end, i, j, QPainterPath::LineToElement, QPainterPath::MoveToElement, path, QSubpath::processed, QREAL_MAX, QREAL_MIN, QDataBuffer< Type >::reset(), s1, s2, QDataBuffer< Type >::size(), QSubpath::unite(), QPainterPath::Element::x, and QPainterPath::Element::y.
00110 { 00111 // qDebug() << "\nqt_painterpath_split"; 00112 00113 // reset the old buffers... 00114 paths->reset(); 00115 subpaths->reset(); 00116 00117 // Create the set of current subpaths... 00118 { 00119 QSubpath *current = 0; 00120 for (int i=0; i<path.elementCount(); ++i) { 00121 const QPainterPath::Element &e = path.elementAt(i); 00122 switch (e.type) { 00123 case QPainterPath::MoveToElement: { 00124 if (current) 00125 current->end = i-1; 00126 QSubpath sp = { i, 0, QREAL_MAX, QREAL_MIN, QREAL_MAX, QREAL_MIN, false, false }; 00127 sp.unite(e.x, e.y); 00128 subpaths->add(sp); 00129 current = &subpaths->data()[subpaths->size() - 1]; 00130 break; 00131 } 00132 case QPainterPath::LineToElement: 00133 Q_ASSERT(current); 00134 current->unite(e.x, e.y); 00135 break; 00136 case QPainterPath::CurveToElement: { 00137 const QPainterPath::Element &cp2 = path.elementAt(i+1); 00138 const QPainterPath::Element &ep = path.elementAt(i+2); 00139 Q_ASSERT(current); 00140 current->unite(e.x, e.y); 00141 current->unite(cp2.x, cp2.y); 00142 current->unite(ep.x, ep.y); 00143 i+=2; 00144 break; 00145 } 00146 default: 00147 break; 00148 } 00149 } 00150 if (current) 00151 current->end = path.elementCount() - 1; 00152 } 00153 00154 // for (int i=0; i<subpaths->size(); ++i) { 00155 // qDebug() << subpaths->at(i); 00156 // } 00157 // Check which intersect and merge in paths variable 00158 { 00159 for (int spi=0; spi<subpaths->size(); ++spi) { 00160 if (subpaths->at(spi).processed) 00161 continue; 00162 00163 paths->add(spi); 00164 (subpaths->data() + spi)->added = true; 00165 00166 // qDebug() << " - matching: " << spi << subpaths->at(spi) << paths->size(); 00167 00168 for (int i=paths->size() - 1; i<paths->size(); ++i) { 00169 QSubpath *s1 = subpaths->data() + paths->at(i); 00170 s1->processed = true; 00171 // qDebug() << " - checking" << paths->at(i) << *(subpaths->data() + paths->at(i)); 00172 00173 for (int j=spi+1; j<subpaths->size(); ++j) { 00174 QSubpath *s2 = subpaths->data() + j; 00175 if (s2->processed || s2->added) 00176 continue; 00177 // qDebug() << " - against" << j << *s2; 00178 if (s1->intersects(*s2)) { 00179 // qDebug() << " - intersects..."; 00180 s2->added = true; 00181 paths->add(j); 00182 00183 } 00184 } 00185 } 00186 00187 paths->add(-1); 00188 // qDebug() << "paths..."; 00189 // for (int i=0; i<paths->size(); ++i) 00190 // qDebug() << " " << paths->at(i); 00191 } 00192 } 00193 }
Here is the call graph for this function:

| static void strokeCurveTo | ( | qfixed | c1x, | |
| qfixed | c1y, | |||
| qfixed | c2x, | |||
| qfixed | c2y, | |||
| qfixed | ex, | |||
| qfixed | ey, | |||
| void * | data | |||
| ) | [static] |
Definition at line 598 of file qpaintengine_opengl.cpp.
References qt_fixed_to_real.
00602 { 00603 ((QOpenGLPaintEnginePrivate *) data)->curveTo(QPointF(qt_fixed_to_real(c1x), 00604 qt_fixed_to_real(c1y)), 00605 QPointF(qt_fixed_to_real(c2x), 00606 qt_fixed_to_real(c2y)), 00607 QPointF(qt_fixed_to_real(ex), 00608 qt_fixed_to_real(ey))); 00609 }
Definition at line 591 of file qpaintengine_opengl.cpp.
References qt_fixed_to_real.
00592 { 00593 ((QOpenGLPaintEnginePrivate *) data)->lineTo(QPointF(qt_fixed_to_real(x), 00594 qt_fixed_to_real(y))); 00595 }
Definition at line 584 of file qpaintengine_opengl.cpp.
References qt_fixed_to_real.
00585 { 00586 ((QOpenGLPaintEnginePrivate *) data)->moveTo(QPointF(qt_fixed_to_real(x), 00587 qt_fixed_to_real(y))); 00588 }
_glAttachShader qt_glAttachShader = 0 [static] |
Definition at line 685 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glBindProgramARB qt_glBindProgramARB = 0 [static] |
Definition at line 674 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glCompileShader qt_glCompileShader = 0 [static] |
Definition at line 681 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glCreateProgram qt_glCreateProgram = 0 [static] |
Definition at line 684 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glCreateShader qt_glCreateShader = 0 [static] |
Definition at line 679 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glDeleteProgram qt_glDeleteProgram = 0 [static] |
Definition at line 689 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glDeleteProgramsARB qt_glDeleteProgramsARB = 0 [static] |
Definition at line 675 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glDeleteShader qt_glDeleteShader = 0 [static] |
Definition at line 682 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glDetachShader qt_glDetachShader = 0 [static] |
Definition at line 686 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glGenProgramsARB qt_glGenProgramsARB = 0 [static] |
Definition at line 676 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glGetProgramiv qt_glGetProgramiv = 0 [static] |
Definition at line 692 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glGetShaderInfoLog qt_glGetShaderInfoLog = 0 [static] |
Definition at line 691 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glGetUniformLocation qt_glGetUniformLocation = 0 [static] |
Definition at line 694 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glLinkProgram qt_glLinkProgram = 0 [static] |
Definition at line 687 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glProgramLocalParameter4fvARB qt_glProgramLocalParameter4fvARB = 0 [static] |
Definition at line 677 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glProgramStringARB qt_glProgramStringARB = 0 [static] |
Definition at line 673 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glShaderSource qt_glShaderSource = 0 [static] |
Definition at line 680 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glUniform1fv qt_glUniform1fv = 0 [static] |
Definition at line 698 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glUniform1i qt_glUniform1i = 0 [static] |
Definition at line 699 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glUniform2fv qt_glUniform2fv = 0 [static] |
Definition at line 697 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glUniform3fv qt_glUniform3fv = 0 [static] |
Definition at line 696 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glUniform4fv qt_glUniform4fv = 0 [static] |
Definition at line 695 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
_glUseProgram qt_glUseProgram = 0 [static] |
Definition at line 688 of file qpaintengine_opengl.cpp.
Referenced by QGLContextPrivate::QGLContextPrivate().
const char* const radial_program [static] |
Definition at line 740 of file qpaintengine_opengl.cpp.
QList<GLdouble *> vertexStorage [static] |
Definition at line 201 of file qpaintengine_opengl.cpp.
Referenced by QOpenGLPaintEnginePrivate::endPath(), and qgl_tess_combine().
const int y_margin = 0 [static] |
Definition at line 2390 of file qpaintengine_opengl.cpp.
1.5.1