OpenGL in pharo?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenGL in pharo?

melkyades
Hi, I've been browsing the different ways to use OpenGL in pharo and squeak. Here is a log of the results:

1 - Baloon3D - It looks like a layer on which squeaksource.com/OpenGL stands, so to use opengl you load balloon3d, then opengl and if you have the Balloon3dPlugin available then you can use OpenGL. This seems to include code dated from 2007/before. It loads fine in Squeak but in pharo I get many errors (load balloon3d-all in pharo1.0 rc2).

2 - GLMorphic - It uses FFI, so no plugin is needed, but it seems to be programmed only for windows, and I'm working in linux now.

3 - AlienOpenGL - It uses the new Alien FFI, which is only available in Mac platform.

So, the question is: is there any way to play with OpenGL in pharo on linux platform ?

Regards,
             Javier.

--
Javier Pimás
Ciudad de Buenos Aires

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: OpenGL in pharo?

Fernando olivero
Hola Javier,  on top of AlienOpenGL , which is just an interface to OpenGL, i've built a 3d framework with better abstractions called Lumiere. (http://www.inf.usi.ch/phd/olivero/LumierePage.html  (A little bit outdated...i've added a couple of more things recently..)
  
In this  paper that  we presented at the last ESUG/IWST 09 , with also did brief survey of OpenGL in smalltalk. (www.esug.org/data/ESUG2009/IWST/iwst09_submission_6.pd)

If there's a plugin for AlienFFI for Linux i'm not sure. But have you tried the FFI binding of OGL of Croquet? That one works in Linux. Look in squeaksource, because i remember someone decoupled the OGL wrapper from Croquet and put it there.

I dont know if June ( for visual works) works in linux, but you could take a look of it.




Saludos,
Fernando


On Feb 10, 2010, at 3:01 AM, Javier Pimás wrote:

Hi, I've been browsing the different ways to use OpenGL in pharo and squeak. Here is a log of the results:

1 - Baloon3D - It looks like a layer on which squeaksource.com/OpenGL stands, so to use opengl you load balloon3d, then opengl and if you have the Balloon3dPlugin available then you can use OpenGL. This seems to include code dated from 2007/before. It loads fine in Squeak but in pharo I get many errors (load balloon3d-all in pharo1.0 rc2).

2 - GLMorphic - It uses FFI, so no plugin is needed, but it seems to be programmed only for windows, and I'm working in linux now.

3 - AlienOpenGL - It uses the new Alien FFI, which is only available in Mac platform.

So, the question is: is there any way to play with OpenGL in pharo on linux platform ?

Regards,
             Javier.

--
Javier Pimás
Ciudad de Buenos Aires
<ATT00001..txt>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: OpenGL in pharo?

melkyades
Fernando,
            thanks for the tips. I read about lumiere before, but I'm not looking for a complete 3d framework, just the opengl wrappers to do some experiments. A complete framework would be too much for what I want to try (hw acelerated 2d animations). Anyway, your pdf gave me a better idea of the status of all the available projects.

 As of Croquet, yes, someone decoupled the OpenGL part (which is the same I tested yesterday and depends on Ballon3D). I finally was able to load it in pharo! If anyone is interested here are the steps:

Take a pharo image (mine had FFI and VMMaker already loaded, I don't know if they were needed at all)

In monticello add squeaksource.com/Balloon3D. Open it and load just this packages in order: Balloon3D-constants, Balloon3D-kernel, Balloon3D-math.

Now add squeaksource.com/OpenGL and load it.

That's all to load it, to try it, doit this code, and when you get errors change occurrences of Smalltalk to SmalltalkImage current.


ogl := OpenGL newIn: (0@0 extent: 300@300).
green := 1.
canvas := OGLCanvas new initialize: ogl.
fade:= 0.

    1000 timesRepeat: [
       ogl glClearColor:0 with: fade with: 0 with: 1.
        ogl glClear: 16r4000.
        ogl swapBuffers.
       fade := fade + 0.001.
    ].

fade := 0.


I think the best way would be to use AlienOpenGL, which is the future, but for that I'll have to wait alien support in linux.

Regards,
          Javier.

2010/2/10 Fernando olivero <[hidden email]>
Hola Javier,  on top of AlienOpenGL , which is just an interface to OpenGL, i've built a 3d framework with better abstractions called Lumiere. (http://www.inf.usi.ch/phd/olivero/LumierePage.html  (A little bit outdated...i've added a couple of more things recently..)
  
In this  paper that  we presented at the last ESUG/IWST 09 , with also did brief survey of OpenGL in smalltalk. (www.esug.org/data/ESUG2009/IWST/iwst09_submission_6.pd)

If there's a plugin for AlienFFI for Linux i'm not sure. But have you tried the FFI binding of OGL of Croquet? That one works in Linux. Look in squeaksource, because i remember someone decoupled the OGL wrapper from Croquet and put it there.

I dont know if June ( for visual works) works in linux, but you could take a look of it.




Saludos,
Fernando


On Feb 10, 2010, at 3:01 AM, Javier Pimás wrote:

Hi, I've been browsing the different ways to use OpenGL in pharo and squeak. Here is a log of the results:

1 - Baloon3D - It looks like a layer on which squeaksource.com/OpenGL stands, so to use opengl you load balloon3d, then opengl and if you have the Balloon3dPlugin available then you can use OpenGL. This seems to include code dated from 2007/before. It loads fine in Squeak but in pharo I get many errors (load balloon3d-all in pharo1.0 rc2).

2 - GLMorphic - It uses FFI, so no plugin is needed, but it seems to be programmed only for windows, and I'm working in linux now.

3 - AlienOpenGL - It uses the new Alien FFI, which is only available in Mac platform.

So, the question is: is there any way to play with OpenGL in pharo on linux platform ?

Regards,
             Javier.

--
Javier Pimás
Ciudad de Buenos Aires
<ATT00001..txt>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



--
Javier Pimás
Ciudad de Buenos Aires

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: OpenGL in pharo?

Eliot Miranda-2


2010/2/10 Javier Pimás <[hidden email]>
Fernando,
            thanks for the tips. I read about lumiere before, but I'm not looking for a complete 3d framework, just the opengl wrappers to do some experiments. A complete framework would be too much for what I want to try (hw acelerated 2d animations). Anyway, your pdf gave me a better idea of the status of all the available projects.

 As of Croquet, yes, someone decoupled the OpenGL part (which is the same I tested yesterday and depends on Ballon3D). I finally was able to load it in pharo! If anyone is interested here are the steps:

Take a pharo image (mine had FFI and VMMaker already loaded, I don't know if they were needed at all)

In monticello add squeaksource.com/Balloon3D. Open it and load just this packages in order: Balloon3D-constants, Balloon3D-kernel, Balloon3D-math.

Now add squeaksource.com/OpenGL and load it.

That's all to load it, to try it, doit this code, and when you get errors change occurrences of Smalltalk to SmalltalkImage current.


ogl := OpenGL newIn: (0@0 extent: 300@300).
green := 1.
canvas := OGLCanvas new initialize: ogl.
fade:= 0.

    1000 timesRepeat: [
       ogl glClearColor:0 with: fade with: 0 with: 1.
        ogl glClear: 16r4000.
        ogl swapBuffers.
       fade := fade + 0.001.
    ].

fade := 0.


I think the best way would be to use AlienOpenGL, which is the future, but for that I'll have to wait alien support in linux.

The alien code should "just work" on linux, but subtleties in alloca mean it crashes on e.g. Ubuntu.  But Ryan Macnak juts got the AlienFFI working in Newspeak on Ubuntu.

I think what's happened is that recent Linux gcc versions increase the stack alignment to 16 bytes to support x86 sse2 instructions, where 16 byte alignment is required to avoid alignment violations using 128-bit transfers to/from the xmm registers.    So in platforms/Cross/plugins/ia32abicc.c where it states

#if __APPLE__ && __MACH__ && __i386__
# define STACK_ALIGN_BYTES 16
#endif

this should probably read 

#if ((__APPLE__ && __MACH__) || __linux__) && __i386__
# define STACK_ALIGN_BYTES 16
#endif 

Give it a go and you should find the AlienFFI will work on linux.


Regards,
          Javier.

2010/2/10 Fernando olivero <[hidden email]>
Hola Javier,  on top of AlienOpenGL , which is just an interface to OpenGL, i've built a 3d framework with better abstractions called Lumiere. (http://www.inf.usi.ch/phd/olivero/LumierePage.html  (A little bit outdated...i've added a couple of more things recently..)
  
In this  paper that  we presented at the last ESUG/IWST 09 , with also did brief survey of OpenGL in smalltalk. (www.esug.org/data/ESUG2009/IWST/iwst09_submission_6.pd)

If there's a plugin for AlienFFI for Linux i'm not sure. But have you tried the FFI binding of OGL of Croquet? That one works in Linux. Look in squeaksource, because i remember someone decoupled the OGL wrapper from Croquet and put it there.

I dont know if June ( for visual works) works in linux, but you could take a look of it.




Saludos,
Fernando


On Feb 10, 2010, at 3:01 AM, Javier Pimás wrote:

Hi, I've been browsing the different ways to use OpenGL in pharo and squeak. Here is a log of the results:

1 - Baloon3D - It looks like a layer on which squeaksource.com/OpenGL stands, so to use opengl you load balloon3d, then opengl and if you have the Balloon3dPlugin available then you can use OpenGL. This seems to include code dated from 2007/before. It loads fine in Squeak but in pharo I get many errors (load balloon3d-all in pharo1.0 rc2).

2 - GLMorphic - It uses FFI, so no plugin is needed, but it seems to be programmed only for windows, and I'm working in linux now.

3 - AlienOpenGL - It uses the new Alien FFI, which is only available in Mac platform.

So, the question is: is there any way to play with OpenGL in pharo on linux platform ?

Regards,
             Javier.

--
Javier Pimás
Ciudad de Buenos Aires
<ATT00001..txt>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



--
Javier Pimás
Ciudad de Buenos Aires

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: OpenGL in pharo?

Schwab,Wilhelm K
Interesting that Ubuntu turns out to be the trouble spot.  I take no joy in that, because I have found Ubuntu to be a good platform for me, but the "now it works, now it's broken again" vpn and a few other snags have me casually looking at other distributions.  Mandriva looks interesting based on a LiveCD.  As always, recommendations (both positive and negative) are welcome.
 
One thing lacking (when I last looked) was an Alien plugin for Linux.  There is a configuration for VMMaker, but I have been too busy to get much beyond noticing that.
 
Bill


From: [hidden email] [mailto:[hidden email]] On Behalf Of Eliot Miranda
Sent: Wednesday, February 10, 2010 1:11 PM
To: [hidden email]
Cc: Ryan Macnak
Subject: Re: [Pharo-project] OpenGL in pharo?



2010/2/10 Javier Pimás <[hidden email]>
Fernando,
            thanks for the tips. I read about lumiere before, but I'm not looking for a complete 3d framework, just the opengl wrappers to do some experiments. A complete framework would be too much for what I want to try (hw acelerated 2d animations). Anyway, your pdf gave me a better idea of the status of all the available projects.

 As of Croquet, yes, someone decoupled the OpenGL part (which is the same I tested yesterday and depends on Ballon3D). I finally was able to load it in pharo! If anyone is interested here are the steps:

Take a pharo image (mine had FFI and VMMaker already loaded, I don't know if they were needed at all)

In monticello add squeaksource.com/Balloon3D. Open it and load just this packages in order: Balloon3D-constants, Balloon3D-kernel, Balloon3D-math.

Now add squeaksource.com/OpenGL and load it.

That's all to load it, to try it, doit this code, and when you get errors change occurrences of Smalltalk to SmalltalkImage current.


ogl := OpenGL newIn: (0@0 extent: 300@300).
green := 1.
canvas := OGLCanvas new initialize: ogl.
fade:= 0.

    1000 timesRepeat: [
       ogl glClearColor:0 with: fade with: 0 with: 1.
        ogl glClear: 16r4000.
        ogl swapBuffers.
       fade := fade + 0.001.
    ].

fade := 0.


I think the best way would be to use AlienOpenGL, which is the future, but for that I'll have to wait alien support in linux.

The alien code should "just work" on linux, but subtleties in alloca mean it crashes on e.g. Ubuntu.  But Ryan Macnak juts got the AlienFFI working in Newspeak on Ubuntu.

I think what's happened is that recent Linux gcc versions increase the stack alignment to 16 bytes to support x86 sse2 instructions, where 16 byte alignment is required to avoid alignment violations using 128-bit transfers to/from the xmm registers.    So in platforms/Cross/plugins/ia32abicc.c where it states

#if __APPLE__ && __MACH__ && __i386__
# define STACK_ALIGN_BYTES 16
#endif

this should probably read 

#if ((__APPLE__ && __MACH__) || __linux__) && __i386__
# define STACK_ALIGN_BYTES 16
#endif 

Give it a go and you should find the AlienFFI will work on linux.


Regards,
          Javier.

2010/2/10 Fernando olivero <[hidden email]>
Hola Javier,  on top of AlienOpenGL , which is just an interface to OpenGL, i've built a 3d framework with better abstractions called Lumiere. (http://www.inf.usi.ch/phd/olivero/LumierePage.html  (A little bit outdated...i've added a couple of more things recently..)
  
In this  paper that  we presented at the last ESUG/IWST 09 , with also did brief survey of OpenGL in smalltalk. (www.esug.org/data/ESUG2009/IWST/iwst09_submission_6.pd)

If there's a plugin for AlienFFI for Linux i'm not sure. But have you tried the FFI binding of OGL of Croquet? That one works in Linux. Look in squeaksource, because i remember someone decoupled the OGL wrapper from Croquet and put it there.

I dont know if June ( for visual works) works in linux, but you could take a look of it.




Saludos,
Fernando


On Feb 10, 2010, at 3:01 AM, Javier Pimás wrote:

Hi, I've been browsing the different ways to use OpenGL in pharo and squeak. Here is a log of the results:

1 - Baloon3D - It looks like a layer on which squeaksource.com/OpenGL stands, so to use opengl you load balloon3d, then opengl and if you have the Balloon3dPlugin available then you can use OpenGL. This seems to include code dated from 2007/before. It loads fine in Squeak but in pharo I get many errors (load balloon3d-all in pharo1.0 rc2).

2 - GLMorphic - It uses FFI, so no plugin is needed, but it seems to be programmed only for windows, and I'm working in linux now.

3 - AlienOpenGL - It uses the new Alien FFI, which is only available in Mac platform.

So, the question is: is there any way to play with OpenGL in pharo on linux platform ?

Regards,
             Javier.

--
Javier Pimás
Ciudad de Buenos Aires
<ATT00001..txt>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



--
Javier Pimás
Ciudad de Buenos Aires

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: OpenGL in pharo?

laurent laffont
In reply to this post by melkyades
Hi,

I've just tried on Archlinux with Squeak-3.11.3.2135 VM from pharo website and it works (not with Exupery VM). 

Laurent Laffont


2010/2/10 Javier Pimás <[hidden email]>
Fernando,
            thanks for the tips. I read about lumiere before, but I'm not looking for a complete 3d framework, just the opengl wrappers to do some experiments. A complete framework would be too much for what I want to try (hw acelerated 2d animations). Anyway, your pdf gave me a better idea of the status of all the available projects.

 As of Croquet, yes, someone decoupled the OpenGL part (which is the same I tested yesterday and depends on Ballon3D). I finally was able to load it in pharo! If anyone is interested here are the steps:

Take a pharo image (mine had FFI and VMMaker already loaded, I don't know if they were needed at all)

In monticello add squeaksource.com/Balloon3D. Open it and load just this packages in order: Balloon3D-constants, Balloon3D-kernel, Balloon3D-math.

Now add squeaksource.com/OpenGL and load it.

That's all to load it, to try it, doit this code, and when you get errors change occurrences of Smalltalk to SmalltalkImage current.


ogl := OpenGL newIn: (0@0 extent: 300@300).
green := 1.
canvas := OGLCanvas new initialize: ogl.
fade:= 0.

    1000 timesRepeat: [
       ogl glClearColor:0 with: fade with: 0 with: 1.
        ogl glClear: 16r4000.
        ogl swapBuffers.
       fade := fade + 0.001.
    ].

fade := 0.


I think the best way would be to use AlienOpenGL, which is the future, but for that I'll have to wait alien support in linux.

Regards,
          Javier.

2010/2/10 Fernando olivero <[hidden email]>
Hola Javier,  on top of AlienOpenGL , which is just an interface to OpenGL, i've built a 3d framework with better abstractions called Lumiere. (http://www.inf.usi.ch/phd/olivero/LumierePage.html  (A little bit outdated...i've added a couple of more things recently..)
  
In this  paper that  we presented at the last ESUG/IWST 09 , with also did brief survey of OpenGL in smalltalk. (www.esug.org/data/ESUG2009/IWST/iwst09_submission_6.pd)

If there's a plugin for AlienFFI for Linux i'm not sure. But have you tried the FFI binding of OGL of Croquet? That one works in Linux. Look in squeaksource, because i remember someone decoupled the OGL wrapper from Croquet and put it there.

I dont know if June ( for visual works) works in linux, but you could take a look of it.




Saludos,
Fernando


On Feb 10, 2010, at 3:01 AM, Javier Pimás wrote:

Hi, I've been browsing the different ways to use OpenGL in pharo and squeak. Here is a log of the results:

1 - Baloon3D - It looks like a layer on which squeaksource.com/OpenGL stands, so to use opengl you load balloon3d, then opengl and if you have the Balloon3dPlugin available then you can use OpenGL. This seems to include code dated from 2007/before. It loads fine in Squeak but in pharo I get many errors (load balloon3d-all in pharo1.0 rc2).

2 - GLMorphic - It uses FFI, so no plugin is needed, but it seems to be programmed only for windows, and I'm working in linux now.

3 - AlienOpenGL - It uses the new Alien FFI, which is only available in Mac platform.

So, the question is: is there any way to play with OpenGL in pharo on linux platform ?

Regards,
             Javier.

--
Javier Pimás
Ciudad de Buenos Aires
<ATT00001..txt>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



--
Javier Pimás
Ciudad de Buenos Aires

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: OpenGL in pharo?

melkyades
In reply to this post by Eliot Miranda-2
Nice!! I'll try and let you know the results (I'm on Ubuntu).

Regards,
             Javier.

2010/2/10 Eliot Miranda <[hidden email]>


2010/2/10 Javier Pimás <[hidden email]>

Fernando,
            thanks for the tips. I read about lumiere before, but I'm not looking for a complete 3d framework, just the opengl wrappers to do some experiments. A complete framework would be too much for what I want to try (hw acelerated 2d animations). Anyway, your pdf gave me a better idea of the status of all the available projects.

 As of Croquet, yes, someone decoupled the OpenGL part (which is the same I tested yesterday and depends on Ballon3D). I finally was able to load it in pharo! If anyone is interested here are the steps:

Take a pharo image (mine had FFI and VMMaker already loaded, I don't know if they were needed at all)

In monticello add squeaksource.com/Balloon3D. Open it and load just this packages in order: Balloon3D-constants, Balloon3D-kernel, Balloon3D-math.

Now add squeaksource.com/OpenGL and load it.

That's all to load it, to try it, doit this code, and when you get errors change occurrences of Smalltalk to SmalltalkImage current.


ogl := OpenGL newIn: (0@0 extent: 300@300).
green := 1.
canvas := OGLCanvas new initialize: ogl.
fade:= 0.

    1000 timesRepeat: [
       ogl glClearColor:0 with: fade with: 0 with: 1.
        ogl glClear: 16r4000.
        ogl swapBuffers.
       fade := fade + 0.001.
    ].

fade := 0.


I think the best way would be to use AlienOpenGL, which is the future, but for that I'll have to wait alien support in linux.

The alien code should "just work" on linux, but subtleties in alloca mean it crashes on e.g. Ubuntu.  But Ryan Macnak juts got the AlienFFI working in Newspeak on Ubuntu.

I think what's happened is that recent Linux gcc versions increase the stack alignment to 16 bytes to support x86 sse2 instructions, where 16 byte alignment is required to avoid alignment violations using 128-bit transfers to/from the xmm registers.    So in platforms/Cross/plugins/ia32abicc.c where it states

#if __APPLE__ && __MACH__ && __i386__
# define STACK_ALIGN_BYTES 16
#endif

this should probably read 

#if ((__APPLE__ && __MACH__) || __linux__) && __i386__
# define STACK_ALIGN_BYTES 16
#endif 

Give it a go and you should find the AlienFFI will work on linux.


Regards,
          Javier.

2010/2/10 Fernando olivero <[hidden email]>
Hola Javier,  on top of AlienOpenGL , which is just an interface to OpenGL, i've built a 3d framework with better abstractions called Lumiere. (http://www.inf.usi.ch/phd/olivero/LumierePage.html  (A little bit outdated...i've added a couple of more things recently..)
  
In this  paper that  we presented at the last ESUG/IWST 09 , with also did brief survey of OpenGL in smalltalk. (www.esug.org/data/ESUG2009/IWST/iwst09_submission_6.pd)

If there's a plugin for AlienFFI for Linux i'm not sure. But have you tried the FFI binding of OGL of Croquet? That one works in Linux. Look in squeaksource, because i remember someone decoupled the OGL wrapper from Croquet and put it there.

I dont know if June ( for visual works) works in linux, but you could take a look of it.




Saludos,
Fernando


On Feb 10, 2010, at 3:01 AM, Javier Pimás wrote:

Hi, I've been browsing the different ways to use OpenGL in pharo and squeak. Here is a log of the results:

1 - Baloon3D - It looks like a layer on which squeaksource.com/OpenGL stands, so to use opengl you load balloon3d, then opengl and if you have the Balloon3dPlugin available then you can use OpenGL. This seems to include code dated from 2007/before. It loads fine in Squeak but in pharo I get many errors (load balloon3d-all in pharo1.0 rc2).

2 - GLMorphic - It uses FFI, so no plugin is needed, but it seems to be programmed only for windows, and I'm working in linux now.

3 - AlienOpenGL - It uses the new Alien FFI, which is only available in Mac platform.

So, the question is: is there any way to play with OpenGL in pharo on linux platform ?

Regards,
             Javier.

--
Javier Pimás
Ciudad de Buenos Aires
<ATT00001..txt>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



--
Javier Pimás
Ciudad de Buenos Aires

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



--
Javier Pimás
Ciudad de Buenos Aires

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: OpenGL in pharo?

Stéphane Ducasse
In reply to this post by melkyades

On Feb 10, 2010, at 3:01 AM, Javier Pimás wrote:

> Hi, I've been browsing the different ways to use OpenGL in pharo and squeak. Here is a log of the results:
>
> 1 - Baloon3D - It looks like a layer on which squeaksource.com/OpenGL stands, so to use opengl you load balloon3d, then opengl and if you have the Balloon3dPlugin available then you can use OpenGL. This seems to include code dated from 2007/before. It loads fine in Squeak but in pharo I get many errors (load balloon3d-all in pharo1.0 rc2).

Thanks Javier
May be you should check the problem because I do not really see why this would be a real problem.
Can you let us know what is the error?

>
> 2 - GLMorphic - It uses FFI, so no plugin is needed, but it seems to be programmed only for windows, and I'm working in linux now.
>
> 3 - AlienOpenGL - It uses the new Alien FFI, which is only available in Mac platform.
>
> So, the question is: is there any way to play with OpenGL in pharo on linux platform ?
>
> Regards,
>              Javier.
>
> --
> Javier Pimás
> Ciudad de Buenos Aires
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: OpenGL in pharo?

Stéphane Ducasse
In reply to this post by melkyades
It would be good to have 'AlienFFI working on linux' published so that we can use it.

stef

On Feb 11, 2010, at 2:20 AM, Javier Pimás wrote:

> Nice!! I'll try and let you know the results (I'm on Ubuntu).
>
> Regards,
>              Javier.
>
> 2010/2/10 Eliot Miranda <[hidden email]>
>
>
> 2010/2/10 Javier Pimás <[hidden email]>
>
> Fernando,
>             thanks for the tips. I read about lumiere before, but I'm not looking for a complete 3d framework, just the opengl wrappers to do some experiments. A complete framework would be too much for what I want to try (hw acelerated 2d animations). Anyway, your pdf gave me a better idea of the status of all the available projects.
>
>  As of Croquet, yes, someone decoupled the OpenGL part (which is the same I tested yesterday and depends on Ballon3D). I finally was able to load it in pharo! If anyone is interested here are the steps:
>
> Take a pharo image (mine had FFI and VMMaker already loaded, I don't know if they were needed at all)
>
> In monticello add squeaksource.com/Balloon3D. Open it and load just this packages in order: Balloon3D-constants, Balloon3D-kernel, Balloon3D-math.
>
> Now add squeaksource.com/OpenGL and load it.
>
> That's all to load it, to try it, doit this code, and when you get errors change occurrences of Smalltalk to SmalltalkImage current.
>
>
> ogl := OpenGL newIn: (0@0 extent: 300@300).
> green := 1.
> canvas := OGLCanvas new initialize: ogl.
> fade:= 0.
>
>     1000 timesRepeat: [
>        ogl glClearColor:0 with: fade with: 0 with: 1.
>         ogl glClear: 16r4000.
>         ogl swapBuffers.
>        fade := fade + 0.001.
>     ].
>
> fade := 0.
>
>
> I think the best way would be to use AlienOpenGL, which is the future, but for that I'll have to wait alien support in linux.
>
> The alien code should "just work" on linux, but subtleties in alloca mean it crashes on e.g. Ubuntu.  But Ryan Macnak juts got the AlienFFI working in Newspeak on Ubuntu.
>
> I think what's happened is that recent Linux gcc versions increase the stack alignment to 16 bytes to support x86 sse2 instructions, where 16 byte alignment is required to avoid alignment violations using 128-bit transfers to/from the xmm registers.    So in platforms/Cross/plugins/ia32abicc.c where it states
>
> #if __APPLE__ && __MACH__ && __i386__
> # define STACK_ALIGN_BYTES 16
> #endif
>
> this should probably read
>
> #if ((__APPLE__ && __MACH__) || __linux__) && __i386__
> # define STACK_ALIGN_BYTES 16
> #endif
>
> Give it a go and you should find the AlienFFI will work on linux.
>
>
> Regards,
>           Javier.
>
> 2010/2/10 Fernando olivero <[hidden email]>
> Hola Javier,  on top of AlienOpenGL , which is just an interface to OpenGL, i've built a 3d framework with better abstractions called Lumiere. (http://www.inf.usi.ch/phd/olivero/LumierePage.html  (A little bit outdated...i've added a couple of more things recently..)
>  
> In this  paper that  we presented at the last ESUG/IWST 09 , with also did brief survey of OpenGL in smalltalk. (www.esug.org/data/ESUG2009/IWST/iwst09_submission_6.pd)
>
> If there's a plugin for AlienFFI for Linux i'm not sure. But have you tried the FFI binding of OGL of Croquet? That one works in Linux. Look in squeaksource, because i remember someone decoupled the OGL wrapper from Croquet and put it there.
>
> I dont know if June ( for visual works) works in linux, but you could take a look of it.
>
>
>
>
> Saludos,
> Fernando
>
>
> On Feb 10, 2010, at 3:01 AM, Javier Pimás wrote:
>
>> Hi, I've been browsing the different ways to use OpenGL in pharo and squeak. Here is a log of the results:
>>
>> 1 - Baloon3D - It looks like a layer on which squeaksource.com/OpenGL stands, so to use opengl you load balloon3d, then opengl and if you have the Balloon3dPlugin available then you can use OpenGL. This seems to include code dated from 2007/before. It loads fine in Squeak but in pharo I get many errors (load balloon3d-all in pharo1.0 rc2).
>>
>> 2 - GLMorphic - It uses FFI, so no plugin is needed, but it seems to be programmed only for windows, and I'm working in linux now.
>>
>> 3 - AlienOpenGL - It uses the new Alien FFI, which is only available in Mac platform.
>>
>> So, the question is: is there any way to play with OpenGL in pharo on linux platform ?
>>
>> Regards,
>>              Javier.
>>
>> --
>> Javier Pimás
>> Ciudad de Buenos Aires
>> <ATT00001..txt>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>
> --
> Javier Pimás
> Ciudad de Buenos Aires
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>
> --
> Javier Pimás
> Ciudad de Buenos Aires
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: OpenGL in pharo?

LawsonEnglish
In reply to this post by Stéphane Ducasse
Stéphane Ducasse wrote:

> On Feb 10, 2010, at 3:01 AM, Javier Pimás wrote:
>
>  
>> Hi, I've been browsing the different ways to use OpenGL in pharo and squeak. Here is a log of the results:
>>
>> 1 - Baloon3D - It looks like a layer on which squeaksource.com/OpenGL stands, so to use opengl you load balloon3d, then opengl and if you have the Balloon3dPlugin available then you can use OpenGL. This seems to include code dated from 2007/before. It loads fine in Squeak but in pharo I get many errors (load balloon3d-all in pharo1.0 rc2).
>>    
>
> Thanks Javier
> May be you should check the problem because I do not really see why this would be a real problem.
> Can you let us know what is the error?
>
>  
I'm having the same problem with Pharo 1.0 RC* and OpenGL. There doesn't
seem to be any way to get any of the existing solutions loaded. At one
point or another, everything I have tried, barfs.

(MacOS X Snow Leopard, so perhaps its that pesky path bug again)


Lawson

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: OpenGL in pharo?

Fernando olivero
In MacOSX,  this works  just fine.


config := Gofer new
url: 'http://www.squeaksource.com/AlienOpenGL'; 
package: 'ConfigurationOfAlienOpenGL';
config load.
(Smalltalk at: #ConfigurationOfAlienOpenGL) perform:#loadDefault  .

(Smalltalk at: #AlienOpenGLLibraryExamples) new perform:#testRenderingAndRotatingColoredCubes. 

Saludos,
Fernando


On Mar 19, 2010, at 6:38 PM, Lawson English wrote:

Stéphane Ducasse wrote:
On Feb 10, 2010, at 3:01 AM, Javier Pimás wrote:


Hi, I've been browsing the different ways to use OpenGL in pharo and squeak. Here is a log of the results:

1 - Baloon3D - It looks like a layer on which squeaksource.com/OpenGL stands, so to use opengl you load balloon3d, then opengl and if you have the Balloon3dPlugin available then you can use OpenGL. This seems to include code dated from 2007/before. It loads fine in Squeak but in pharo I get many errors (load balloon3d-all in pharo1.0 rc2).


Thanks Javier
May be you should check the problem because I do not really see why this would be a real problem.
Can you let us know what is the error?


I'm having the same problem with Pharo 1.0 RC* and OpenGL. There doesn't
seem to be any way to get any of the existing solutions loaded. At one
point or another, everything I have tried, barfs.

(MacOS X Snow Leopard, so perhaps its that pesky path bug again)


Lawson

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project