Results 1 to 2 of 2

Thread: OpenGL control points

  1. #1
    Join Date
    Jun 2007
    Posts
    25
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default OpenGL control points

    Hi,
    I'm trying to recreate the Mark Kilgard editgrid.c example using QT4. The .cpp and .pro files should be attached. He draws an opengl grid and the mouse can interact directly with with the control points (in the glut window) to move the grid. His example deforms the grid, and doesn't use simple rotation such as the gears or opengl grabber exs.

    I can draw the grid, and print control point hits to the console by selecting control points with the mouse, but I cannot seem to figure out how to get the grid to move.

    myglwidget.cpp tries to preserve his original c functions by creating cpp vers of those, and then calling them from QT's paintGL, resizeGL, etc.

    Any help really appreciated.
    Thanks.
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2007
    Posts
    25
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: OpenGL control points

    I'm updating my own query. After working on this example more, I discovered the motion(int x, int y) function called in main of the editgrid.c glut example, was not being called in the QT version I tried to port. Thus motion needs to be included in QT's QMouseEvent function in order for the mouse to deform the grid.

Similar Threads

  1. OpenGL and Qt Question
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 18th April 2009, 18:04
  2. Qtopia Core & OpenGL ES?
    By zelko in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 28th May 2007, 07:21
  3. Replies: 6
    Last Post: 3rd February 2006, 09:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.