PDA

View Full Version : capacity to use SampleBuffers in QtOpenGL



aalexei
16th February 2011, 03:06
Hi, I've just started using QtOpenGL with my graphics view to improve performance (it rocks) and was thinking that the results was looking really ugly. Then I noticed that QtOpenGL doesn't allow me to set setSampleBuffers(True) (or rather, it just ignores it).

Running the samplebuffers example just gives me a dialog with "This system does not have sample buffer support."

Sorry if this is a lame question, but I'm new to using opengl.

I'm running ubuntu 64 bit .. what do I need to run to check I have sufficient hardware and the right software (X presumably) config to do some antialiasing ?

Zed
16th February 2011, 10:15
Hi, you set the viewport of qgraphicsview with something like this ?:

setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers), this));

aalexei
16th February 2011, 13:31
Hi, you set the viewport of qgraphicsview with something like this ?:

setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers), this));

Well, the python equivalent:



glf = QtOpenGL.QGLFormat.defaultFormat()
glf.setSampleBuffers(True)
glf.setSamples(4)
self.setViewport(QtOpenGL.QGLWidget(glf))
self.setViewportUpdateMode(QtGui.QGraphicsView.Ful lViewportUpdate)


This goes through fine but checking later:

self.viewport().format().sampleBuffers()

gives False, and the results are clearly not antialiased.

glxgears looks smooth and crisp and glxinfo returns a ton of information but I don't know what I'm looking for :(

aalexei
17th February 2011, 11:55
looking at the output of glxinfo I have the extension:

GLX_ARB_multisample

Shouldn't this mean that my graphics card and set up can use the sample buffers? If so why wont QT pick up on this?

v315
28th April 2011, 17:37
same question as yours, but my GPU is GT240,how could not it support sampleBuffers?!!!!!! I doult there is some bugs....... maybe I am wrong.....