Loading the OpenGL package (was: Games with Squeak)

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

Loading the OpenGL package (was: Games with Squeak)

Diego Fernández
On 10/13/06, Andreas Raab <[hidden email]> wrote:
> Edgar J. De Cleene wrote:
> > Andreas, as you see no package said " OpenGL" in the provided link.
>
> I think you should learn a little about using Squeaksource: "Versions"

Ouch! I missed the package too, because in www.squeaksource.com
usually there is one MC package per "Project".

Anyway, I'm trying to load OpenGL-ar.36.mcz in Squeak 3.9 but I get:
Syntax Error:
glBindBufferARB(target, buffer)
        "This method was generated by OGLExtManager"
        <Argument expected ->apicall: void 'glBindBufferARB' (long ulong)>

Any clue on how to solve this error? (It looks that it's created with
a "special" compiler)

And another question...
As I wrote in the previous mail I've started to do some SDL bindings.
But I think that maybe it's a waste of time, since today nearly all
machines have OpenGL, and Squeak already has objects to deal with
sound and joysticks.... so instead of using SDL for 2D graphics is
better to use OpenGL for the same thing, what do yo thing about that?

Cheers,
Diego

Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Andreas.Raab
Diego Fernandez wrote:
> Anyway, I'm trying to load OpenGL-ar.36.mcz in Squeak 3.9 but I get:
> Syntax Error:
> glBindBufferARB(target, buffer)
>     "This method was generated by OGLExtManager"
>     <Argument expected ->apicall: void 'glBindBufferARB' (long ulong)>
>
> Any clue on how to solve this error? (It looks that it's created with
> a "special" compiler)

Install the FFI from SqueakMap.

> And another question...
> As I wrote in the previous mail I've started to do some SDL bindings.
> But I think that maybe it's a waste of time, since today nearly all
> machines have OpenGL, and Squeak already has objects to deal with
> sound and joysticks.... so instead of using SDL for 2D graphics is
> better to use OpenGL for the same thing, what do yo thing about that?

Don't know. Depends on what you're doing and where you are going. SDL
might be just fine for what you need to do. That said, OpenGL offers a
lot of value in the long term.

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Howard Stearns
To explore OpenGL, be advised:

"Be sure that your graphics card is OpenGL 1.3 or higher compliant  
AND that you have appropriate OpenGL hardware drivers installed.  
Windows users should be aware that upgrading your DirectX versions  
through Microsoft's web site often overwrites existing hardware  
OpenGL drivers with software OpenGL->DirectX wrappers (killing  
performance, if not compatibility). The fix is to re-install the  
video card manufacturer's drivers after any DirectX install procedure."

The above is from the Croquet downloads page. There has been  
discussion of driver issues on the Croquet mailing lists and wikis...

On Oct 13, 2006, at 5:55 PM, Andreas Raab wrote:

> Diego Fernandez wrote:
>> Anyway, I'm trying to load OpenGL-ar.36.mcz in Squeak 3.9 but I get:
>> Syntax Error:
>> glBindBufferARB(target, buffer)
>>     "This method was generated by OGLExtManager"
>>     <Argument expected ->apicall: void 'glBindBufferARB' (long  
>> ulong)>
>> Any clue on how to solve this error? (It looks that it's created with
>> a "special" compiler)
>
> Install the FFI from SqueakMap.
>
>> And another question...
>> As I wrote in the previous mail I've started to do some SDL bindings.
>> But I think that maybe it's a waste of time, since today nearly all
>> machines have OpenGL, and Squeak already has objects to deal with
>> sound and joysticks.... so instead of using SDL for 2D graphics is
>> better to use OpenGL for the same thing, what do yo thing about that?
>
> Don't know. Depends on what you're doing and where you are going.  
> SDL might be just fine for what you need to do. That said, OpenGL  
> offers a lot of value in the long term.
>
> Cheers,
>   - Andreas
>


Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Bert Freudenberg
In reply to this post by Andreas.Raab

Am 14.10.2006 um 00:55 schrieb Andreas Raab:

> Diego Fernandez wrote:
>> Anyway, I'm trying to load OpenGL-ar.36.mcz in Squeak 3.9 but I get:
>> Syntax Error:
>> glBindBufferARB(target, buffer)
>>     "This method was generated by OGLExtManager"
>>     <Argument expected ->apicall: void 'glBindBufferARB' (long  
>> ulong)>
>> Any clue on how to solve this error? (It looks that it's created with
>> a "special" compiler)
>
> Install the FFI from SqueakMap.

Ah, no, that's the positional arg syntax extension ... it lets you  
write a Smalltalk method named "glBindBufferARB(target, buffer)",  
which becomes the symbol #'glBindBufferARB()/2'.

Each of these methods is installed twice, the other in this case is  
#glBindBufferARB:with:.

Hmm, might be easier to download croquet, delete these methods, and  
fileout the rest.

- Bert -




Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Bert Freudenberg
In reply to this post by Diego Fernández
Am 14.10.2006 um 00:40 schrieb Diego Fernandez:

> On 10/13/06, Andreas Raab <[hidden email]> wrote:
>> Edgar J. De Cleene wrote:
>> > Andreas, as you see no package said " OpenGL" in the provided link.
>>
>> I think you should learn a little about using Squeaksource:  
>> "Versions"
>
> Ouch! I missed the package too, because in www.squeaksource.com
> usually there is one MC package per "Project".

But there is a nice search feature:

Under projects, type "opengl", it finds the "hedgehog" project, in  
there go to "versions", it lists those matching "opengl" :)

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Alexander Lazarevic'
In reply to this post by Bert Freudenberg
Hi,

When I played with OpenGL in Squeak (3.7) I used

http://www.lazarevic.de/download/squeak/PositionalArgs37.2.cs

to load in a vanilla 3.7 image to be able to load the OpenGLApi
afterwards. I don't know how much has changed in 3.9, but it may be
worth a try to load this into a 3.9 image and get the current OpenGL Api
from CroquetSource after that?

Regards,
   Alex

Bert Freudenberg schrieb:

>
> Am 14.10.2006 um 00:55 schrieb Andreas Raab:
>
>> Diego Fernandez wrote:
>>> Anyway, I'm trying to load OpenGL-ar.36.mcz in Squeak 3.9 but I get:
>>> Syntax Error:
>>> glBindBufferARB(target, buffer)
>>>     "This method was generated by OGLExtManager"
>>>     <Argument expected ->apicall: void 'glBindBufferARB' (long ulong)>
>>> Any clue on how to solve this error? (It looks that it's created with
>>> a "special" compiler)
>>
>> Install the FFI from SqueakMap.
>
> Ah, no, that's the positional arg syntax extension ... it lets you write
> a Smalltalk method named "glBindBufferARB(target, buffer)", which
> becomes the symbol #'glBindBufferARB()/2'.
>
> Each of these methods is installed twice, the other in this case is
> #glBindBufferARB:with:.
>
> Hmm, might be easier to download croquet, delete these methods, and
> fileout the rest.
>
> - Bert -
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Alexander Lazarevic'
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I even found a short description I once wrote at that time about
PositionalArgs and the OpenGLApi.

http://www.lazarevic.de/PositionalArgs.html

Regards,
        Alex

PS: Again, this was all for 3.7.
PPS: It seems that only FireFox displays all of the Unicode characters
(check, etc.) in the right way.

Alexander Lazarević schrieb:

> Hi,
>
> When I played with OpenGL in Squeak (3.7) I used
>
> http://www.lazarevic.de/download/squeak/PositionalArgs37.2.cs
>
> to load in a vanilla 3.7 image to be able to load the OpenGLApi
> afterwards. I don't know how much has changed in 3.9, but it may be
> worth a try to load this into a 3.9 image and get the current OpenGL Api
> from CroquetSource after that?
>
> Regards,
>    Alex
>
> Bert Freudenberg schrieb:
>> Am 14.10.2006 um 00:55 schrieb Andreas Raab:
>>
>>> Diego Fernandez wrote:
>>>> Anyway, I'm trying to load OpenGL-ar.36.mcz in Squeak 3.9 but I get:
>>>> Syntax Error:
>>>> glBindBufferARB(target, buffer)
>>>>     "This method was generated by OGLExtManager"
>>>>     <Argument expected ->apicall: void 'glBindBufferARB' (long ulong)>
>>>> Any clue on how to solve this error? (It looks that it's created with
>>>> a "special" compiler)
>>> Install the FFI from SqueakMap.
>> Ah, no, that's the positional arg syntax extension ... it lets you write
>> a Smalltalk method named "glBindBufferARB(target, buffer)", which
>> becomes the symbol #'glBindBufferARB()/2'.
>>
>> Each of these methods is installed twice, the other in this case is
>> #glBindBufferARB:with:.
>>
>> Hmm, might be easier to download croquet, delete these methods, and
>> fileout the rest.
>>
>> - Bert -
>>
>>
>>
>>
>
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFS2g+YiF2wSTEZ9gRAsgWAJ9tnUR7o/ptiZDugUzhf2i/yrVJvQCdF6dc
br4lSJ4+U3ko/TXyxfh32lM=
=GBur
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Diego Fernández
Thanks!! :)
I will try to make a Squeak 3.9 compatible version, from the one found
in Croquet.

On 11/3/06, Alexander Lazarević <[hidden email]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I even found a short description I once wrote at that time about
> PositionalArgs and the OpenGLApi.
>
> http://www.lazarevic.de/PositionalArgs.html
>
> Regards,
>         Alex
>
> PS: Again, this was all for 3.7.
> PPS: It seems that only FireFox displays all of the Unicode characters
> (check, etc.) in the right way.
>
> Alexander Lazarević schrieb:
> > Hi,
> >
> > When I played with OpenGL in Squeak (3.7) I used
> >
> > http://www.lazarevic.de/download/squeak/PositionalArgs37.2.cs
> >
> > to load in a vanilla 3.7 image to be able to load the OpenGLApi
> > afterwards. I don't know how much has changed in 3.9, but it may be
> > worth a try to load this into a 3.9 image and get the current OpenGL Api
> > from CroquetSource after that?
> >
> > Regards,
> >    Alex
> >
> > Bert Freudenberg schrieb:
> >> Am 14.10.2006 um 00:55 schrieb Andreas Raab:
> >>
> >>> Diego Fernandez wrote:
> >>>> Anyway, I'm trying to load OpenGL-ar.36.mcz in Squeak 3.9 but I get:
> >>>> Syntax Error:
> >>>> glBindBufferARB(target, buffer)
> >>>>     "This method was generated by OGLExtManager"
> >>>>     <Argument expected ->apicall: void 'glBindBufferARB' (long ulong)>
> >>>> Any clue on how to solve this error? (It looks that it's created with
> >>>> a "special" compiler)
> >>> Install the FFI from SqueakMap.
> >> Ah, no, that's the positional arg syntax extension ... it lets you write
> >> a Smalltalk method named "glBindBufferARB(target, buffer)", which
> >> becomes the symbol #'glBindBufferARB()/2'.
> >>
> >> Each of these methods is installed twice, the other in this case is
> >> #glBindBufferARB:with:.
> >>
> >> Hmm, might be easier to download croquet, delete these methods, and
> >> fileout the rest.
> >>
> >> - Bert -
> >>
> >>
> >>
> >>
> >
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFS2g+YiF2wSTEZ9gRAsgWAJ9tnUR7o/ptiZDugUzhf2i/yrVJvQCdF6dc
> br4lSJ4+U3ko/TXyxfh32lM=
> =GBur
> -----END PGP SIGNATURE-----
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Mikael Kindborg-2
Ok, that is great!
Micke

On 11/6/06, Diego Fernandez <[hidden email]> wrote:

> Thanks!! :)
> I will try to make a Squeak 3.9 compatible version, from the one found
> in Croquet.
>
> On 11/3/06, Alexander Lazarević <[hidden email]> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > I even found a short description I once wrote at that time about
> > PositionalArgs and the OpenGLApi.
> >
> > http://www.lazarevic.de/PositionalArgs.html
> >
> > Regards,
> >         Alex
> >
> > PS: Again, this was all for 3.7.
> > PPS: It seems that only FireFox displays all of the Unicode characters
> > (check, etc.) in the right way.
> >
> > Alexander Lazarević schrieb:
> > > Hi,
> > >
> > > When I played with OpenGL in Squeak (3.7) I used
> > >
> > > http://www.lazarevic.de/download/squeak/PositionalArgs37.2.cs
> > >
> > > to load in a vanilla 3.7 image to be able to load the OpenGLApi
> > > afterwards. I don't know how much has changed in 3.9, but it may be
> > > worth a try to load this into a 3.9 image and get the current OpenGL Api
> > > from CroquetSource after that?
> > >
> > > Regards,
> > >    Alex
> > >
> > > Bert Freudenberg schrieb:
> > >> Am 14.10.2006 um 00:55 schrieb Andreas Raab:
> > >>
> > >>> Diego Fernandez wrote:
> > >>>> Anyway, I'm trying to load OpenGL-ar.36.mcz in Squeak 3.9 but I get:
> > >>>> Syntax Error:
> > >>>> glBindBufferARB(target, buffer)
> > >>>>     "This method was generated by OGLExtManager"
> > >>>>     <Argument expected ->apicall: void 'glBindBufferARB' (long ulong)>
> > >>>> Any clue on how to solve this error? (It looks that it's created with
> > >>>> a "special" compiler)
> > >>> Install the FFI from SqueakMap.
> > >> Ah, no, that's the positional arg syntax extension ... it lets you write
> > >> a Smalltalk method named "glBindBufferARB(target, buffer)", which
> > >> becomes the symbol #'glBindBufferARB()/2'.
> > >>
> > >> Each of these methods is installed twice, the other in this case is
> > >> #glBindBufferARB:with:.
> > >>
> > >> Hmm, might be easier to download croquet, delete these methods, and
> > >> fileout the rest.
> > >>
> > >> - Bert -
> > >>
> > >>
> > >>
> > >>
> > >
> > -----BEGIN PGP SIGNATURE-----
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iD8DBQFFS2g+YiF2wSTEZ9gRAsgWAJ9tnUR7o/ptiZDugUzhf2i/yrVJvQCdF6dc
> > br4lSJ4+U3ko/TXyxfh32lM=
> > =GBur
> > -----END PGP SIGNATURE-----
> >
> >
>
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Jakub Kozisek
In reply to this post by Diego Fernández
Hello,

I took old PositionalArgs, did minimal changes and installed it into 3.9 image. After applying this changes and loading FFI package, OpenGL package loads without any problems (hope it will be working too :).

Now there is another thing needed to be done - going through the code and update it (like "Smalltalk platformName" in OpenGL class>>new, and so on).

If anybody have time to clean it, feel free to be my hero :), if not, I will try to do my best although it will take me longer.

Bye!

Jakub
PositionalArgs39.1.cs
Diego Fernandez wrote
Thanks!! :)
I will try to make a Squeak 3.9 compatible version, from the one found
in Croquet.

On 11/3/06, Alexander Lazarević <Alexander@lazarevic.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I even found a short description I once wrote at that time about
> PositionalArgs and the OpenGLApi.
>
> http://www.lazarevic.de/PositionalArgs.html
>
> Regards,
>         Alex
>
> PS: Again, this was all for 3.7.
> PPS: It seems that only FireFox displays all of the Unicode characters
> (check, etc.) in the right way.
>
> Alexander Lazarević schrieb:
> > Hi,
> >
> > When I played with OpenGL in Squeak (3.7) I used
> >
> > http://www.lazarevic.de/download/squeak/PositionalArgs37.2.cs
> >
> > to load in a vanilla 3.7 image to be able to load the OpenGLApi
> > afterwards. I don't know how much has changed in 3.9, but it may be
> > worth a try to load this into a 3.9 image and get the current OpenGL Api
> > from CroquetSource after that?
> >
> > Regards,
> >    Alex
> >
> > Bert Freudenberg schrieb:
> >> Am 14.10.2006 um 00:55 schrieb Andreas Raab:
> >>
> >>> Diego Fernandez wrote:
> >>>> Anyway, I'm trying to load OpenGL-ar.36.mcz in Squeak 3.9 but I get:
> >>>> Syntax Error:
> >>>> glBindBufferARB(target, buffer)
> >>>>     "This method was generated by OGLExtManager"
> >>>>     <Argument expected ->apicall: void 'glBindBufferARB' (long ulong)>
> >>>> Any clue on how to solve this error? (It looks that it's created with
> >>>> a "special" compiler)
> >>> Install the FFI from SqueakMap.
> >> Ah, no, that's the positional arg syntax extension ... it lets you write
> >> a Smalltalk method named "glBindBufferARB(target, buffer)", which
> >> becomes the symbol #'glBindBufferARB()/2'.
> >>
> >> Each of these methods is installed twice, the other in this case is
> >> #glBindBufferARB:with:.
> >>
> >> Hmm, might be easier to download croquet, delete these methods, and
> >> fileout the rest.
> >>
> >> - Bert -
> >>
> >>
> >>
> >>
> >
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFS2g+YiF2wSTEZ9gRAsgWAJ9tnUR7o/ptiZDugUzhf2i/yrVJvQCdF6dc
> br4lSJ4+U3ko/TXyxfh32lM=
> =GBur
> -----END PGP SIGNATURE-----
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Mikael Kindborg-2
Sounds promising! Will try to take some time to look at it.

I have been thinking about the respective advantages of OpenGL and SDL
for game programming, and I am not at all clear about this. I feel
comfortable with the sprite-oriented bitmapped graphics approach of
SDL, but I have also realised that it can be a big advantage to use
vector graphics also for more traditional 2D games and drawing tools.
Then again, you can use OpenGL with SDL if needed.

If one would use OpenGL for bitmapped 2D-sprites, what would be the
best/fastest approach? Using glDrawPixels was not very fast when I
tested it, because of pixel conversions I guess. Are textures faster?
Will have to learn more about this.

Best, Micke

On 11/14/06, Jakub Kozisek <[hidden email]> wrote:

>
> Hello,
>
> I took old PositionalArgs, did minimal changes and installed it into 3.9
> image. After applying this changes and loading FFI package, OpenGL package
> loads without any problems (hope it will be working too :).
>
> Now there is another thing needed to be done - going through the code and
> update it (like "Smalltalk platformName" in OpenGL class>>new, and so on).
>
> If anybody have time to clean it, feel free to be my hero :), if not, I will
> try to do my best although it will take me longer.
>
> Bye!
>
> Jakub
> http://www.nabble.com/file/4145/PositionalArgs39.1.cs PositionalArgs39.1.cs
>
> Diego Fernandez wrote:
> >
> > Thanks!! :)
> > I will try to make a Squeak 3.9 compatible version, from the one found
> > in Croquet.
> >
> > On 11/3/06, Alexander Lazarević <[hidden email]> wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> I even found a short description I once wrote at that time about
> >> PositionalArgs and the OpenGLApi.
> >>
> >> http://www.lazarevic.de/PositionalArgs.html
> >>
> >> Regards,
> >>         Alex
> >>
> >> PS: Again, this was all for 3.7.
> >> PPS: It seems that only FireFox displays all of the Unicode characters
> >> (check, etc.) in the right way.
> >>
> >> Alexander Lazarević schrieb:
> >> > Hi,
> >> >
> >> > When I played with OpenGL in Squeak (3.7) I used
> >> >
> >> > http://www.lazarevic.de/download/squeak/PositionalArgs37.2.cs
> >> >
> >> > to load in a vanilla 3.7 image to be able to load the OpenGLApi
> >> > afterwards. I don't know how much has changed in 3.9, but it may be
> >> > worth a try to load this into a 3.9 image and get the current OpenGL
> >> Api
> >> > from CroquetSource after that?
> >> >
> >> > Regards,
> >> >    Alex
> >> >
> >> > Bert Freudenberg schrieb:
> >> >> Am 14.10.2006 um 00:55 schrieb Andreas Raab:
> >> >>
> >> >>> Diego Fernandez wrote:
> >> >>>> Anyway, I'm trying to load OpenGL-ar.36.mcz in Squeak 3.9 but I get:
> >> >>>> Syntax Error:
> >> >>>> glBindBufferARB(target, buffer)
> >> >>>>     "This method was generated by OGLExtManager"
> >> >>>>     <Argument expected ->apicall: void 'glBindBufferARB' (long
> >> ulong)>
> >> >>>> Any clue on how to solve this error? (It looks that it's created
> >> with
> >> >>>> a "special" compiler)
> >> >>> Install the FFI from SqueakMap.
> >> >> Ah, no, that's the positional arg syntax extension ... it lets you
> >> write
> >> >> a Smalltalk method named "glBindBufferARB(target, buffer)", which
> >> >> becomes the symbol #'glBindBufferARB()/2'.
> >> >>
> >> >> Each of these methods is installed twice, the other in this case is
> >> >> #glBindBufferARB:with:.
> >> >>
> >> >> Hmm, might be easier to download croquet, delete these methods, and
> >> >> fileout the rest.
> >> >>
> >> >> - Bert -
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >> -----BEGIN PGP SIGNATURE-----
> >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >>
> >> iD8DBQFFS2g+YiF2wSTEZ9gRAsgWAJ9tnUR7o/ptiZDugUzhf2i/yrVJvQCdF6dc
> >> br4lSJ4+U3ko/TXyxfh32lM=
> >> =GBur
> >> -----END PGP SIGNATURE-----
> >>
> >>
> >
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Loading-the-OpenGL-package-%28was%3A-Games-with-Squeak%29-tf2440372.html#a7328706
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Joshua Gargus-2

On Nov 14, 2006, at 1:49 PM, Mikael Kindborg wrote:

> Sounds promising! Will try to take some time to look at it.
>
> I have been thinking about the respective advantages of OpenGL and SDL
> for game programming, and I am not at all clear about this. I feel
> comfortable with the sprite-oriented bitmapped graphics approach of
> SDL, but I have also realised that it can be a big advantage to use
> vector graphics also for more traditional 2D games and drawing tools.
> Then again, you can use OpenGL with SDL if needed.
>
> If one would use OpenGL for bitmapped 2D-sprites, what would be the
> best/fastest approach? Using glDrawPixels was not very fast when I
> tested it, because of pixel conversions I guess.

Not just because of that.  You still have to upload all of the pixels  
to the graphics card, each frame.  Also, how would you scale/resize  
your sprite?  AFAIK, common OpenGL implementations do not support  
such operations (I found a Google link to an HP-extension that  
supports scaling/resizing), so you would need to do this on the CPU.

> Are textures faster?
> Will have to learn more about this.

Texture-mapped quads are the way to go.

Josh

>
> Best, Micke
>
> On 11/14/06, Jakub Kozisek <[hidden email]> wrote:
>>
>> Hello,
>>
>> I took old PositionalArgs, did minimal changes and installed it  
>> into 3.9
>> image. After applying this changes and loading FFI package, OpenGL  
>> package
>> loads without any problems (hope it will be working too :).
>>
>> Now there is another thing needed to be done - going through the  
>> code and
>> update it (like "Smalltalk platformName" in OpenGL class>>new, and  
>> so on).
>>
>> If anybody have time to clean it, feel free to be my hero :), if  
>> not, I will
>> try to do my best although it will take me longer.
>>
>> Bye!
>>
>> Jakub
>> http://www.nabble.com/file/4145/PositionalArgs39.1.cs 
>> PositionalArgs39.1.cs
>>
>> Diego Fernandez wrote:
>> >
>> > Thanks!! :)
>> > I will try to make a Squeak 3.9 compatible version, from the one  
>> found
>> > in Croquet.
>> >
>> > On 11/3/06, Alexander Lazarević <[hidden email]> wrote:
>> >> -----BEGIN PGP SIGNED MESSAGE-----
>> >> Hash: SHA1
>> >>
>> >> I even found a short description I once wrote at that time about
>> >> PositionalArgs and the OpenGLApi.
>> >>
>> >> http://www.lazarevic.de/PositionalArgs.html
>> >>
>> >> Regards,
>> >>         Alex
>> >>
>> >> PS: Again, this was all for 3.7.
>> >> PPS: It seems that only FireFox displays all of the Unicode  
>> characters
>> >> (check, etc.) in the right way.
>> >>
>> >> Alexander Lazarević schrieb:
>> >> > Hi,
>> >> >
>> >> > When I played with OpenGL in Squeak (3.7) I used
>> >> >
>> >> > http://www.lazarevic.de/download/squeak/PositionalArgs37.2.cs
>> >> >
>> >> > to load in a vanilla 3.7 image to be able to load the OpenGLApi
>> >> > afterwards. I don't know how much has changed in 3.9, but it  
>> may be
>> >> > worth a try to load this into a 3.9 image and get the current  
>> OpenGL
>> >> Api
>> >> > from CroquetSource after that?
>> >> >
>> >> > Regards,
>> >> >    Alex
>> >> >
>> >> > Bert Freudenberg schrieb:
>> >> >> Am 14.10.2006 um 00:55 schrieb Andreas Raab:
>> >> >>
>> >> >>> Diego Fernandez wrote:
>> >> >>>> Anyway, I'm trying to load OpenGL-ar.36.mcz in Squeak 3.9  
>> but I get:
>> >> >>>> Syntax Error:
>> >> >>>> glBindBufferARB(target, buffer)
>> >> >>>>     "This method was generated by OGLExtManager"
>> >> >>>>     <Argument expected ->apicall: void  
>> 'glBindBufferARB' (long
>> >> ulong)>
>> >> >>>> Any clue on how to solve this error? (It looks that it's  
>> created
>> >> with
>> >> >>>> a "special" compiler)
>> >> >>> Install the FFI from SqueakMap.
>> >> >> Ah, no, that's the positional arg syntax extension ... it  
>> lets you
>> >> write
>> >> >> a Smalltalk method named "glBindBufferARB(target, buffer)",  
>> which
>> >> >> becomes the symbol #'glBindBufferARB()/2'.
>> >> >>
>> >> >> Each of these methods is installed twice, the other in this  
>> case is
>> >> >> #glBindBufferARB:with:.
>> >> >>
>> >> >> Hmm, might be easier to download croquet, delete these  
>> methods, and
>> >> >> fileout the rest.
>> >> >>
>> >> >> - Bert -
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> -----BEGIN PGP SIGNATURE-----
>> >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>> >>
>> >> iD8DBQFFS2g+YiF2wSTEZ9gRAsgWAJ9tnUR7o/ptiZDugUzhf2i/yrVJvQCdF6dc
>> >> br4lSJ4+U3ko/TXyxfh32lM=
>> >> =GBur
>> >> -----END PGP SIGNATURE-----
>> >>
>> >>
>> >
>> >
>> >
>> >
>>
>> --
>> View this message in context: http://www.nabble.com/Loading-the- 
>> OpenGL-package-%28was%3A-Games-with-Squeak%29-tf2440372.html#a7328706
>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Jakub Kozisek
In reply to this post by Mikael Kindborg-2
Hello,

I'm having look at it now ... :)

First incompatibilities were found in already mentioned OpenGL class>>new - fix was easy:

1) replaced "Smalltalk platformName" with "SmalltalkImage current platformName"

2) replaced non-existing "Smalltalk windowSystemName" with "SmalltalkImage current getSystemAttribute: 1005"
   - in 3.9 the windowSystemName is missing .. I'm not deep into it, so I replaced it with implementation in old images
   - don't want to add anything into SmalltalkImage (or SystemDictionary - that was previous location) unless I get fluent :)

Then I loaded OpenGLMorph from Alexander Lazarevic's changeset - look into http://www.lazarevic.de/PositionalArgs.html .. thanks Alex :)

Now I want to get the morph running in accelerated mode and then put everything into another changeset and do some testing by doing a project.

Sorry for not answering your speed-related question, I haven't any speed testing yet.

Kind regards,

Jakub

Mikael Kindborg-2 wrote
Sounds promising! Will try to take some time to look at it.

I have been thinking about the respective advantages of OpenGL and SDL
for game programming, and I am not at all clear about this. I feel
comfortable with the sprite-oriented bitmapped graphics approach of
SDL, but I have also realised that it can be a big advantage to use
vector graphics also for more traditional 2D games and drawing tools.
Then again, you can use OpenGL with SDL if needed.

If one would use OpenGL for bitmapped 2D-sprites, what would be the
best/fastest approach? Using glDrawPixels was not very fast when I
tested it, because of pixel conversions I guess. Are textures faster?
Will have to learn more about this.

Best, Micke

On 11/14/06, Jakub Kozisek <jakub.kozisek@gmail.com> wrote:
>
> Hello,
>
> I took old PositionalArgs, did minimal changes and installed it into 3.9
> image. After applying this changes and loading FFI package, OpenGL package
> loads without any problems (hope it will be working too :).
>
> Now there is another thing needed to be done - going through the code and
> update it (like "Smalltalk platformName" in OpenGL class>>new, and so on).
>
> If anybody have time to clean it, feel free to be my hero :), if not, I will
> try to do my best although it will take me longer.
>
> Bye!
>
> Jakub
> http://www.nabble.com/file/4145/PositionalArgs39.1.cs PositionalArgs39.1.cs
>
> Diego Fernandez wrote:
> >
> > Thanks!! :)
> > I will try to make a Squeak 3.9 compatible version, from the one found
> > in Croquet.
> >
> > On 11/3/06, Alexander Lazarević <Alexander@lazarevic.de> wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> I even found a short description I once wrote at that time about
> >> PositionalArgs and the OpenGLApi.
> >>
> >> http://www.lazarevic.de/PositionalArgs.html
> >>
> >> Regards,
> >>         Alex
> >>
> >> PS: Again, this was all for 3.7.
> >> PPS: It seems that only FireFox displays all of the Unicode characters
> >> (check, etc.) in the right way.
> >>
> >> Alexander Lazarević schrieb:
> >> > Hi,
> >> >
> >> > When I played with OpenGL in Squeak (3.7) I used
> >> >
> >> > http://www.lazarevic.de/download/squeak/PositionalArgs37.2.cs
> >> >
> >> > to load in a vanilla 3.7 image to be able to load the OpenGLApi
> >> > afterwards. I don't know how much has changed in 3.9, but it may be
> >> > worth a try to load this into a 3.9 image and get the current OpenGL
> >> Api
> >> > from CroquetSource after that?
> >> >
> >> > Regards,
> >> >    Alex
> >> >
> >> > Bert Freudenberg schrieb:
> >> >> Am 14.10.2006 um 00:55 schrieb Andreas Raab:
> >> >>
> >> >>> Diego Fernandez wrote:
> >> >>>> Anyway, I'm trying to load OpenGL-ar.36.mcz in Squeak 3.9 but I get:
> >> >>>> Syntax Error:
> >> >>>> glBindBufferARB(target, buffer)
> >> >>>>     "This method was generated by OGLExtManager"
> >> >>>>     <Argument expected ->apicall: void 'glBindBufferARB' (long
> >> ulong)>
> >> >>>> Any clue on how to solve this error? (It looks that it's created
> >> with
> >> >>>> a "special" compiler)
> >> >>> Install the FFI from SqueakMap.
> >> >> Ah, no, that's the positional arg syntax extension ... it lets you
> >> write
> >> >> a Smalltalk method named "glBindBufferARB(target, buffer)", which
> >> >> becomes the symbol #'glBindBufferARB()/2'.
> >> >>
> >> >> Each of these methods is installed twice, the other in this case is
> >> >> #glBindBufferARB:with:.
> >> >>
> >> >> Hmm, might be easier to download croquet, delete these methods, and
> >> >> fileout the rest.
> >> >>
> >> >> - Bert -
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >> -----BEGIN PGP SIGNATURE-----
> >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >>
> >> iD8DBQFFS2g+YiF2wSTEZ9gRAsgWAJ9tnUR7o/ptiZDugUzhf2i/yrVJvQCdF6dc
> >> br4lSJ4+U3ko/TXyxfh32lM=
> >> =GBur
> >> -----END PGP SIGNATURE-----
> >>
> >>
> >
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Loading-the-OpenGL-package-%28was%3A-Games-with-Squeak%29-tf2440372.html#a7328706
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Mikael Kindborg-2
In reply to this post by Joshua Gargus-2
On 11/14/06, Joshua Gargus <[hidden email]> wrote:

>
> On Nov 14, 2006, at 1:49 PM, Mikael Kindborg wrote:
> > If one would use OpenGL for bitmapped 2D-sprites, what would be the
> > best/fastest approach? Using glDrawPixels was not very fast when I
> > tested it, because of pixel conversions I guess.
>
> Not just because of that.  You still have to upload all of the pixels
> to the graphics card, each frame.  Also, how would you scale/resize
> your sprite?  AFAIK, common OpenGL implementations do not support
> such operations (I found a Google link to an HP-extension that
> supports scaling/resizing), so you would need to do this on the CPU.
>

I see, thanks.

> > Are textures faster?
> > Will have to learn more about this.
>
> Texture-mapped quads are the way to go.
>

Looked at glTexImage2D and the documentation says that width and
height must be powers of two, which is not very nice for sprites.
However, I saw that in OpenGL 2.1 "Non-Power-Of-Two Textures" are
introduced as a standard:
http://www.opengl.org/documentation/current_version/

Regards, Micke

Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Joshua Gargus-2

On Nov 14, 2006, at 2:40 PM, Mikael Kindborg wrote:

> On 11/14/06, Joshua Gargus <[hidden email]> wrote:
>
>> > Are textures faster?
>> > Will have to learn more about this.
>>
>> Texture-mapped quads are the way to go.
>>
>
> Looked at glTexImage2D and the documentation says that width and
> height must be powers of two, which is not very nice for sprites.
> However, I saw that in OpenGL 2.1 "Non-Power-Of-Two Textures" are
> introduced as a standard:
> http://www.opengl.org/documentation/current_version/
>

If you are willing to waste some memory, you can always set up your  
texture coordinates to only include the region of the power-of-two  
texture that has sprite data.  Or, as you say, use NPOT textures.  
Although they're only now becoming part of the standard, they are  
usable via extensions of a wide range of hardware.

Josh

> Regards, Micke
>


Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Bert Freudenberg
In reply to this post by Mikael Kindborg-2
On Nov 14, 2006, at 23:40 , Mikael Kindborg wrote:

>> > Are textures faster?
>> > Will have to learn more about this.
>>
>> Texture-mapped quads are the way to go.
>>
>
> Looked at glTexImage2D and the documentation says that width and
> height must be powers of two, which is not very nice for sprites.

Well, it's what the hardware supports efficiently - OpenGL is a very  
low-level API. You will have to manage this yourself. Like, write a  
sprite manager that packs many sprites into one large texture.

> However, I saw that in OpenGL 2.1 "Non-Power-Of-Two Textures" are
> introduced as a standard:
> http://www.opengl.org/documentation/current_version/

... which will take years until it is generally supported. And it  
won't work on older boards at all.

All in all I'd prefer SDL for 2D games.

- Bert -




Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Mikael Kindborg-2
In reply to this post by Joshua Gargus-2
On 11/14/06, Joshua Gargus <[hidden email]> wrote:

>
> On Nov 14, 2006, at 2:40 PM, Mikael Kindborg wrote:
>
> > On 11/14/06, Joshua Gargus <[hidden email]> wrote:
> >
> >> > Are textures faster?
> >> > Will have to learn more about this.
> >>
> >> Texture-mapped quads are the way to go.
> >>
> >
> > Looked at glTexImage2D and the documentation says that width and
> > height must be powers of two, which is not very nice for sprites.
> > However, I saw that in OpenGL 2.1 "Non-Power-Of-Two Textures" are
> > introduced as a standard:
> > http://www.opengl.org/documentation/current_version/
> >
>
> If you are willing to waste some memory, you can always set up your
> texture coordinates to only include the region of the power-of-two
> texture that has sprite data.  Or, as you say, use NPOT textures.
> Although they're only now becoming part of the standard, they are
> usable via extensions of a wide range of hardware.
>
> Josh
>

Thanks for this info Josh. While I feel more comfortable with SDL sprites,
I should look into OpenGL. Squeak already has much of the basic
functionality that SDL offers (input, etc), and OpenGL seems to be
a very capable option for 2D sprite-based games. Not an easy decision
however. Found this nice example of sprites in OpenGL on the gpwiki:
http://gpwiki.org/index.php/OpenGL_Tutorial_Framework:Ortho_and_Alpha
Will try to recreate this demo in Squeak at some point.

Best, Micke

Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package (was: Games with Squeak)

Mikael Kindborg-2
In reply to this post by Bert Freudenberg
On 11/14/06, Bert Freudenberg <[hidden email]> wrote:

> On Nov 14, 2006, at 23:40 , Mikael Kindborg wrote:
>
> >> > Are textures faster?
> >> > Will have to learn more about this.
> >>
> >> Texture-mapped quads are the way to go.
> >>
> >
> > Looked at glTexImage2D and the documentation says that width and
> > height must be powers of two, which is not very nice for sprites.
>
> Well, it's what the hardware supports efficiently - OpenGL is a very
> low-level API. You will have to manage this yourself. Like, write a
> sprite manager that packs many sprites into one large texture.
>
> > However, I saw that in OpenGL 2.1 "Non-Power-Of-Two Textures" are
> > introduced as a standard:
> > http://www.opengl.org/documentation/current_version/
>
> ... which will take years until it is generally supported. And it
> won't work on older boards at all.
>
> All in all I'd prefer SDL for 2D games.
>
> - Bert -
>

Oh, that's bad news, I just got enthusiastic about OpenGL... Then
again, using SDL does not rule out OpenGL.

Best regards, Micke

Reply | Threaded
Open this post in threaded view
|

Re: Loading the OpenGL package

Alan Grimes-2
In reply to this post by Joshua Gargus-2
> Not just because of that.  You still have to upload all of the pixels to
> the graphics card, each frame.  Also, how would you scale/resize your
> sprite?  AFAIK, common OpenGL implementations do not support such
> operations (I found a Google link to an HP-extension that supports
> scaling/resizing), so you would need to do this on the CPU.

that part is trivial. Simply create a scaling matrix for whatever
scaling you need and make that your modelview matrix. =)

After that it's just a matter of drawing the polygon.


--
People say DOS is not reliable, For me it is as constant as the speed of
light.
People say Linux is, I have yet to see it please me for an entire day.

Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: Loading the OpenGL package

Phil B
In reply to this post by Jakub Kozisek
On 11/13/06 6:55 PM, Jakub Kozisek wrote:

> Hello,
>
> I took old PositionalArgs, did minimal changes and installed it into 3.9
> image. After applying this changes and loading FFI package, OpenGL package
> loads without any problems (hope it will be working too :).
>
> Now there is another thing needed to be done - going through the code and
> update it (like "Smalltalk platformName" in OpenGL class>>new, and so on).
>
> If anybody have time to clean it, feel free to be my hero :), if not, I will
> try to do my best although it will take me longer.
>
> Bye!
>
> Jakub
> http://www.nabble.com/file/4145/PositionalArgs39.1.cs PositionalArgs39.1.cs
>

Just curious if anyone has an updated version of this that works in
3.10.2/Pharo?

Thanks,
Phil


> Diego Fernandez wrote:
>> Thanks!! :)
>> I will try to make a Squeak 3.9 compatible version, from the one found
>> in Croquet.
>>
>> On 11/3/06, Alexander Lazarević<[hidden email]>  wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> I even found a short description I once wrote at that time about
>>> PositionalArgs and the OpenGLApi.
>>>
>>> http://www.lazarevic.de/PositionalArgs.html
>>>
>>> Regards,
>>>          Alex
>>>
>>> PS: Again, this was all for 3.7.
>>> PPS: It seems that only FireFox displays all of the Unicode characters
>>> (check, etc.) in the right way.
>>>
>>> Alexander Lazarević schrieb:
>>>> Hi,
>>>>
>>>> When I played with OpenGL in Squeak (3.7) I used
>>>>
>>>> http://www.lazarevic.de/download/squeak/PositionalArgs37.2.cs
>>>>
>>>> to load in a vanilla 3.7 image to be able to load the OpenGLApi
>>>> afterwards. I don't know how much has changed in 3.9, but it may be
>>>> worth a try to load this into a 3.9 image and get the current OpenGL
>>> Api
>>>> from CroquetSource after that?
>>>>
>>>> Regards,
>>>>     Alex
>>>>
>>>> Bert Freudenberg schrieb:
>>>>> Am 14.10.2006 um 00:55 schrieb Andreas Raab:
>>>>>
>>>>>> Diego Fernandez wrote:
>>>>>>> Anyway, I'm trying to load OpenGL-ar.36.mcz in Squeak 3.9 but I get:
>>>>>>> Syntax Error:
>>>>>>> glBindBufferARB(target, buffer)
>>>>>>>      "This method was generated by OGLExtManager"
>>>>>>>      <Argument expected ->apicall: void 'glBindBufferARB' (long
>>> ulong)>
>>>>>>> Any clue on how to solve this error? (It looks that it's created
>>> with
>>>>>>> a "special" compiler)
>>>>>> Install the FFI from SqueakMap.
>>>>> Ah, no, that's the positional arg syntax extension ... it lets you
>>> write
>>>>> a Smalltalk method named "glBindBufferARB(target, buffer)", which
>>>>> becomes the symbol #'glBindBufferARB()/2'.
>>>>>
>>>>> Each of these methods is installed twice, the other in this case is
>>>>> #glBindBufferARB:with:.
>>>>>
>>>>> Hmm, might be easier to download croquet, delete these methods, and
>>>>> fileout the rest.
>>>>>
>>>>> - Bert -
>>>>>
>>>>>
>>>>>
>>>>>
>>> -----BEGIN PGP SIGNATURE-----
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>>
>>> iD8DBQFFS2g+YiF2wSTEZ9gRAsgWAJ9tnUR7o/ptiZDugUzhf2i/yrVJvQCdF6dc
>>> br4lSJ4+U3ko/TXyxfh32lM=
>>> =GBur
>>> -----END PGP SIGNATURE-----
>>>
>>>
>>
>>
>>
>