Results 1 to 20 of 24

Thread: Double Buffer

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 59 Times in 57 Posts

    Default Re: Double Buffer

    Hi,

    Paint what you want to display on a pixmap and in the paint event simply paint the pixmap on the widget.
    I'm trying to use 20 widgets that have to display 25 images per second. I think that OpenGL will be the best selection, so I will only have to take the image from the buffer, convert it to pixmap and bind to a OpenGL texture(I'm novice on OpenGL use).

    Thanks,
    Òscar Llarch i Galán

  2. #2
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 59 Times in 57 Posts

    Default Re: Double Buffer

    Hi,

    I'm having linking errors using OpenGL calls inside my code.

    I'm using Visual Studio .NET 2003 and Qt 4.3

    I included the QtOpenGL module.
    Òscar Llarch i Galán

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

    Default Re: Double Buffer

    Any details about the error?

  4. #4
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 59 Times in 57 Posts

    Default Re: Double Buffer

    LPR error LNK2019: sÃ*mbolo externo __imp__glMatrixMode@4 sin resolver al que se hace referencia en la función "public: virtual void __thiscall QMatroxGLWidget::initializeGL(void)" (?initializeGL@QMatroxGLWidget@@UAEXXZ)

    I get similar link errors for every OpenGL call that I'm using.
    I have the "QtOpenGLd4.lib" on linker options.

    Thanks,
    Òscar Llarch i Galán

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

    Default Re: Double Buffer

    Ok, but do you have OpenGL libraries linked as well?

  6. #6
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 59 Times in 57 Posts

    Default Re: Double Buffer

    Hi,

    Quote Originally Posted by wysota View Post
    Ok, but do you have OpenGL libraries linked as well?
    Really don't know. How can I know it and how to do it?

    Thanks,
    Òscar Llarch i Galán

  7. #7
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 59 Times in 57 Posts

    Default Re: Double Buffer

    Hi,

    Well, I have to install OpenGL SDK. What a mistake.

    My question now is:
    Is there any Windows generic OpenGL libraries or have I to use my manufacturer ones? If I use my manufacturer ones, then If I want to use the application on another machine with ATI display device, there will be a problem.

    Thanks,

    Òscar Llarch i Galán

  8. #8
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 59 Times in 57 Posts

    Default Re: Double Buffer

    Hi,

    Well, getting GLUT installed it works.

    Thank you for replies.

    Another question:
    I'm getting images as 8 bit image without any format. Is QImage the only way to get this image to be used in the OpenGL widget?
    Image Buffer -> QImage -> QPixmap -> OpenGL Texture

    Is there any best way?

    Thanks,
    Òscar Llarch i Galán

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Double Buffer


  10. #10
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 59 Times in 57 Posts

    Default Re: Double Buffer

    Hi,

    Thanks. Now I have to learn a little OpenGL, only to show an image.

    Thanks,
    Òscar Llarch i Galán

Similar Threads

  1. Double Click Capturing
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 8th January 2011, 14:12
  2. Simple ready-to-use widget to display an image
    By sylvaticus in forum Newbie
    Replies: 6
    Last Post: 29th December 2007, 11:22
  3. QGraphicsView wont show every item
    By abbapatris in forum Qt Programming
    Replies: 7
    Last Post: 5th September 2007, 11:47
  4. Serail Port GUI
    By ShaChris23 in forum Newbie
    Replies: 17
    Last Post: 17th April 2007, 19:49
  5. MYSQL insert
    By allensr in forum Newbie
    Replies: 4
    Last Post: 14th August 2006, 16:55

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.