Better OpenGL texture with COpenGLPlayer

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

Better OpenGL texture with COpenGLPlayer

David Faught
There are two new packages on the Hedgehog PublicContribs repository.
There is also some related documentation on the Croquet Consortium
wiki at:
http://croquetconsortium.org/index.php/Procedural_Texturing

From the package comments:

Name: OpenGL-OpenGL-daf.1
Author: daf
Time: 13 June 2007, 6:50:23 pm
UUID: ad56d5f2-bd9c-0043-84cb-34642b6ad9a9
Ancestors: (this will have to be fixed someday)

Adds GLSL and FBO extension support.  Thanks to Tobias Germer for the GLSL code.

Name: Tweak-OpenGL-daf.2
Author: daf
Time: 13 June 2007, 7:02:11 pm
UUID: e83cdcde-3c97-fd44-9133-48dfd8853a3f
Ancestors:

COpenGLPlayer from Bert Freudenberg, ArrayOfStrings from Josh Gargus,
some rendering code from the NeHe tutorials, GLSL shader loading code
from Tobias Germer, and an example procedural texture from Jerzy
Karczmarczuk.

Requires the OpenGL-OpenGL package from the PublicContribs repository
to be installed first.

Install both packages, then in Squeak open a Tweak Project, enter it,
get a Workspace from the Tools menu, enter "MyOGLPlayer2 open" and
doIt.  Don't complain if your video card doesn't support GLSL shader
programs.
Reply | Threaded
Open this post in threaded view
|

Re: Better OpenGL texture with COpenGLPlayer

David Faught
These packages represent a large step towards what I envision for the
Procedural Textures project, but I'm not there yet!  Thanks to
everyone who contributed so far.

A few observations:
1.  It takes a long time to start up the OGL player with the GLSL
shaders, a couple of minutes on my machine.  I'm guessing that this is
because it's doing two C compiles, but it could be something else.  To
create a one-shot static texture, it's actually faster to run the
Squeak code example on the Procedural Texturing wiki page below.
2. This example doesn't really show the power of what is possible
because it just yields a static texture.  The fact is that the entire
texture is being recalculated for every frame.
3. I already put a newer version of the Tweak-OpenGL package on the
repository because I omitted the cleanup for the shaders - it would
only run once.

I like feedback, good or bad, so let me know your thoughts on this!

Dave

On 6/13/07, David Faught <[hidden email]> wrote:

> There are two new packages on the Hedgehog PublicContribs repository.
> There is also some related documentation on the Croquet Consortium
> wiki at:
> http://croquetconsortium.org/index.php/Procedural_Texturing
>
> From the package comments:
>
> Name: OpenGL-OpenGL-daf.1
> Author: daf
> Time: 13 June 2007, 6:50:23 pm
> UUID: ad56d5f2-bd9c-0043-84cb-34642b6ad9a9
> Ancestors: (this will have to be fixed someday)
>
> Adds GLSL and FBO extension support.  Thanks to Tobias Germer for the GLSL code.
>
> Name: Tweak-OpenGL-daf.2
> Author: daf
> Time: 13 June 2007, 7:02:11 pm
> UUID: e83cdcde-3c97-fd44-9133-48dfd8853a3f
> Ancestors:
>
> COpenGLPlayer from Bert Freudenberg, ArrayOfStrings from Josh Gargus,
> some rendering code from the NeHe tutorials, GLSL shader loading code
> from Tobias Germer, and an example procedural texture from Jerzy
> Karczmarczuk.
>
> Requires the OpenGL-OpenGL package from the PublicContribs repository
> to be installed first.
>
> Install both packages, then in Squeak open a Tweak Project, enter it,
> get a Workspace from the Tools menu, enter "MyOGLPlayer2 open" and
> doIt.  Don't complain if your video card doesn't support GLSL shader
> programs.
>
Reply | Threaded
Open this post in threaded view
|

Re: Re: Better OpenGL texture with COpenGLPlayer

Nikolay Suslov
Dear David, it is great!
And it is really means, that the first steps to future of GPGPU, or "General-Purpose Computation on GPUs" are done in Croquet project.
And we could imagine, that some day, to solve complex computational problems (crowds/user interactions, complex worlds, real world simulations etc.) we could use all power of the modern GPU's entirely in SmallTalk, as software and hardware are also ready for today, for example: NVIDIA CUDA (library for Linux/Windows) ( http://developer.nvidia.com/object/cuda.html) / G80 architecture and OpenGL 3.0 (http://www.theinquirer.net/default.aspx?article=39846 ).

Best regards,
Nikolay Suslov


On 6/14/07, David Faught <[hidden email]> wrote:
These packages represent a large step towards what I envision for the
Procedural Textures project, but I'm not there yet!  Thanks to
everyone who contributed so far.

A few observations:
1.  It takes a long time to start up the OGL player with the GLSL
shaders, a couple of minutes on my machine.  I'm guessing that this is
because it's doing two C compiles, but it could be something else.  To
create a one-shot static texture, it's actually faster to run the
Squeak code example on the Procedural Texturing wiki page below.
2. This example doesn't really show the power of what is possible
because it just yields a static texture.  The fact is that the entire
texture is being recalculated for every frame.
3. I already put a newer version of the Tweak-OpenGL package on the
repository because I omitted the cleanup for the shaders - it would
only run once.

I like feedback, good or bad, so let me know your thoughts on this!

Dave

On 6/13/07, David Faught <[hidden email]> wrote:

> There are two new packages on the Hedgehog PublicContribs repository.
> There is also some related documentation on the Croquet Consortium
> wiki at:
> http://croquetconsortium.org/index.php/Procedural_Texturing
>
> From the package comments:
>
> Name: OpenGL-OpenGL-daf.1
> Author: daf
> Time: 13 June 2007, 6:50:23 pm
> UUID: ad56d5f2-bd9c-0043-84cb-34642b6ad9a9
> Ancestors: (this will have to be fixed someday)
>
> Adds GLSL and FBO extension support.  Thanks to Tobias Germer for the GLSL code.
>
> Name: Tweak-OpenGL-daf.2
> Author: daf
> Time: 13 June 2007, 7:02:11 pm
> UUID: e83cdcde-3c97-fd44-9133-48dfd8853a3f
> Ancestors:
>
> COpenGLPlayer from Bert Freudenberg, ArrayOfStrings from Josh Gargus,
> some rendering code from the NeHe tutorials, GLSL shader loading code
> from Tobias Germer, and an example procedural texture from Jerzy
> Karczmarczuk.
>
> Requires the OpenGL-OpenGL package from the PublicContribs repository
> to be installed first.
>
> Install both packages, then in Squeak open a Tweak Project, enter it,
> get a Workspace from the Tools menu, enter "MyOGLPlayer2 open" and
> doIt.  Don't complain if your video card doesn't support GLSL shader
> programs.
>

Reply | Threaded
Open this post in threaded view
|

Re: Better OpenGL texture with COpenGLPlayer

David Faught
In reply to this post by David Faught
There is a newer version of the Tweak-OpenGL package that now passes a
scale parameter to the fragment(pixel) shader for each frame.  This is
a tiny step towards interfacing some Tweak UI widgets to the running
shaders.  This version shows the dynamics of using GPU shaders a
little better.

A couple more notes:
1. I couldn't get the error handling to work properly in Tweak,
although there is some now.
2. It would also be nice to someday figure out how to account for the
difference in screen offset between running this in a Tweak Project
and running it in a Tweak Project Window so that it wouldn't matter so
much if an error comes up in Squeak outside of Tweak.
3. When loading the OpenGL-OpenGL package, it is apparently necessary
to manually initialize OpenGL Extension Manager by invoking its
class-side #initialize method.  I thought that Monticello would do
this, but I guess not.

On 6/14/07, David Faught <[hidden email]> wrote:

> These packages represent a large step towards what I envision for the
> Procedural Textures project, but I'm not there yet!  Thanks to
> everyone who contributed so far.
>
> A few observations:
> 1.  It takes a long time to start up the OGL player with the GLSL
> shaders, a couple of minutes on my machine.  I'm guessing that this is
> because it's doing two C compiles, but it could be something else.  To
> create a one-shot static texture, it's actually faster to run the
> Squeak code example on the Procedural Texturing wiki page below.
> 2. This example doesn't really show the power of what is possible
> because it just yields a static texture.  The fact is that the entire
> texture is being recalculated for every frame.
> 3. I already put a newer version of the Tweak-OpenGL package on the
> repository because I omitted the cleanup for the shaders - it would
> only run once.
>
> I like feedback, good or bad, so let me know your thoughts on this!
>
> Dave
>
> On 6/13/07, David Faught <[hidden email]> wrote:
> > There are two new packages on the Hedgehog PublicContribs repository.
> > There is also some related documentation on the Croquet Consortium
> > wiki at:
> > http://croquetconsortium.org/index.php/Procedural_Texturing
> >
> > From the package comments:
> >
> > Name: OpenGL-OpenGL-daf.1
> > Author: daf
> > Time: 13 June 2007, 6:50:23 pm
> > UUID: ad56d5f2-bd9c-0043-84cb-34642b6ad9a9
> > Ancestors: (this will have to be fixed someday)
> >
> > Adds GLSL and FBO extension support.  Thanks to Tobias Germer for the GLSL code.
> >
> > Name: Tweak-OpenGL-daf.2
> > Author: daf
> > Time: 13 June 2007, 7:02:11 pm
> > UUID: e83cdcde-3c97-fd44-9133-48dfd8853a3f
> > Ancestors:
> >
> > COpenGLPlayer from Bert Freudenberg, ArrayOfStrings from Josh Gargus,
> > some rendering code from the NeHe tutorials, GLSL shader loading code
> > from Tobias Germer, and an example procedural texture from Jerzy
> > Karczmarczuk.
> >
> > Requires the OpenGL-OpenGL package from the PublicContribs repository
> > to be installed first.
> >
> > Install both packages, then in Squeak open a Tweak Project, enter it,
> > get a Workspace from the Tools menu, enter "MyOGLPlayer2 open" and
> > doIt.  Don't complain if your video card doesn't support GLSL shader
> > programs.
> >
>