From: ·········@gmail.com
Subject: What about Lisp and OpenGL (or other graphics libraries)??
Date: 
Message-ID: <1142547649.970132.300110@z34g2000cwc.googlegroups.com>
I need to include some displays in a program so I would really like to
have an opengl library, like C++ does. However, from what I have seen
on the net, there is no standard library and what's there seems more
like incomplete patchwork.

Anyone knows how to gain graphical capabilities using Lisp? do I have
to code that in C/C++ and then communicate through ports or something?

Any and all help greatly appreciated :)

From: Eric Lavigne
Subject: Re: What about Lisp and OpenGL (or other graphics libraries)??
Date: 
Message-ID: <1142552496.994681.147040@p10g2000cwp.googlegroups.com>
·········@gmail.com wrote:
> I need to include some displays in a program so I would really like to
> have an opengl library, like C++ does. However, from what I have seen
> on the net, there is no standard library and what's there seems more
> like incomplete patchwork.
>
> Anyone knows how to gain graphical capabilities using Lisp? do I have
> to code that in C/C++ and then communicate through ports or something?
>
> Any and all help greatly appreciated :)

Check out this library. Don't worry too much about lack of
documentation on the website, since there are a lot more docs as part
of the download.
http://common-lisp.net/project/cells/

I'm not sure if you would prefer to use the Cells-GTK user interface
library in that project, or if you would prefer to just grab cl-opengl
and make opengl calls directly (as you suggested in your post).

If you want cl-opengl, go to http://common-lisp.net/project/cells/ and
look for this line:
"The repository of all other Cells code (including Cello) is here."
cl-opengl is just one of the support libraries for Cello, which is
another GUI library that uses opengl.

So, what sort of graphical capabilities were you looking for? I think
most people don't actually want to be making opengl calls directly, but
maybe you are one of them?
From: ·········@gmail.com
Subject: Re: What about Lisp and OpenGL (or other graphics libraries)??
Date: 
Message-ID: <1142564300.153428.103340@j52g2000cwj.googlegroups.com>
yes, I would like to make direct opengl calls, like in C/C++. Another
option may be the Lush language/environment (which is based on lisp),
http://lush.sourceforge.net/

but it doesn't support lexical scope! not having closures seems like a
huge loss so I guess I'll have to pass.
From: Ken Tilton
Subject: Re: What about Lisp and OpenGL (or other graphics libraries)??
Date: 
Message-ID: <ojrSf.1804$ff5.1520@fe09.lga>
·········@gmail.com wrote:
> yes, I would like to make direct opengl calls, like in C/C++.

So make them. Use CFFI to define what we call bindings. Bindings are 
just glue to C. Once you load the Lisp package that defines these 
bindings, you can make all the calls to OpenGL or any other C library 
you like.

Eric pointed you to my Cells project. I think that is OK, but more 
recent would be the Cello project. Or use SDL. Then you can do all the 
OpenGL you want.

The bigger issue is your thinking Lisp cannot call C. It just takes a 
few days once you get the hang of CFFI to write bindings for any 
library. You can even try the SWIG system to generate the bindings 
automatically from the C header files.

Ah, but then you need to remember that you wanted to call C, so you have 
to make sure you pass the write type (integer, float, double-float). My 
cl-opengl macros do a JIT coerce to the right type so you can forget 
about C altogether.

kt

-- 
Cells: http://common-lisp.net/project/cells/

"And I will know my song well before I start singing."  - Bob Dylan
From: Thomas Atkins
Subject: Re: What about Lisp and OpenGL (or other graphics libraries)??
Date: 
Message-ID: <1142578469.296877.16870@p10g2000cwp.googlegroups.com>
·········@gmail.com wrote:
> I need to include some displays in a program so I would really like to
> have an opengl library, like C++ does. However, from what I have seen
> on the net, there is no standard library and what's there seems more
> like incomplete patchwork.
>
> Anyone knows how to gain graphical capabilities using Lisp? do I have
> to code that in C/C++ and then communicate through ports or something?
> 
> Any and all help greatly appreciated :)
www.cliki.net/cl-sdl
From: Frank Buss
Subject: Re: What about Lisp and OpenGL (or other graphics libraries)??
Date: 
Message-ID: <vlpq353004qn.r4pgu67oodfx.dlg@40tude.net>
·········@gmail.com wrote:

> I need to include some displays in a program so I would really like to
> have an opengl library, like C++ does. However, from what I have seen
> on the net, there is no standard library and what's there seems more
> like incomplete patchwork.
> 
> Anyone knows how to gain graphical capabilities using Lisp? do I have
> to code that in C/C++ and then communicate through ports or something?

You can use the Common Lisp Application Builder SDL package for 2D
graphics:

http://www.lispbuilder.org

A project member, Luke J Crook, announced that he is creating a CFFI OpenGL
mapping, which can be used together with SDL.

-- 
Frank Buss, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Brad Might
Subject: Re: What about Lisp and OpenGL (or other graphics libraries)??
Date: 
Message-ID: <1142614996.528931.73390@j33g2000cwa.googlegroups.com>
Pick an implementation and use existing or creation your own FFI calls
directly to opengl. There is no lisp library required as you can use
opengl directly.
From: Luís Oliveira
Subject: Re: What about Lisp and OpenGL (or other graphics libraries)??
Date: 
Message-ID: <m2k6at2zy5.fsf@deadspam.com>
·········@gmail.com writes:
> I need to include some displays in a program so I would really like to
> have an opengl library, like C++ does.

Check out this work in progress (it has some little examples):
http://common-lisp.net/project/cl-opengl/darcs/


> Anyone knows how to gain graphical capabilities using Lisp? do I have
> to code that in C/C++ and then communicate through ports or something?

Yes. No. See "An Introduction to Foreign Interfaces and CFFI":
http://common-lisp.net/project/cffi/manual/html_node/Tutorial.html

HTH

-- 
Luís Oliveira
luismbo (@) gmail (.) com
Equipa Portuguesa do Translation Project
http://www.iro.umontreal.ca/translation/registry.cgi?team=pt