PDA

View Full Version : QGLWidget::grabFrameBuffer



ToddAtWSU
29th November 2006, 16:07
I have tried using QGLWidget::grabFrameBuffer (http://doc.trolltech.com/4.1/qglwidget.html#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!

ToddAtWSU
18th December 2006, 20:11
bump...any ideas?

wysota
19th December 2006, 06:13
Have you tried contacting Trolltech about it? Maybe you're grabbing the wrong buffer? Could you make a minimal compilable example reproducing the problem?