Page 1 of 1

Problem with 3d View on OSX

Posted: Wed May 02, 2018 1:26 pm
by Chris De Rock
The current GIT-version of QLC+ reports that i have only OpenGL 2.1 so i try to evaluate this problem (i have a Radeon HD 5770 which supports 4.1)
first i set the environment to QSG_INFO=1 to enable opengl debugging. QLC+ shows me he is using version 2.1
next (and after googling) i added to qmlui/main.cpp before QApplication app(argc, argv); the lines:
--SNIP--
QApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
QSurfaceFormat format;
format.setVersion(3, 3); // as requested by QLC+
format.setRenderableType(QSurfaceFormat::OpenGL);
format.setProfile(QSurfaceFormat::CoreProfile);
QSurfaceFormat::setDefaultFormat(format);
--SNIP--
OK, now QLC+ shows me the correct OpenGL version ;)
But now i get some stange messages by loading the 3D view:
QOpenGLShader::compile(Vertex): ERROR: 0:1: '' : version '110' is not supported
I take a look at the code and found the corresponding code in GeometryPassEffect.qml and now its getting strange....
in GeometryPassEffect.qml are code for OpenGL 2.0 and 3.1 and every time only the code for 2.0 will be used. i wonder how this works. the code looks clear to me.

Re: Problem with 3d View on OSX

Posted: Wed May 02, 2018 2:35 pm
by mcallegari
Moved to software development.

Chris, can you please be patient for once ?
You're always too ahead of times.
I recently added an OpenGL version check in the code and I haven't tested on macOS yet. I already suspected there might be an issue since on macOS there's OpenGL ES and not the Desktop version. (so it's actually reporting you have OpenGL ES 2.1)

Again, please be patient and I'll fix it.
Otherwise if you're too impatient, comment this block of code and just keep the "loadContext(checked, "qrc:/3DView.qml", "3D")" line
https://github.com/mcallegari/qlcplus/b ... s.qml#L188

The fixed check condition should probably be:

Code: Select all

var glVersion = (GraphicsInfo.majorVersion * 10) + GraphicsInfo.minorVersion
if (glVersion >= 33 || (GraphicsInfo.renderableType == GraphicsInfo.SurfaceFormatOpenGLES && glVersion >= 21))
    loadContext(checked, "qrc:/3DView.qml", "3D")
else
    loadContext(checked, "qrc:/3DViewUnsupported.qml", "3D")

Re: Problem with 3d View on OSX

Posted: Mon May 07, 2018 6:15 am
by Chris De Rock
No problem. I just run into this little problem and wanted to find a solution. But its a very nice feature and i want to play with it :D

Re: Problem with 3d View on OSX

Posted: Mon May 07, 2018 7:22 am
by mcallegari
Turned out to be a Qt issue: https://bugreports.qt.io/browse/QTBUG-68130
For now I consider macOS always capable of rendering 3D

Re: Problem with 3d View on OSX

Posted: Thu Jun 07, 2018 6:51 am
by Chris De Rock
First: Thank you for fixing the OpenGL detection. i have rebuild QLC+ from git and i see correct values :)

Second: The stange behavior with the GraphicsApiFilter is still there and i wonder how this goes. The filter uses always the 2.0 technique. But if your code depends on 3.3, what about removing all the 2.0 code? Nothing to work fast on, just an idea.

Re: Problem with 3d View on OSX

Posted: Thu Jun 07, 2018 7:10 am
by mcallegari
Already tried. Doesn't work.
There's something really strange in this whole OGL format request thing, especially on macOS.
I need an answer from the Qt guys.

Re: Problem with 3d View on OSX

Posted: Tue Jul 17, 2018 6:05 am
by Chris De Rock
I dont know what you did but... "i can see the light :D".. yes, the 3d view on osx looks fine for me. thank you for your work.