r1016: Use the OpenGL mask renderer and fix it.
commit4ed19fed6dfe14f52478d1c0c2318173e02f0385
authorJohannes Sixt <johannes.sixt@telecom.at>
Fri, 27 Jul 2007 22:30:55 +0000 (27 22:30 +0000)
committerJohannes Sixt <johannes.sixt@telecom.at>
Fri, 27 Jul 2007 22:30:55 +0000 (27 22:30 +0000)
tree9760f1c79f616e229b49dc15f949227b950973dd
parent6337460b512af22f352ddefd57a83bf5405888a3
r1016: Use the OpenGL mask renderer and fix it.

Currently, only the software mask render was used even if OpenGL was
available. This posed a problem when a fade was defined in addition: In
this case the fade took precedence and the rendered mask was ignored.

With this change the OpenGL mask renderer is used, and the result is
blended with the fader. However, the OpenGL mask renderer is of low
quality and only suitable as a preview for initial work. For fine-tuning
of masks (with large feather values) OpenGL should be switched off and
the software renderer be used.

The GLU tesselator is used to dissect the mask polygon into triangles.
The tesselator requires a callback that computes new vertices. This
callback was bogus in two ways:

- It did not take into account that the input can contain NULL pointers
  and crashed. This happened if the mask outline was made up of splines.

  It turns out that the interpolation that this callback normally must
  perform is not needed anyway (we are painting only a single color), so
  it is removed.

- The new vertex data was allocated with malloc, but the GLU would not free
  this data, so the memory is leaked. The solution is to put the new
  vertices into a global list, which is deleted after the tesselation is
  completed.
cinelerra/playback3d.C
cinelerra/virtualvnode.C
cinelerra/virtualvnode.h