% -*- latex -*-


\setDate{August  9, 2010}
% The following must all be on one line for latex2man to work.
\begin{Name}{3}{icetCompositeMode}{Kenneth Moreland}{\IceT Reference}{\CFunc{icetCompositeMode} -- set the type of operation used for compositing}

  \mansection{Synopsis}

  \textC{\#include <IceT.h>}

  \begin{Table}{3}
    \textC{void }\CFunc{icetCompositeMode}\textC{(}&\textC{IceTEnum}&\CArg{mode}\quad\textC{);}
  \end{Table}

  
  \mansection{Description}

  Sets the composite mode used when combining images.  \IceT enables
  parallel rendering by allowing each process in your code to independently
  render images of partial geometry.  These partial-geometry images are
  then ``composited'' to form a single image equivalent to if all the
  geometry were rendered by a single process.

  \IceT supports multiple operations that can be used to combine images.
  The operator you use should be equivalent to that used by your rendering
  system to resolve \index{hidden~surface}hidden surfaces or mix occluding
  geometry with that behind it.

  The argument \CArg{mode} is one of the following enumerations:

  \begin{Description}[xxxxxxxx]
  \item[\CEnum{ICET\_COMPOSITE\_MODE\_Z\_BUFFER}] Use the
    \index{z-buffer}z-buffer hidden-surface removal operation.  The
    compositing operation compares the distance of pixel fragments from the
    viewpoint and passes the fragment closest to the user.  In order for
    this operation to work, images must have a depth buffer (set with
    \icetSetDepthFormat).
  \item[\CEnum{ICET\_COMPOSITE\_MODE\_BLEND}] Blend two fragments together
    using the standard
    \index{over~operator}\index{under~operator}over/under operator.  in
    order for this operation to work, images must have a color buffer (set
    with \icetSetColorFormat) that has an alpha channel and there must be
    \emph{no} depth buffer (as the operation makes no sense with depth).
    Also, this mode will only work if \CEnum{ICET\_ORDERED\_COMPOSITE} is
    enabled and the order is set with \CFunc{icetCompositeOrder}.
  \end{Description}

  The default compositing mode is
  \CEnum{ICET\_COMPOSITE\_MODE\_Z\_BUFFER}.  The current composite mode is
  stored in the \CEnum{ICET\_COMPOSITE\_MODE} state variable.


  \mansection{Errors}

  \begin{Description}[ICET\_INVALID\_OPERATION]
  \item[\CErrorEnum{ICET\_INVALID\_ENUM}]
    \CArg{mode} is not a valid composite mode.
  \end{Description}


  \mansection{Warnings}

  None.


  \mansection{Bugs}

  \CFunc{icetCompositeMode} will let you set a mode even if it is
  incompatible with other current settings.  Some settings will be checked
  during a call to \CFunc{icetDrawFrame}.  For example, if the image
  format (specified with \icetSetColorFormat and \icetSetDepthFormat) does
  not support the composite mode picked, you will get an error during the
  call to \CFunc{icetDrawFrame}.

  Other incompatibilities are also not checked.  For example, if the
  composite mode is set to \CEnum{ICET\_COMPOSITE\_MODE\_BLEND}, \IceT will
  happily use this operator even if \CEnum{ICET\_ORDERED\_COMPOSITE} is not
  enabled.  However, because order matters in the blend mode, you will
  probably get incorrect images if the compositing happens in arbitrary
  order.


  \mansection{Copyright}
  Copyright \copyright 2010 Sandia Corporation

  @copyright@

  \mansection{See Also}

  \CFuncSeeAlso{icetCompositeOrder},
  \CFuncSeeAlso{icetSetColorFormat},
  \CFuncSeeAlso{icetSetDepthFormat}

\end{Name}


% These are emacs settings that go at the end of the file.
% Local Variables:
% writestamp-format: "%B %e, %Y"
% writestamp-prefix: "^\\\\setDate{"
% writestamp-suffix: "}$"
% End:
