Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Query on Qt OpenGL ES 2.0 support
Forum Update on Monday, May 27th 2025

Query on Qt OpenGL ES 2.0 support

Scheduled Pinned Locked Moved Unsolved Game Development
2 Posts 2 Posters 994 Views
  • 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.
  • D Offline
    D Offline
    dalishi
    wrote on last edited by
    #1

    Hi,

    I am confused with the OpenGL ES 2.0 support when using Qt. From the documentations, the QOpenGLFunctions class provides cross-platform access to the OpenGL ES 2.0 API. Does that mean i can only use the OpenGL function in OpenGL ES 2.0 API? Below is my example, OpenGL ES 2.0 does not support this GL_DEPTH_COMPONENT enum to get depth value in depth buffer, however, it does actually work on my desktop and able to get the depth Z value of pixels. What's the rationale behind here?

    glReadPixels(posX, posY, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &posZ);
    
    matthew.kuiashM 1 Reply Last reply
    0
    • D dalishi

      Hi,

      I am confused with the OpenGL ES 2.0 support when using Qt. From the documentations, the QOpenGLFunctions class provides cross-platform access to the OpenGL ES 2.0 API. Does that mean i can only use the OpenGL function in OpenGL ES 2.0 API? Below is my example, OpenGL ES 2.0 does not support this GL_DEPTH_COMPONENT enum to get depth value in depth buffer, however, it does actually work on my desktop and able to get the depth Z value of pixels. What's the rationale behind here?

      glReadPixels(posX, posY, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &posZ);
      
      matthew.kuiashM Offline
      matthew.kuiashM Offline
      matthew.kuiash
      wrote on last edited by
      #2

      @dalishi I'm a little confused by the question. Maybe I need another cup of tea!

      Right, so I write OpenGL code in Qt (TBH I use my own libraries much of the time) but the concept is that Qt is a kind of "superset" of the OpenGL system supporting programmable shaders.

      That is, you will find things in there, such as the above, that do not work in ES2. However, they are still "expressible" because they work on other platforms e.g. desktop, and Qt is cross platform.

      The OGL functions work on both desktop and mobile. You are not restricted to using ES2 and Qt does a fair amount of levelling the ground for you (take the tediums with precision in shaders).

      None-the-less it is important that you, the coder, make sure your code uses the correct features on the correct platform.

      Does this help?

      The legendary cellist Pablo Casals was asked why he continued to practice at age 90. "Because I think I'm making progress," he replied.

      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