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. How to mix Glew OpenGL with Qt
Forum Updated to NodeBB v4.3 + New Features

How to mix Glew OpenGL with Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.6k 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.
  • C Offline
    C Offline
    CroCo
    wrote on last edited by
    #1

    I'm developing some modern OpenGL apps (i.e. shaders glsl >= 3). I've used GLUT, FreeGLUT, SDL2, and GLFW APIs. I've quickly noticed the simplicity of those APIs (i.e. can't create descent widgets.). I'm trying to move from those APIs but I need to stick with Glew for OpenGL drawing. I would like to know more about this kind of hybrid. How can I prepare QWidget for this task? Note: I don't want to use any OpenGL stuff that comes with Qt. One of the reasons if you are curious is that in case I want to move my apps to other APIs, I will not worry about QOpenGL stuff. I would like to solely use Qt for Window Handling. Any suggestions regarding this journey? Thank you.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      I have no experience in this area, but just in case: look into QOpenGLWidget, it should allow you to mix custom OpenGL with widget apps.

      If you want to integrate with QML/QtQuick (although from your post I don't think you do), the place to start is QQuickWindow::afterRendering().

      (Z(:^

      C 1 Reply Last reply
      0
      • sierdzioS sierdzio

        I have no experience in this area, but just in case: look into QOpenGLWidget, it should allow you to mix custom OpenGL with widget apps.

        If you want to integrate with QML/QtQuick (although from your post I don't think you do), the place to start is QQuickWindow::afterRendering().

        C Offline
        C Offline
        CroCo
        wrote on last edited by
        #3

        @sierdzio using QOpenGLWidget, I have to have my case inherits from OpenGL functions that come with Qt which I would like to avoid. I would like to prepare a widget that draws OpenGL using glew library but no QOpenGL stuff.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by sierdzio
          #4

          Quoting the docs:

          When making OpenGL function calls, it is strongly recommended to avoid calling the functions directly.

          It is recommended to use QOpenGL* functions, but not required. That's my understanding at least. Anyway, as said, this is not really my area, I may be wrong.

          (Z(:^

          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