我正在使用Qml绘制图表。为了加速它,使用的是openGl。例如:
function plotDataX(routerNumber, sensorNumber, bordar, checked) {
if(bordar === "x" && checked) {
var line = chartX.createSeries(ChartView.SeriesTypeLine, routerNumber+" , "+sensorNumber+" , "+bordar,
axisXTime, axisXData);
line.useOpenGL = true;
lineSeriesList.push(line)
}
}
在我的笔记本电脑上一切都很好(由QT 5.12编译),但是在raspberry pi中它什么也没显示,如果我注释line.useOpengl = true,它会绘制图表(在raspberry Qt 5.10上)。另一方面,我在树莓派上测试了Qt 5.12 qmlosciloscope示例,并且在OpenGl上运行良好。 有想法吗?
更新:
qt.scenegraph.general: threaded render loop
qt.scenegraph.general: Using sg animation driver
qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
qt.scenegraph.general: Using sg animation driver
qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
qt.scenegraph.general: texture atlas dimensions: 1024x512
qt.scenegraph.general: R/G/B/A Buffers: 5 6 5 0
qt.scenegraph.general: Depth Buffer: 24
qt.scenegraph.general: Stencil Buffer: 8
qt.scenegraph.general: Samples: 0
qt.scenegraph.general: GL_VENDOR: Broadcom
qt.scenegraph.general: GL_RENDERER: VideoCore IV HW
qt.scenegraph.general: GL_VERSION: OpenGL ES 2.0
qt.scenegraph.general: GL_EXTENSIONS: GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_EXT_discard_framebuffer GL_APPLE_rgb_422 GL_EXT_texture_format_BGRA8888 GL_OES_vertex_half_float GL_OES_depth32 GL_OES_rgb8_rgba8 GL_OES_EGL_image GL_EXT_debug_marker GL_OES_depth24 GL_OES_mapbuffer GL_OES_EGL_image_external GL_OES_texture_npot
qt.scenegraph.general: Max Texture Size: 2048
qt.scenegraph.general: Debug context: false
答案 0 :(得分:0)
问题出在Qt版本上!通过Qt 5.10,问题甚至出现在笔记本电脑上,而通过Qt 5.12,在树莓上一切正常。