Re: [xmoto-dev] Z-buffer support in xmoto

[ Thread Index | Date Index | More lists.tuxfamily.org/xmoto-dev Archives ]


Dnia Wed, 16 May 2007, me i am naskrobal
> but i'm still a the office !
> 
> since 0.2.7, dynamic blocks are stored the same way as static blocks.
> blocks are already sorted on z (more or less), because the drawing
> order of the different blocks is known, its:
> background layers, dynamic background blocks, background blocks,
> dynamic blocks, static blocks (the two layers of static blocks), front
> layers.
I know and I'll use this sorting to put everything in one array. The
z-values could even bi cached in levels cache to speed up the whole
process. 

> 
> and in each layer of blocks, blocks are sorted on their texture (else
> there's problems with vbo)
Ok, good to know. I suppose that's the same reason of drawing blocks
edges after drawing blocks. I've moved _RenderBlockEdges call into
_RenderBlock and this also fixes issue with dynamic block with edges.

> > As i know, it's VERY important.
> > Because static blocs are calculated only at level generation and rendered
> >very fastly
> > it's not possible with the dynamic bloc (because they can move).
Now with OpenGL rendering dynamic block is made by setting
transformation matrix and then render block in static way. I even
changed drawing code to just call _RenderBlock after applying this
matrix. 

-- 
Janek Polak
WWW: http://www.icpnet.pl/~benetnash  GnuPG: 6A1E7B75
GG: 2852217  Jabber: benetnash@xxxxxxxxxxxxx
ICQ: 473154175  Skype: benetnash86

Attachment: pgpcCIADokhK2.pgp
Description: PGP signature



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/