[Fluxus] rfc: (draw-line)
David Griffiths
dave at pawfal.org
Mon Oct 11 02:30:55 PDT 2010
Hi all,
On Sat, 2010-10-09 at 22:29 +0200, gabor papp wrote:
> > I haven't even seen the fluxus code, but I can't help but to wonder
> > why should this be more complicated than
> >
> > glBegin(GL_LINES)
> > glVertexfv(startVector);
> > glVertexfv(endVector);
> > glEnd();
> >
> of course, at the end the line rendering is something like this. but
> fluxus has a more complex system. when you run (draw-cube) the cube is
> not drawn in that exact moment. fluxus has a scene graph for storing
> objects and their render states. you add objects to the scene graph with
> (build-*) commands, and when you use (colour) for instance, you modify
> the actual render state. (draw-*) commands are special. all (draw-*)
> primitives are registered, and they are displayed after the scene graph
> is rendered in every frame. so if you ran something like the code above
> when (draw-line) is executed it would not produce anything visible,
> because it would be overwritten by the rendering of the scene graph.
Also the line primitive is a little more than GL_LINES as in one form it
builds camera facing geometry.
>From my POV I think for immediate mode it would be better to have just a
GL_LINES approach, as creating and deleting primitives is quite costly.
cheers,
dave
More information about the Fluxus
mailing list