Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Trouble with QGLWidget on iPhone 5 and iPad Air 2

    Mobile and Embedded
    1
    1
    348
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kloveridge last edited by

      I have upgraded to Qt 5.4 and am having some issues getting the openGL working properly. I have a QMainWindow with a QGLWidget attached. I am using this code to attach the openGL to the QMainWindow:

      @ QGLFormat format;
      format.setVersion(3,3);
      format.setProfile( QGLFormat::CoreProfile );
      format.setDepth(true);
      m_context = new QGLContext(format);

      m_model = new ModelView(*m_context, this);
      m_model->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
      ui->OGLLayer->addWidget(m_model);
      m_model->showMaximized();@

      This code works on on my desktop (Mac) fine. But neither the iPhone or iPad work. With this code, the app never runs. It gets several -111 error and the app just aborts. If I modify this code like this, it will work on my iPad completely. The iPhone appears to work, but the openGL doesn't initialize properly. And it won't work at all on the Mac.

      @ QGLFormat format;
      format.setVersion(3,3);
      format.setProfile( QGLFormat::CoreProfile );
      format.setDepth(true);
      m_context = new QGLContext(format);

      m_model = new ModelView(*m_context, NULL);
      m_model->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
      ui->OGLLayer->addWidget(m_model);
      m_model->showMaximized();@

      Any suggestions?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post