Loading the OpenGL package (was: Games with Squeak)
Bert Freudenberg
bert at freudenbergs.de
Tue Nov 14 22:54:15 UTC 2006
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 -
More information about the Squeak-dev
mailing list
|