Results 1 to 2 of 2

Thread: OpenGL drawing outside QGLWidget

  1. #1
    Join Date
    May 2011
    Posts
    30
    Thanks
    1

    Default OpenGL drawing outside QGLWidget

    Hi. I want to extend the functionality of my QGLWidget drawing functions by plugins. Mainly, I want to execute opengl drawing commands placed in plugin to draw on QGLWidget that is inside main application. Plugin is not connected and shouldn't contain QGLWidget class as self-depended class (there is only one QGLWidget in the application), the only instance of the widget is in the main application.
    How can I achive this effect?
    I looked into GLContext class, but I guess there must be only one context connected to QGLWidget. Another idea to use pure opengl commands in a plugin and use handle of QGLWidget's context.
    But I'm afraid to choose the wrong approach, thus all ideas are appreciated.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: OpenGL drawing outside QGLWidget

    Pass a pointer to the widget or to the context to your plugin.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 7
    Last Post: 1st July 2011, 01:21
  2. Replies: 0
    Last Post: 28th April 2011, 18:40
  3. QGLWidget tearing when drawing video
    By koan in forum Qt Programming
    Replies: 0
    Last Post: 9th October 2010, 16:24
  4. qglwidget not always drawing
    By spraff in forum Qt Programming
    Replies: 3
    Last Post: 24th June 2009, 19:44
  5. drawing in opengl
    By sdastagirmca in forum Qt Programming
    Replies: 2
    Last Post: 21st June 2009, 14:26

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.