sdl@lists.libsdl.org
[Top] [All Lists]

Re: [SDL] Quick Question about animation.

Subject: Re: [SDL] Quick Question about animation.
From:
Date: Fri, 9 Mar 2007 19:31:18 +0100
On Fri, Mar 09, 2007 at 08:07:19AM -0600, Lamonte(Scheols/Demonic) wrote:
> Alright coool I'll work on learning openGL to :).
> 
> On 3/9/07, Nicolas Goy - ?$B;~4|@:Nn - Goyman.com SA <kuon@xxxxxxxxxx> wrote:
> >
> > On Mar 9, 2007, at 6:35 AM, Andreas Schiffler wrote:
> > >
> > > Also for animations with large numbers of sprites, it might be much
> > > faster to load a single "filmstrip" surface and then change the
> > > source rectangle coordinates to get the appropriate graphics for
> > > the current sequence. i.e. source_x=sprite_w*animation_seq. I am
> > > not sure what a good tool to assemble such a filmstrip would be
> > > though ... but there are batch tools to "append" images such as
> > > ImageMagick where you can do stuff like "convert source/* +append
> > > filmstrip.png".
> >
> > We do use this technique, but with opengl. Be build the texture when
> > the programme init. Like:
> > - Init a big texture
> > - Load all files inside the texture, with opengl sub texture upload
> > functions it's easy, but you have a different scenario.
> >
> > You can also assemble the image with image magick or any tool like
> > that, but we prefered our way.
> >
> > We use this to draw precalculated fonts. It's a lot faster to have
> > one 1024 1024 texture that having 200 littles textures. But it's
> > ideal for sprite animation, as you can do (in opengl, again adapt to
> > your scenario):
> > glTexCoord(spriteOffset * spriteWidth, spriteOffset + 1 * spriteWidth);
> >
> > It's easy and very efficient.
> >
> > Regards
> >
> > --
> > Kuon from japan.
> >
> > "Your computer requests another OS, deny or allow?"
> >
> > Blog:
> > http://arkhi.goyman.com/blojsom/blog/default/
> >
> >
> >
> > _______________________________________________
> > SDL mailing list
> > SDL@xxxxxxxxxxxxxxxx
> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >
> 
> 
> -- 
> Join phpdiscovery.com Now!
> _______________________________________________
> SDL mailing list
> SDL@xxxxxxxxxxxxxxxx
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list
SDL@xxxxxxxxxxxxxxxx
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

<Prev in Thread] Current Thread [Next in Thread>