[Interest] [Qt 5, OS X] Does OpenGL 3 Core Profile work (with Qt APIs)?

James Turner james.turner at kdab.com
Sat Apr 20 14:02:06 CEST 2013


On 18 Apr 2013, at 09:09, Till Oliver Knoll <till.oliver.knoll at gmail.com> wrote:

> So is OpenGL 3.x Core actually supposed to work with Qt 5? Or is this
> still work in progress?

It works fine, but the legacy QGL APIs don't help you much. Rough pseudo-code which works for me:

   QWindow *win = new QWindow
    win->setSurfaceType( OpenGLSurface );

    QSurfaceFormat format;
    format.setMajorVersion( 3 );
    format.setMinorVersion( 2 );
    format.setProfile( QSurfaceFormat::CoreProfile );

    win->setFormat( format );
    win0>create();

    QOpenGLContext* context = new QOpenGLContext;
    context->setFormat( format );
    context->create();

... make context current and start using QOpenGLShaderProgram, making glXXXXXX calls, etc

Regards,
James

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130420/98a1d598/attachment.html>


More information about the Interest mailing list