Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QOpenGLWidget not rendering textures bound in non-Qt code
QtWS25 Last Chance

QOpenGLWidget not rendering textures bound in non-Qt code

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 321 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.
  • K Offline
    K Offline
    kegon
    wrote on last edited by
    #1

    I'm moving my code from the old QGLWidget to QOpenGLWidget.

    In the old code I've been binding textures in non-Qt code and then rendering them on the QGLWidget.

    // Non-Qt code
    glGenTextures(1, tex);
    glBindTexture(GL_TEXTURE_2D, *tex);
    glTexImage2D(GL_TEXTURE_2D, ... );
    // ...
    // MyOpenGLWidget->drawWorld(tex);

    MyQOpenGLWidget::drawWorld(GLuint textureID)
    {
    glBindTexture(GL_TEXTURE_2D, textureID);
    // ...
    }

    This doesn't seem to work; I get a blank screen. Is there something I should do differently to make this happen, or is it some other problem ?

    I don't know that much about OpenGL. This is all happening on Mac.

    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