06-08-2012 06:07 AM - edited 06-08-2012 06:07 AM
I've stuck with enabling OpenGL rendering on BB10 Dev Alpha.
The following code works correctly on Linux desktop, but not on BB10 device it leads to white screen.
QDeclarativeView *view = new QDeclarativeView; QGLFormat format = QGLFormat::defaultFormat(); QGLWidget *glWidget = new QGLWidget(format); glWidget->setAutoFillBackground(false); view->setViewport(glWidget); view->setSource("qml/main.qml");
Have anyone managed to run QML app accelerated?
06-08-2012 08:18 AM
Are you using cascades QML or Qt QML?
Cascades is restricted to the cascades UI classes. You can use any class documented in https://bdsc.webapps.blackberry.com/cascades/refer
If you want to use openGL in cascades, try using a ForeignWindow.
06-08-2012 11:52 AM
You can login to your Dev Alpha via SSH, and navigate to your app's sandbox to view the logs to confirm what I'm about to say, but I'm betting your error is related to the fact that the QtGui library is not included on the device. So you will have to package it yourself.
If you're still having issues, I can post the code i use for the PlayBook.
06-08-2012 12:15 PM
06-08-2012 12:27 PM
I assume you've stepped through in the debugger, ensured that all pointers are non-zero and that glWidget->isValid returns true? Has the debugger given you any other clues?
06-11-2012 06:47 AM - edited 06-11-2012 06:48 AM
I've just tested everything on the device again with the following code:
QGLFormat format = QGLFormat::defaultFormat(); QGLWidget *glWidget = new QGLWidget(format); qDebug() << "GLWidget: " << glWidget; qDebug() << "GLWidget validity: " << glWidget->isValid(); m_view->setViewport(glWidget); // m_view is QDeclarativeView glWidget->showFullScreen();
Here's the debug output:
GLWidget: QGLWidget(0x93a9f0) GLWidget validity: true
And the result is just a blank screen
07-03-2012 09:39 AM