Brian S. Julin writes:

 > Nice plan?  I hope so, and welcome comments.

Nice paper. I've been meditating on this, and I'd like to know
if I got the idea right. So here is the result of my brainstorming 
(stop me if I'm wrong).

The different things to consider when it comes to rendering a
primitive could be classified as follow:

 - The destinations : where the actual operation occurs. It can be
   one or more of frame/alpha/z/stencil/.../buffer

 - The sources : what is intented to bo written. It can be a mix of
   color, alpha or z given as single values or texture. (or a ROP?)

 - The modifiers : Every thing that will alter the actual rendering,
   such as z/stencil buffers, clipping area, ...

 - The shape: line, box....

Thus, an alpha-aware ggiDrawBow(vis,x,y,w,h) could be described as:

   dest   : vis
   source : color=vis->fgcolor, alpha=vis->fgalpha (or fct parameter)
   mod    : vis->clipping_area
   shape  : box(x,y,w,h)

The extension would internaly define this as a primtive batchop
to be processed by the target.
If the target can't handle this directly, it will call call generic
function to transform this into a batchop it can handle.
This could be, for example, transforming the box into a serie of
hline, getting rid of the clipping area by reshaping the box,
creating a 3 pass batchop (read the shape, blend with the color/alpha,
write the result), etc.

So we need to create batchops for lots of different things here:

* shapes, primitives:

  POINT(x,y), BOX(x,h,w,h), LINE(x,y,dx,dy), HLINE(x,y,w),
  VLINE(x,y,h)
  (maybe TRIANGLE in extensions, or libXMI SPANS)

* primitive conversion

  BOX_TO_HLINE, TRIANGLE_TO_SPANS...

* primitive transformation

  RESIZE_BOX, TRANSLATE... (hook for vertex transform in 3D)

* the primitive rendering batchop, with the sources and all.

We can also think of visual level operations:
   
   FillScreen(color)
   2D filters like AA, Blur (hint : OpenGL is getting close...)


It's very rough, but I'd like to know if it makes sense or not.
The more I see this, the more I feel it looks like a scene
oriented design, with the advantage that rendering operations
are 'objects' of the scene, just like 'data'. Isn't it what
libGGI3D wanted to accomplish somehow?

Eric.

Reply via email to