[Lazarus] opengl

Andrea Mauri andrea.mauri.75 at gmail.com
Mon Mar 3 11:42:53 CET 2008

Under GTK2 I still have problems.
Lazarus svn FPC 2.2, Ubuntu.
The TOpenGLControl is compiled and installed in the GTK2 Lazarus IDE. I 
can put a TOpenGLControl on a form but when I run the project it is 
compiled (see compiler messages below), but the execution is immediately 
stopped, I can't see the form with the TOpenGLControl running.
It could be a problem due to some missing Linux libraries?

compiler messages:

Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Warning: You are using the obsolete switch -OG
Free Pascal Compiler version 2.2.0 [2007/08/30] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Linux for i386
Compiling /home/giacca/lazarus_projects/tmp/project1.lpr
Compiling unit1.pas
Linking /home/giacca/lazarus_projects/tmp/project1
57 lines compiled, 14.4 sec
1 warning(s) issued
2 hint(s) issued
Project "project1" successfully built. :)

Mattias Gaertner ha scritto:
> On Fri, 29 Feb 2008 16:41:58 +0100
> Andrea Mauri <andrea.mauri.75 at gmail.com> wrote:
>>> It works here under gtk2.
>> I am not able to use TOpenGLControl on GTK2, I can place it on a
>> form, I can compile it but it doesn't run. After pressing F9 the
>> project is compiled successfully then launched and immediately the
>> "Execution Stopped" message is showed up.
>> I have also seen in the OpenGLContext unit these lines:
>> [...]
>>   Author: Mattias Gaertner
>>   Abstract:
>>     TOpenGLControl is a LCL control with an opengl context.
>>     It works under the following platforms:
>>       - gtk with glx    : full
>> *      - gtk2 with glx   : started, not yet working*
>>       - carbon with agl : full
>>       - windows with wgl: full
>> }                   
> I changed this to full.
>>> I know of a refresh problem when maximizing, but otherwise it
>>> should work. What problems do you have?  
>> When I put a TOpenGLControl on a form (windows) I obtain this:
> What lazarus version are you using? 32 or 64 bit? What fpc version?
> Can you try the svn version or at least the daily snapshot?
> I didn't try the control under windows recently, so maybe some win32
> devel broke it unknowingly. I will try to find a windows machine to
> test.
>> And this when I run my project:
>> I didn't see the same behaviour using GTK, using GTK it seems to work 
>> properly.
> You need a recent lazarus 0.9.25 version to use the openglcontrol
> under gtk2.
> Mattias
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Dr. Andrea Mauri, PhD
Milano Chemometrics and QSAR Research Group
Department of Environmental Sciences
University of Milano-Bicocca 
P.zza della Scienza, 1
20126 Milano - Italy

Tel: ++39 02 64482801
mailto:andrea.mauri.75 at gmail.com

More information about the Lazarus mailing list