I've seen some promising references to being able to run Qt5 on modern OpenGL. I'm using the following code to set my QQuickView to OpenGL 4.1 Core (the latest supported on OSX 10.9 with my MacBook).
QSurfaceFormat sf = g_mainView->format();
sf.setProfile(QSurfaceFormat::CoreProfile);
sf.setVersion(4, 1);
g_mainView->setFormat(sf);
Major issues. First, the app crashes entirely when trying to render text. If I happen to only have images, rectangles, etc in my QML, I get a ton of fragment shader errors.
QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : #version required and missing.
ERROR: 0:5: 'varying' : syntax error syntax error
*** Problematic Fragment shader source code ***
#define lowp
#define mediump
#define highp
varying highp vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
uniform lowp sampler2D source;
uniform lowp sampler2D maskSource;
void main(void) {
gl_FragColor = texture2D(source, qt_TexCoord0.st) * (texture2D(maskSource, qt_TexCoord0.st).a) * qt_Opacity;
}
***
QQuickCustomMaterialShader: Shader compilation failed:
"ERROR: 0:1: '' : #version required and missing.
ERROR: 0:5: 'varying' : syntax error syntax error
"
Is Qt5.3 not ready for modern OpenGL yet? Or am I simply setting it up incorrectly? I want to embed my own OpenGL graphics windows using OpenGL 4, so my assumption is that I need that app running under GL 4 as well. Is there another way?