PDA

View Full Version : QGLFrameBUfferObject with parent window



xerionn
22nd December 2008, 08:16
I have been trying to set up a frame buffer object using the QGLFramebufferObject.
I thought that i was doing something wrong all the time and was trying various things cause i thought that my code was wrong...
In my project i have QMainWindow and a QGLWidget as a central widget...
By debugging i found that wthe problem was when i was trying to bind the FBo ( fb0->bind() )

After some searching i found that this happens only when i use the widget inside the qmainwindow...
So if the widget does not have a parent everything is ok as it seems.

The examples that qt provides for qglframebufferobject dont have a parent and everything works ok. Just to prove to myself that i was still sane :P i added those widgets to a qmainwindow and the bind() failed as expected..

I really dont have any idea on how to sort this so i would be more than grateful if someone could provide help !

Thank you in advance

wysota
22nd December 2008, 08:36
It's a long shot but have you tried disabling "Aliens" by setting the UseNativeWindow flag on the top-level window?

xerionn
23rd December 2008, 07:49
Could you please explain a bit more what do you mean by Aliens so i know what you are talking about?

I think i understand what you said about using native window even though i dont know how this can be done. I guess i am kinda new to Qt so any help would be more than welcome. Any qt documentation to find info about what you mentionned would be great !

wysota
23rd December 2008, 08:44
Could you please explain a bit more what do you mean by Aliens so i know what you are talking about?

Type in "Aliens+Qt" into some search engine.


I think i understand what you said about using native window even though i dont know how this can be done. I guess i am kinda new to Qt so any help would be more than welcome. Any qt documentation to find info about what you mentionned would be great !

Type in NativeWindows into Assistant.

xerionn
5th January 2009, 06:02
Hey again ! I hope everyone relaxed a little bit these days :) and had a nice NYE with family and friends !

Now back to my thingies :P
I tried to set my app to use NativeWindows but nothing changed.
I also found this post saying some things about disabling the aliens.
http://labs.trolltech.com/blogs/2007/08/30/say-goodbye-to-flicker-aliens-are-here-to-stay/

Same behaviour as before.If i call directly the GLWidget and show() it everyone works like a charm :) but i only get my widget and not my mainwindow,status bar,menu bar,dock widgets etc ...

Any other idea ?

xerionn
8th January 2009, 23:57
Seems like there is a bug. Its accepted by Qt as they could reproduce it with the code that i provided in some machines. Though as they said it may be card or driver related.

Now there is an open bug http://trolltech.com/developer/task-tracker/index_html?method=entry&id=240383

Thank you all for your responses