← Back to team overview

ubuntu-phone team mailing list archive

[development] [OpenGL] QOpenGLTexture crash on phone

 

Hello everyone,

I am trying to develop a 3D OpenGL application for the Ubuntu Phone. After
reading about different options of how this can be accomplished, I decided
to work my way starting from the "OpenGL under QML" demo app, as I have
experience in OpenGL and WebGL as well as C++ and Qt, though I haven't used
the two sides together before.
So first steps went well, I can load vertex data from a file (positions,
colors, normals, texture coords) and display the appropriate model rotating
in 3D with some basic shaders behind the QML based UI.

However, if I try to apply textures, the

new QOpenGLTexture(someQImage);

call instantly crashes the app on my BQ Acquaris E4.5. Using the same code,
everything works perfectly with the desktop target, the properly textured
model can be seen. If I comment out this single line, the app works
properly on the phone as well, showing the model without the texture color
added.

I could not figure out the problem, as the application is quite simple, the
IDE only shows

Sdk-Launcher> Received a failed event

and there is nothing in the .cache/upstart log of the app. (apart from the
usual "Error opening shm" messages, but those also show for the working
app, when no textures are applied)

Did anyone here meet the same issue? Is there a bug in the OS or in QtGUI
which I should check? Or some special consideration when using
QOpenGLTexture in Ubuntu Touch?
As I see perfectly working 3D OpenGL apps in the store, I am wondering if
that is because I should choose another path for creating an OpenGL app as
this QML-OpenGL solution is yet buggy, or I should keep looking for some
mistake in my own code (of which there can always be some really sneaky
ones when graphics programming is involved). Any input is appreciated.

Thanks!
Krisztián