Results 1 to 3 of 3

Thread: GraphicViews And OpenGL

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanked 342 Times in 324 Posts

    Default Re: GraphicViews And OpenGL

    Typically for OpenGL you want to subclass QGLWidget and reimplement three methods:
    1) initializeGL()
    2) resizeGL()
    3) paintGL()
    Using opengl calls for rendering outside of QGLWidget requires to call beginNativePainting() method of QPainter object.
    some opengl + Qt examples : link
    Btw. nice retirement plan

  2. #2
    Join Date
    Dec 2013
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: GraphicViews And OpenGL

    Thanks for the response Stampede.

    I fixed the problem. I wasn't pushing and popping the current transformation matrix. Explains why the coordinates were being screwed.

    As I am using a QGLWidget for the QGraphicView view port there was no need to wrap the opengl calls with begin and end native painting calls.

    Rob

Similar Threads

  1. Conversion from opengl to opengl es2 (Shapefile rendering)?
    By swapan_gh in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 5th December 2013, 06:59
  2. converting GLUT/OpenGL to Qt/OpenGL - displaying issue
    By yoti13 in forum Qt Programming
    Replies: 1
    Last Post: 25th November 2012, 00:45
  3. [Qt 4.6.3/OpenGL 4.1] : Unrecognized OpenGL
    By didier in forum Qt Programming
    Replies: 3
    Last Post: 5th August 2011, 23:33
  4. Replies: 0
    Last Post: 6th December 2009, 00:41
  5. Qt with OpenGL ES for ARM9 - All OpenGL ES tests have failed!
    By vinpa in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 3rd December 2009, 10:10

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
  •  
Qt is a trademark of The Qt Company.