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: Asko Soukka
Subject: Re: [Gzz] About renderables and vobs
Date: Wed, 11 Dec 2002 17:39:00 +0200 (EET)

Mon, 9 Dec 2002, Tuomas Lukka wrote:
> > Hmm... I wonder how e.g. OvalBgVob could be implemented using
> > DiceableMesh. It could be easily implemented as its now - using oval
> > texture as stencil. Also "solids" could then be drawn using rectangles as
> > they are drawn now.
>
> Yes, that would probably be the easiest.
>
> >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
- 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
  -- still the border could be distorted, when circle texture is
     stretched/compressed, this happens at least when the border is
     also in the texture

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

> > 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?

> > But how could colored stripes be then drawn inside polygon oval?
> > Probably creating a rectangular stencil for every stripe, selecting
> > stripe's color and drawing the same once defined oval for every color...
> Probably best do it the other way around, stenciling the oval because it
> is probably slower to draw.

Of course.


-- 
Asko Soukka     | Taitoniekantie 9 A 603 | address@hidden
+358-40-8235947 | FIN-40740 JYVÄSKYLÄ    | http://www.iki.fi/asko.soukka/





reply via email to

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