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. Using QOpenGLFunctions properly
Forum Updated to NodeBB v4.3 + New Features

Using QOpenGLFunctions properly

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 919 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.
  • W Offline
    W Offline
    wwolff
    wrote on last edited by
    #1

    Hi!

    I have in my little 3D engine a lot of objects that deal with OpenGL functions like glVertex3fv glBindTexture and etc...

    Every object in it´s members use a different openGL function, for example, a mesh call functions to render a vetice, a texture call bindtexture to enable the texture and so on...

    Looking at the documentation of Qt we have to help us a QOpenGLFunctions object, where we can "encapsulate" all openGL function helping us to "Map" the correct OpenGL functions that are avaliable on the current enviroment.

    What is the best way to use this?
    Deriving my 3D classes from this class and using the objects exactly as i use today?

    My concern is about to be able know if the "target" machine will be able to run the opeGLFunctions i´m using.

    Anyone here do something like that?

    Kind Regards.

    1 Reply Last reply
    0
    • W Offline
      W Offline
      wwolff
      wrote on last edited by
      #2

      Just to give another example:

      If i have 2 classes derived from QOpenGLFunctions class :
      Texture
      Mesh

      and one OpenGLWindow that create the OpenGLContext and i call initializeOpenGLFunctions() using this context.

      when my objects starts call the openGLfunctions it´s a valid approach?

      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