Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. OpenGL on Android - seems colour depth is hardcoded to 8bpp per colour?
Forum Updated to NodeBB v4.3 + New Features

OpenGL on Android - seems colour depth is hardcoded to 8bpp per colour?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 561 Views 2 Watching
  • 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.
  • A Offline
    A Offline
    andrewhaighcell
    wrote on last edited by
    #1

    Hi,
    I've a pre-existing C++ library which renders to an externally supplier OpenGL context, and it wants a buffer format which is RGB565 (no alpha channel). But trying to configure this via QSurfaceFormat() just doesnt seem to change from 8bpp for Alpha, Red, Green, and Blue channels. When I looked into the Android platform abstraction code, I saw this:

    https://github.com/qt/qtbase/blob/dev/src/plugins/platforms/android/qandroidplatformintegration.cpp
    ...
    QPlatformOpenGLContext *QAndroidPlatformIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
    {
    QSurfaceFormat format(context->format());
    format.setAlphaBufferSize(8);
    format.setRedBufferSize(8);
    format.setGreenBufferSize(8);
    format.setBlueBufferSize(8);
    return new QAndroidPlatformOpenGLContext(format, context->shareHandle(), m_eglDisplay);
    }
    ...

    Can anyone explain why this is, and is it possible to change the surface format as I want? I am sure the underlying device supports it, as this library is used in other applications without problems...

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should rather bring that questions to the Qt Android development mailing list. You'll find there Qt Android port developers/maintainers. This forum is more user oriented.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • A Offline
        A Offline
        andrewhaighcell
        wrote on last edited by
        #3

        Thanks, I have asked the question there. When I have some time, I will see about checking for sure that this is the code path that is followed in the plugin, but dont have a debug build of Qt at present to step through.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved