2013/1/2 Samuel Rødal <samuel.ro...@digia.com>:
> On 12/28/2012 09:53 AM, Pier Luigi wrote:
>>
>> However glGetString() always return NULL, I call it from the
>> sceneGraphInitialized() slot and I noticed that despite
>> openglContext() returns a valid pointer,
>> QOpenGLContext::currentContext() is 0.
>>
>> Someone has an idea on what I'm doing wrong?
>
> On which thread do you execute the slot connected to
> sceneGraphInitialized() ? The scene graph might run on a separate thread
> from the main UI thread, and the QOpenGLContext will then be made
> current there.

I first tried to use glGetString() from main after the compositor
creation but that should be a different thread than the rendering
thead:

https://github.com/hawaii-desktop/greenisland/blob/master/src/greenisland/main.cpp

Then I tried to connect the signal on the QQuickView subclass constructor to a
private slot.
The slot should be called from the rendering thread, giving me access
to the context but it doesn't seem to happen.

--
Out of the box experience
http://www.maui-project.org/
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to