Thread: Is it possible to do input handling without glut/glx in OpenGL.. preferably with Qt?

  1. #1
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657

    Is it possible to do input handling without glut/glx in OpenGL.. preferably with Qt?

    I've just begun reading the redbook and found a website that ports some of its example to Qt.

    I am confused at some places though....primarily about the Question (in the subject) .

    Is it possible to transparently use Qt as the background toolkit and pass everything it encounters to the QGLWidget which houses the context...initialization..everything I don't want to worry about now ? ....so that everything becomes surely portable in my code..

    Also if anyone of you are intimately familiar with both....can you help me set up the basic code ...like a sandbox....on which I can ..err do whatever I like with everything I learn about OpenGL for the time being ?

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    I haven't done any OpenGL with Qt but as far as I can tell you implement your own class that inherits from QGLWidget right? QGLWidget inherits from QWidget, which in turn has functions that handles mouse events: Qt 4.7: QWidget Class Reference

    So you should just be able to reimplement the mouse event functions inherited from QWidget to suit your needs and you should be good to go.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL or GLUT which way to go?
    By software tester in forum Game Programming
    Replies: 2
    Last Post: 04-25-2011, 03:44 PM
  2. OpenGL: glut.h error
    By reaperman in forum C++ Programming
    Replies: 2
    Last Post: 10-29-2008, 12:09 PM
  3. OpenGL/GLUT in Dev C++
    By Nextstopearth in forum Game Programming
    Replies: 3
    Last Post: 10-01-2008, 05:25 AM
  4. SDL or GLUT for Opengl?
    By drdroid in forum Game Programming
    Replies: 1
    Last Post: 07-17-2003, 01:54 AM
  5. OpenGL GLUT 3D?
    By elfjuice in forum C++ Programming
    Replies: 8
    Last Post: 07-03-2002, 10:28 AM