Results 1 to 3 of 3

Thread: QGLWidget::grabFrameBuffer

  1. #1
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Red face QGLWidget::grabFrameBuffer

    I have tried using QGLWidget::grabFrameBuffer to make a QImage out of my QGLWidget. I have tried both creating the QImage initially and then setting it to result of grabFrameBuffer and I have also tried creating the QImage with the call to grabFrameBuffer. I am in color indexing mode and whenever I make the call to grabFrameBuffer it says my QImage has a color table size of 0. I can set the color table to get its size to what I need and then when I call grabFrameBuffer it sets the size back to 0. I cannot use QGLWidget::renderPixmap( ).toImage( ) because this resulting QImage gives me extra colors in my color table and I cannot get my image to map properly. Does anyone have any ideas why my call to grabFrameBuffer( ) results in an empty color table for my QImage? I have also used the call glReadBuffer and switched my buffers so I try to capture the entire image. Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QGLWidget::grabFrameBuffer

    bump...any ideas?

  3. #3
    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: QGLWidget::grabFrameBuffer

    Have you tried contacting Trolltech about it? Maybe you're grabbing the wrong buffer? Could you make a minimal compilable example reproducing the problem?

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.