! \internal This method is used by \ref setupPaintBuffers when it needs to create new paint buffers. Depending on the current setting of \ref setOpenGl, and the current Qt version, different backends (subclasses of \ref QCPAbstractPaintBuffer) are created, initialized with the proper size and device pixel ratio, and returned. */
| 15133 | size and device pixel ratio, and returned. |
| 15134 | */ |
| 15135 | QCPAbstractPaintBuffer *QCustomPlot::createPaintBuffer() |
| 15136 | { |
| 15137 | if (mOpenGl) |
| 15138 | { |
| 15139 | #if defined(QCP_OPENGL_FBO) |
| 15140 | return new QCPPaintBufferGlFbo(viewport().size(), mBufferDevicePixelRatio, mGlContext, mGlPaintDevice); |
| 15141 | #elif defined(QCP_OPENGL_PBUFFER) |
| 15142 | return new QCPPaintBufferGlPbuffer(viewport().size(), mBufferDevicePixelRatio, mOpenGlMultisamples); |
| 15143 | #else |
| 15144 | qDebug() << Q_FUNC_INFO << "OpenGL enabled even though no support for it compiled in, this shouldn't have happened. Falling back to pixmap paint buffer."; |
| 15145 | return new QCPPaintBufferPixmap(viewport().size(), mBufferDevicePixelRatio); |
| 15146 | #endif |
| 15147 | } else |
| 15148 | return new QCPPaintBufferPixmap(viewport().size(), mBufferDevicePixelRatio); |
| 15149 | } |
| 15150 | |
| 15151 | /*! |
| 15152 | This method returns whether any of the paint buffers held by this QCustomPlot instance are |