Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2000-05

screen shots

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alan Ferguson

Hi all,

I thought I would share a couple of screen shots with you.

http://members.home.com/aferg/vieweig

One shot is of the program running in linux, the other is it running in windows.

These were made with FPC using openGL in windows and Mesa in linux. The torus* is stored in a XML file, and I use Sebastian Guenther's DOM units to read it in.

I have a large collection of these geometric shapes, from the "Struck" project. (now called fluidiom).

http://www.fluidiom.com/

Although this viewer program doesn't make much use of the Lazarus functionality yet, I would like it to. The trick is, how do I create a OpenGL "panel" inside a lazarus form?

Even if it's Lazarus content is lite, I think it embraces the Lazarus concept of write it once and run it both on Windows and Linux.

-Alan Ferguson

*Torus was created by Gerald de Jong

Reply by email

Sebastian Günther
to Marc Weustink: + From: Alan Ferguson + Although this viewer program doesn't make much use of the +…
Alan Ferguson wrote 7 lines
Thanks for the tip. Im not sure of the API i should use: GLX-- (which is the OpenGL to X interface) GtkGL-- (which is a wrapper around the GLX functions.) GtkGLArea-- which I think is a Gtk widget of some type that let's you paint on the GtkGLArea widget using OpenGL functions.

Under Linux you could use GLX or GtkGLArea (please, without "--" as this are the C++ versions which you cannot use from within Free Pascal). For starting, GtkGLArea is simple to use. For GLX you can take a look at the source of the GL widget which I created for KCL.

In windows i guess i use: Wgl

Yes. Wgl is the 'replacement' for GLX.

- Sebastian

Reply by email

Marc Weustink
to Alan Ferguson: Thanks for the tip. Im not sure of the API i should use: GLX-- (which is the OpenGL to X…

+ From: Alan Ferguson
+
+ Thanks for the tip. Im not sure of the API i should use: +
+ GLX-- (which is the OpenGL to X interface)
+ GtkGL-- (which is a wrapper around the GLX functions.)
+ GtkGLArea-- which I think is a Gtk widget of some type that
+ let's you paint on the GtkGLArea widget using OpenGL
+ functions.
+
+ In windows i guess i use:
+ Wgl

::-)

I ment, use *ONE* API to be platform independent and that can interface with the LCL winAPI. You cant simply create a Widget and tell the LCL to use it. The LCL is platform independent and has no knowledge to handle a widget.

If you want you can use it in your private component on only one platform. The handle of TWinControl is now in fact a pointer to a GTKwidget, but don't count on this in the future. (A handle is only an identifier to an window)

I don't know, but there might be a LGL wrap in the far future, so you can use GL independent of the platform.

+ I'm in the unhappy situation of having TOO many toys to play with in
+ my toy box. ;-)
+
+ Additionally im not sure about component making in Lazarus, as
+ i have not tried it yet. Is it really as easy as creating decedent of
+ TWinControl? Cool. Im still a little fuzzy about TGtkObject stuff,
+ but im sure it will become clearer as i play with it more.

Hmmm.... The editor we use is derived from TWinControl, so you can create your own controls with it, but you can't use platform specific stuff, unless defined in the API.

Marc

Reply by email

Alan Ferguson
to Marc Weustink: + From: Alan Ferguson + Although this viewer program doesn't make much use of the +…
Show quoted text 9 lines
+ Although this viewer program doesn't make much use of the + Lazarus functionality yet, I would like it to. The trick is, + how do I create a OpenGL "panel" inside a lazarus form? If OpenGL was available through api then you could have created a decendent of TWinControl and placed the "OpenGL window" inside it. Marc

Thanks for the tip. Im not sure of the API i should use:

GLX-- (which is the OpenGL to X interface)
GtkGL-- (which is a wrapper around the GLX functions.) GtkGLArea-- which I think is a Gtk widget of some type that let's you paint on the GtkGLArea widget using OpenGL functions.

In windows i guess i use:
Wgl

I'm in the unhappy situation of having TOO many toys to play with in my toy box. ;-)

Additionally im not sure about component making in Lazarus, as i have not tried it yet. Is it really as easy as creating decedent of TWinControl? Cool. Im still a little fuzzy about TGtkObject stuff, but im sure it will become clearer as i play with it more.

-Alan Ferguson

Reply by email