Loading the OpenGL package (was: Games with Squeak)

Joshua Gargus schwa at fastmail.us
Tue Nov 14 22:03:49 UTC 2006


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 <jakub.kozisek at 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 at 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.
>>
>>
>>
>




More information about the Squeak-dev mailing list