Results 1 to 4 of 4

Thread: Qt and openGL - multiple (dual) video-cards, viewports, monitors

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qt and openGL - multiple (dual) video-cards, viewports, monitors

    Hello,

    i already worked with qt but not with qt-openGL (or only very little).

    For my current project i need to render a 3D-room. I might want to use a 3D-engine but i am considering using openGL and qt (i am not sure if it sufficient to use openGL to create the 3D-room).
    One problem is i need a player with 2 eyes and want to render one viewport for each eye. To start with i want to try and show the two viewports on 2 monitors (probably using two video-cards).

    Is this possible with qt? And is someone here who knows which classes i need to build a sample project? I first want to evaluate the possibility to do this with qt so i can decide how to start the project.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,972
    Thanks
    277
    Thanked 808 Times in 797 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Qt and openGL - multiple (dual) video-cards, viewports, monitors

    Look at QDesktopWidget documentation for information about multi-head systems. By determining whether the target system has a virtual desktop or more than one screen, you can decide how and where to position your viewports. Look at QGLWidget for information on using OpenGL within Qt. Plenty of examples in the Qt distribution on using OpenGL, so look at those too.

  3. #3
    Join Date
    Sep 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt and openGL - multiple (dual) video-cards, viewports, monitors

    Quote Originally Posted by d_stranz View Post
    Look at QDesktopWidget documentation for information about multi-head systems. By determining whether the target system has a virtual desktop or more than one screen, you can decide how and where to position your viewports. Look at QGLWidget for information on using OpenGL within Qt. Plenty of examples in the Qt distribution on using OpenGL, so look at those too.
    Thank you for your answer.

    My idea is to make two widgets which inherit from QGLWidget without a parent and make them fullscreen on the screens. This is already working manually, i will check later if i can use QDesktopWidget to automatically do this (priority is with the opengl-scene at the moment).
    To link them i wanted to make some object which inherits QObject and connect some of it's signals to slots of the opengl-widgets.

    Any advice on this?

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,972
    Thanks
    277
    Thanked 808 Times in 797 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Qt and openGL - multiple (dual) video-cards, viewports, monitors

    I think that when you make QWidget instances with no parent, they automatically become children of QDesktopWidget, but I am not sure of this. You'll still need to check screen count and geometry in order to size and position them properly on any display configuration.

Similar Threads

  1. Large desktop for Multiple Display Monitors
    By yxtx1984 in forum Qt Programming
    Replies: 5
    Last Post: 23rd December 2011, 10:37
  2. OpenGL graphicssystem issue on intel video chipset
    By Juba in forum Qt Programming
    Replies: 0
    Last Post: 7th June 2011, 10:18
  3. 4 openGL viewports
    By winder in forum Qt Programming
    Replies: 3
    Last Post: 22nd February 2010, 14:08
  4. QGLContext with multiple graphics cards
    By yuriy in forum Qt Programming
    Replies: 2
    Last Post: 11th September 2006, 15:35
  5. QGLWidget with multiple monitors
    By Rayven in forum Qt Programming
    Replies: 3
    Last Post: 4th August 2006, 10:28

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.