[Lazarus] opengl

Razvan Adrian Bogdan lightningflash at gmail.com
Fri Mar 14 16:55:40 CET 2008


On Tue, Mar 11, 2008 at 12:44 AM, Andrea Mauri
<andrea.mauri.75 at gmail.com> wrote:
>  The same molecule viewer if compiled for linux, both GTK and GTK2,
>  become slow. Rotation, that is a lot of drawing, is very slow.
>  It is a problem of OpenGL (graphics card acceleration, Linux drivers...)
>  on Linux or the TOpenGLControl component is slower on linux?

Actually OpenGL on Linux is faster than on Windows at least with
nVidia cards and (Commercial) drivers, you can test this on most
OpenGL apps and Games, however there is one important detail, OpenGL
needs full control of the window/widget to behave properly, maybe GTK
adds it's own overhead over the existing X window, if this is the case
and there's no way to get rid of useless refresh processing and such,
maybe it's a good idea to create the window using the lowest level API
GDI/X and just give the parent, i have recently read an article about
improving OpenGL performance on Vista and it claims that incorrect
message processing such as allowing the 2D API such as GDI to repaint
the window might have unpredictible results or performance loss, i
assume this is the case with the OGL Control in Laz, messages might
not be processed optimally and the GDI/GTK might still refresh them
when they shouldn't.

http://www.opengl.org/pipeline/article/vol003_9/
http://www.opengl.org/pipeline/article/vol003_7/

Razvan



More information about the Lazarus mailing list