← Back to team overview

kicad-developers team mailing list archive

Re: Advanced rendering techniques for KiCad

 

On Fri, 30 Sep 2011, Torsten Hüter wrote:

We will get with this features something that no other EDA-program has currently, it will be a great benefit for KiCad in my opinion.

Not to ruin your work/enthusiasm but... who cares? :D

Especially when, in a PCB cad system, the *absolutely most useful*
blending mode for layer is the XOR one (which IIRC was retracted from
OpenGL with color index mode, maybe it can be done with fragment
shaders).

I say that because I tried gerbv high-quality mode (i.e. cairo blending,
software slow as hell) and, in fact, antialiasing/blending *detracted*
from the usefulness of visualization!

In any case, the only 'correct' way to render alpha blendings in OpenGL
is to sort by layer, no Z-buffer technique can help you with that: it's
simply the way blending works! In our case it's fairly easy to separate
stuff, just use a display list for each layer... and, no, FBOs won't be
useful in the general case to 'optimize' redrawings, you *have* to
repaint everything, unless you only change the top layer, to keep
correct blending. You *could* try with a FBO for each layer but it would
gobble heaps of video memory! A truly optimized way to handle it for
simple modifications (i.e. track drawing) would be an FBO for the layers
under the one being modified and another one for the layers above: so
you could update using an unblended blit, then the blended drawing of
the current stuff (being modified) and finish with a blended blit of the
'upper' layers.

Would it be useful? I think no, since it's difficult to work with more
than 2 layers on screen, and blending only complicates the colouring
(also 'masks' them, which is why XOR is the best one for PCB work). Eye
candy? sure, a lot XD

Also think about all these people with open source drivers and/or low
end graphics :D heck, on my work machine I don't even HAVE opengl acceleration:P

--
Lorenzo Marcantonio
Logos Srl

Follow ups

References