[Lazarus] opengl and compiz

Reimar Grabowski reimgrab at web.de
Wed Aug 19 03:21:53 CEST 2009


On Tue, 18 Aug 2009 23:29:54 +0200
Andrea Mauri <andrea.mauri.75 at gmail.com> wrote:

> Dear Mattias,
> I think that is related to how lazarus manage opengl.
I cannot really confirm this. My code works fine with or without compiz. But I must admit that I see the same resize problems you do when I use a complex offscreen framebuffer structure with compiz enabled. I did not have the time to trace the origin of the troubles but I don't think it is related to Lazarus (although it is possible).
Simple framebuffer setups don't show any problems but I always use the resize event to correctly setup projection matrix and viewport.

> I tried another example with TOpenGLControl and I get the same behaviour.
I have just tested your code and it looks like there is a problem with the OnClick event of the control. Lots of clicks are 'lost' if compiz is enabled. But it does not seem to be a problem with the minimizing else my code should show the problem, too, and I can get your code the show the cube even after minimizing and restoring the window. If I find some time I will try to look a little bit deeper.

> Any ideas?
Perhaps your driver/card don't play nicely with compiz. Compiz sometimes shows problems with all kind of stuff (mostly task bars and window decorations). So I advise you to disable it while developing or using windowed OpenGL programs (btw fusion-icon makes this window manager switching easy).
It may be a problem with GLScene but the 'lost' OnClick events look like there is some trouble with Lazarus, too.

hih

Reimar

P.S.: And while we are talking about compiz issues. I have observed that my framerate increases if I have the mouse pointer over the OpenGLControl (which I think is really strange behaviour). Do you see the same effect?
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?




More information about the Lazarus mailing list