Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, May 2007
QGLPixelBuffer Update Problem


Message 1 in thread

Has anyone worked with a QGLPixelBuffer outside of a  
QGLWidget::paintGL() method? I'm using one to draw an image from data  
received over the network. The image is then rendered in the paintGL 
() method of the main thread. Everything works great if I do NOT call  
QGLPixelBuffer::bindToDynamicTexture(); if I do, I get no image. Note  
that the rendering of the network data into the QGLPixelBuffer does  
not occur from within my paintGL() routine.

Playing around with the pbuffers demo program, I can get the same  
behavior if I move out the pbuffer update from the paintGL() routine  
and instead trigger it from a QTimer: the pbuffer does not update.  
Any hints or ideas? I'd try QGLFramebuffer, but that is not supported  
on my box right now.

Thanks,

Brad

-- 
 [ signature omitted ] 

Message 2 in thread

Hi Brad,

> Has anyone worked with a QGLPixelBuffer outside of a QGLWidget::paintGL()
> method? I'm using one to draw an image from data received over the
network.
> The image is then rendered in the paintGL() method of the main thread.
> Everything works great if I do NOT call
> QGLPixelBuffer::bindToDynamicTexture(); if I do, I get no image. Note that
> the rendering of the network data into the QGLPixelBuffer does not occur
> from within my paintGL() routine.

I assume you need a call to QGLWidget::makeCurrent (or whatever its Qt4
equivalent is called) in order to do GL stuff outside of paintGL.

> Playing around with the pbuffers demo program, I can get the same behavior
> if I move out the pbuffer update from the paintGL() routine and instead
> trigger it from a QTimer: the pbuffer does not update. Any hints or ideas?
> I'd try QGLFramebuffer, but that is not supported on my box right now.
> 
> Thanks,
> 
> Brad

Greets,


	Ben

--
 [ signature omitted ]