Qt 2D plotting with hardware acceleration using OpenGL v1.4?

2.1k views Asked by At

Our target system has an older graphic chip that only supports OpenGL 1.4. However, for a high scan rate 32K point oscilloscope-type plot, we really need hardware acceleration. Both QCustomPlot and QWT use the QPainter class that requires OpenGL ES 2.0 or later. Is there an easy way around this? Or, does anyone know of another plotting tool we can use that can hw accelerate on OpenGL 1.4? Our target is running QT 5.0 on Windows XP SP3.

for (int i=0; i<SCAN_SIZE; i++)
    m_plotQmap->insert(i,QCPData(i,lScanData[scan_dataset][i]));
ui->myPlot->graph(0)->setData(m_plotQmap,true);
ui->myPlot->replot();
1

There are 1 answers

0
Uwe On

For a target system with OpenGL 1.4 I recommend to use Qt4. It doesn't make any sense to use Qt5 when its minimum requirements are not satisfied. But with Qt4 everything should be fine with your platform.

Beside OpenGL the combination Qt4/X11 offers hardware accelerated graphics ( Qt5/X11 not ! ), but as you are on Windows ...

Qwt 6.1 introduced QwtPlotGLCanvas where you render with one of the OpenGL paint engines. In the refreshtest example you can check the effect of OpenGL and compare it with the sofware renderer ( set Updates to 0 ).

Also have a look at the oscilloscope example of Qwt that shows an implementation that incrementally paints a curve. When it is is possible to implement your plot this way you can have very high refresh rates - even with the software renderer.