Results 1 to 3 of 3

Thread: Shared rendering class

  1. #1
    Join Date
    Mar 2007
    Posts
    11
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Shared rendering class

    I'm working on an app using OpenGL and FBOs. The FBOs need to use the same basic rendering code as the main window, so I'm left with two choices:

    Qt Code:
    1. MyRenderer: public QGLWidget, private CoreRenderer
    2. {
    3. }
    4. -OR-
    5. MyRenderer: public QGLWidget
    6. {
    7. private:
    8. CoreRenderer renderer;
    9. }
    To copy to clipboard, switch view to plain text mode 

    The same options also exist for the FBO class.

    Will Qt care which way I do it? And if not, which way would work nicest with Qt?

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

    Default Re: Shared rendering class

    Provided that CoreRenderer doesn't inherit QObject, Qt won't mind.

  3. The following user says thank you to wysota for this useful post:

    PaladinOfKaos (14th March 2007)

  4. #3
    Join Date
    Mar 2007
    Posts
    11
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Shared rendering class

    I'll go with the inheritance, then. The renderer class doesn't need to use QObject for anything, so there shouldn't be any problems.

    Thanks for the fast response

Similar Threads

  1. shared library problem
    By nhatkhang in forum KDE Forum
    Replies: 9
    Last Post: 28th November 2006, 04:07
  2. Replies: 2
    Last Post: 4th May 2006, 19:17
  3. Shared lib template broken under linux ???
    By fullmetalcoder in forum Qt Programming
    Replies: 9
    Last Post: 26th April 2006, 20:05
  4. How to propagate from one class to another
    By mahe2310 in forum Qt Programming
    Replies: 15
    Last Post: 20th March 2006, 01:27
  5. Replies: 5
    Last Post: 15th March 2006, 07:33

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.