Problem with 3d View on OSX

Post Reply
Chris De Rock
Posts: 103
Joined: Tue Apr 14, 2015 6:54 am
Real Name:

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.
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

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")
Chris De Rock
Posts: 103
Joined: Tue Apr 14, 2015 6:54 am
Real Name:

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
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Turned out to be a Qt issue: https://bugreports.qt.io/browse/QTBUG-68130
For now I consider macOS always capable of rendering 3D
Chris De Rock
Posts: 103
Joined: Tue Apr 14, 2015 6:54 am
Real Name:

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.
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

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.
Chris De Rock
Posts: 103
Joined: Tue Apr 14, 2015 6:54 am
Real Name:

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.
Post Reply