gzz-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gzz] About renderables and vobs


From: Tuomas Lukka
Subject: Re: [Gzz] About renderables and vobs
Date: Wed, 11 Dec 2002 17:53:18 +0200
User-agent: Mutt/1.4i

> > >But of course outlining wouldn't then work...
> >
> > How do you mean?
> 
> Currently OvalBgVob is drawn as quad, but because we use circle shape
> texture (shape done with alpha level) as stencil (or what would be the
> right term here), only the oval is drawn. Anyway... only vertexes given
> are the corners of quad, or the corners of solids. At least we cannot then use
> those given vertexes to draw the border.
> 
> Trying to summarize ways of drawing oval shape:
> - polygon approach needs a lot of vertexes and the amount of vertexes
>   for appropriate resolution could only be optimized on renderable side
>   (where the exact size in window coordinates is known)
>   ++ border could be drawn using the same vertexes as polygon

This is another place where we do want to generalize: we also need
edges for fillets etc. in different styles. This means that in addition
to drawing a line, you could also draw a "beveled 3D edge" or whatever.

Probably the right abstraction for this approach would be an object
describing an outline / fill style and then a simple renderable for
each shape.

For ellipses and shapes like that, maybe a subdivision approach would be
appropriate... Then we'd have more flexibility than just for drawing
ellipses: all round shapes would be easy.

> - texture approach needs only four vertexes and resolution problem
>   could be handled using mipmaps
>   -- border should be also drawn by using texture, but its weight can
>      be made fixed only on renderable side

Sorry, I don't understand?

>   -- still the border could be distorted, when circle texture is
>      stretched/compressed, this happens at least when the border is
>      also in the texture

There's lots of more ways for drawing a border around a shape defined
in a texture: see the Irregu manuscript for some.

> So, oval could be drawn using texture also with DiceableMesh, but then
> DiceableMesh should also draw the border using the same texture?

Or with one of the irregu algorithms.

> > > Using GL_TRIANGLE_FAN, when drawing OvalBgVob, could be the second fastest
> > > way, but then dicing is not possible.
> > Well, you could just put the triangles in a diceable. Slightly more indices
> > but not too bad.
> 
> Hmm... with drawing circle as GL_POLYGON there would be no explicit vertex
> at origo. Does it have any effect to the way it will be diced into
> triangles?

s/origo/origin/

Yes, but with a reasonable dicing algorithm it shouldn't be a problem.

        Tuomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]