Results 1 to 5 of 5

Thread: Confused in Graphics

  1. #1
    Join Date
    Apr 2010
    Posts
    152
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question Confused in Graphics

    Now considering a graphics application targeting only Windows for now...I think I have the options of either Direct3D or OpenGL. Based on the application requirements, it's possible to have multiple views each rendering different graphics with different settings, and these views can be embedded in dialogs or as separate views. The tricky part is resource sharing mainly textures and shaders. I want any view to be able to access the same resources...

    I've checked the OpenGL widget, but I'm not sure if it's possible to either share resources of different contexts or associating all widgets with single context.

    The other alternative is to create my own Direct3D rendering widget but I would love to be able to use Qt's widget drawing and selection capabilities instead of re-inventing the wheel and never match the Qt's quality and stability.

    The first option if it's not possible then I'm going to implement my own OpenGL rendering stuff to support sharing resources, then I would choose D3D since it's "more stable," and I'm supporting only Windows.

    What's the expert advice here?

    Thanks.

  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: Confused in Graphics

    You can associate multiple widgets with one context.

  3. #3
    Join Date
    Apr 2010
    Location
    Rostov-na-Donu, Russia
    Posts
    153
    Thanks
    2
    Thanked 26 Times in 23 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Confused in Graphics

    Did I understand your question right:
    what are pluses and minuses of using OpenGl vs D3D ?
    what is more compatible ?
    what is more Microsoft compatible ?
    can I render with D3D technology on QGLWidget ?

    P.S. what did you mean of share resources ?

  4. #4
    Join Date
    Apr 2010
    Posts
    152
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Confused in Graphics

    I'm aware of the pros and cons of both APIs in general. However my concern is more about usability of both within Qt. D3D is considered as an alternative to QGL in case it does not support shared resources , and I mean that multiple GL rendering widgets can have access to the same textures and shaders created for a single GL context, instead of duplicating same resources and eating up memory.

  5. #5
    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: Confused in Graphics

    Have a look at QGLWidget constructor that takes a "shareWidget" parameter and the docs for it.

Similar Threads

  1. confused about licenses ...
    By jimmybaeten in forum Installation and Deployment
    Replies: 10
    Last Post: 26th July 2009, 10:56
  2. Layouts - very confused
    By lhartzman in forum Newbie
    Replies: 3
    Last Post: 19th July 2009, 21:40
  3. confused about Qt designer 4.3
    By rishiraj in forum Qt Tools
    Replies: 1
    Last Post: 14th December 2008, 19:13
  4. Confused - QGraphicsItem destructor
    By durbrak in forum Qt Programming
    Replies: 7
    Last Post: 13th February 2008, 20:27
  5. Draw Line :confused:
    By sabeesh in forum Qt Programming
    Replies: 9
    Last Post: 24th January 2008, 11: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.