Results 1 to 2 of 2

Thread: Qt over openGL ES 2.0 in Mac OS

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Aug 2015
    Posts
    4
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: Qt over openGL ES 2.0 in Mac OS

    If I try the following code on MAC OS X, the QOpenGLContext::create() returns false. Is it because openGL ES is not compatible with mac os?
    Is there a way to use native EGL to create openGL ES context on mac os (using powerVR) and then bind it with a Qt display widget?

    Qt Code:
    1. QWindow *win = new QWindow();
    2. win->setSurfaceType(QSurface::SurfaceType::OpenGLSurface);
    3. QOpenGLContext* ctx = new QOpenGLContext;
    4. QSurfaceFormat* fmt = new QSurfaceFormat;
    5. fmt->setRenderableType(QSurfaceFormat::OpenGLES);
    6. fmt->setMajorVersion(2);
    7. fmt->setMinorVersion(0);
    8. fmt->setRedBufferSize(5);
    9. fmt->setGreenBufferSize(6);
    10. fmt->setBlueBufferSize(5);
    11. fmt->setAlphaBufferSize(0);
    12. fmt->setDepthBufferSize(0);
    13. ctx->setFormat(*fmt);
    14. ctx->create();
    To copy to clipboard, switch view to plain text mode 

    ***UPDATE: I read about QEGLNativeContext, which could be good to me since I know how to create context with EGL, Can anyone point me to how I can include this platform specific class in my program?

    ***UPDATE 2: I tried using QEGLNativeContext but I only get the message: QCocoaGLContext: Requires a QCocoaNativeContext

    If anyone has a clue on how I can continue, it would be much appreciated.

    Thanks again
    Gal
    Last edited by gal; 3rd August 2015 at 12:23.

Similar Threads

  1. Replies: 2
    Last Post: 5th July 2017, 13:28
  2. Conversion from opengl to opengl es2 (Shapefile rendering)?
    By swapan_gh in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 5th December 2013, 06:59
  3. converting GLUT/OpenGL to Qt/OpenGL - displaying issue
    By yoti13 in forum Qt Programming
    Replies: 1
    Last Post: 25th November 2012, 00:45
  4. Replies: 0
    Last Post: 6th December 2009, 00:41
  5. Qt with OpenGL ES for ARM9 - All OpenGL ES tests have failed!
    By vinpa in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 3rd December 2009, 10:10

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.