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. QT OpenGL how do I bind a texture to a specific texture slot like I would in regular OpenGL
Forum Updated to NodeBB v4.3 + New Features

QT OpenGL how do I bind a texture to a specific texture slot like I would in regular OpenGL

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 293 Views 1 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
    AI_Messiah
    wrote on last edited by
    #1

    this is what I would do in OpenGL

    void Texture2D::bind(GLuint texUnit) {
    	glClientActiveTexture(GL_TEXTURE0 + texUnit);
    	glBindTexture(GL_TEXTURE_2D, mTexture);
    }
    

    I want to be able to bind more than one texture.
    I am told to look at:

    QOpenGLFunctions_1_4
    

    This makes no sense. Could someone please help me when it comes to what to do with these things

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

      Hi,

      It's been a long time, but, are you porting your code to Qt or just wanting to keep using these methods directly ?

      In the first case, QOpenGLTexture comes to mind.

      Otherwise, the use of the QOpenGLFunctions classes would allow you to continue using these methods directly.

      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
      0

      • Login

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