[Development] About QML depends on opengl
marco.bubke at nokia.com
marco.bubke at nokia.com
Tue Sep 4 09:58:47 CEST 2012
Hi Song
>From the man page:
"glXMakeCurrent does two things: It makes ctx the current GLX rendering context of the calling thread, replacing the previously current context if there was one, and it attaches ctx to a GLX drawable, either a window or a GLX pixmap. As a result of these two actions, subsequent GL rendering calls use rendering context ctx to modify GLX drawable drawable. Because glXMakeCurrent always replaces the current rendering context with ctx, there can be only one current context per thread."
So you have always only one current context. It is like the world, you can always only be in one context. To change the context, you have to switch to a other context. :-)
Best regards, M
________________________________________
From: development-bounces+marco.bubke=nokia.com at qt-project.org [development-bounces+marco.bubke=nokia.com at qt-project.org] on behalf of Liu Song.7 (Nokia-MP/Beijing)
Sent: Tuesday, September 04, 2012 9:38 AM
To: thomas.mcguire at kdab.com; development at qt-project.org
Cc: Han Maokun (Nokia-MP/Beijing)
Subject: Re: [Development] About QML depends on opengl
Hi,
We are trying to port the mesa. But there is one question related with OpenGL.
In Linux, we can create OpengGL context using glXCreateContextAttribsARB, then glXMakeCurrent will binding this context to a window.
But we don't understand how does the GL operation such as glClearColor etc. know what's the current context for drawing ?
For example:
ctx = glXCreateContextAttribsARB( display, bestFbc, 0, True, context_attribs );
glXMakeCurrent( display, win, ctx );
glClearColor ( 1, 0.5, 0, 1 );
glClear ( GL_COLOR_BUFFER_BIT );
Thanks,
Song
-----Original Message-----
From: development-bounces+song.7.liu=nokia.com at qt-project.org [mailto:development-bounces+song.7.liu=nokia.com at qt-project.org] On Behalf Of ext Thomas McGuire
Sent: Friday, August 10, 2012 5:19 PM
To: development at qt-project.org; Han Maokun (Nokia-MP/Beijing)
Subject: Re: [Development] About QML depends on opengl
Hi,
On Friday 10 August 2012 10:56:27 song.7.liu at nokia.com wrote:
> >From the code, it seems that QML will depend on the opengl, but is
> >there a way to remove such dependency ?
>
> Because our platform doesn't support opengl yet.
It is not possible to remove the OpenGL dependency, the scenegraph code is quite deeply integrated into the QtQuick UI elements.
What you can do is use llvmpipe + mesa to get somewhat faster software rendering.
Regards,
Thomas
--
Thomas McGuire | thomas.mcguire at kdab.com | Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-independent software solutions
_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
More information about the Development
mailing list