\hypertarget{a00997}{\section{Post\+Processing Class Reference}
\label{a00997}\index{Post\+Processing@{Post\+Processing}}
}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00997_a627f4480d5de0dd97016577e2361941b}{int \hyperlink{a00997_a627f4480d5de0dd97016577e2361941b}{num\+Processors} () const }\label{a00997_a627f4480d5de0dd97016577e2361941b}

\begin{DoxyCompactList}\small\item\em Number of post processors. \end{DoxyCompactList}\item 
int \hyperlink{a00997_a105ed9dea1db6fda3fb56adeac211b6b}{setup\+Scene} (int \+\_\+viewer\+I\+D, int \+\_\+width, int \+\_\+height, int \+\_\+samples=0, int \+\_\+stereo\+Eye=-\/1)
\begin{DoxyCompactList}\small\item\em Bind fbo for scene rendering. \end{DoxyCompactList}\item 
void \hyperlink{a00997_a788066adade1462af07c4c0147ac71c0}{post\+Process} (int \+\_\+viewer\+I\+D, \hyperlink{a00643}{A\+C\+G\+::\+G\+L\+State} $\ast$\+\_\+glstate, const \hyperlink{a03336_a574eaee6f4eff166845ff5c654b0b852}{A\+C\+G\+::\+G\+L\+Matrixd} \&\+\_\+modelview, const \hyperlink{a03336_a574eaee6f4eff166845ff5c654b0b852}{A\+C\+G\+::\+G\+L\+Matrixd} \&\+\_\+proj1, const \hyperlink{a03336_a574eaee6f4eff166845ff5c654b0b852}{A\+C\+G\+::\+G\+L\+Matrixd} \&\+\_\+proj2, bool \+\_\+hw\+Open\+G\+L\+Stereo=false)
\begin{DoxyCompactList}\small\item\em Perform all post processing. \end{DoxyCompactList}\item 
void \hyperlink{a00997_a4feb4ff851dcff75a28f1fb763e55399}{resolve\+Stereo\+Anyglyph} (int \+\_\+viewer\+I\+D)
\begin{DoxyCompactList}\small\item\em Resolve stereo buffers as anaglyph. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00997_a9ce721527551ad803465b896ed076a4d}{void {\bfseries setup\+F\+B\+O} (\hyperlink{a00562}{A\+C\+G\+::\+F\+B\+O} $\ast$\+\_\+dst, int \+\_\+width, int \+\_\+height, G\+Luint \+\_\+intfmt, int \+\_\+samples)}\label{a00997_a9ce721527551ad803465b896ed076a4d}

\item 
\hypertarget{a00997_a016b0e33b35ed162cf252be9a3c227a1}{void {\bfseries resolve\+Multisampling} (\hyperlink{a00562}{A\+C\+G\+::\+F\+B\+O} $\ast$\+\_\+dst, \hyperlink{a00562}{A\+C\+G\+::\+F\+B\+O} $\ast$\+\_\+src)}\label{a00997_a016b0e33b35ed162cf252be9a3c227a1}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00997_ad8f0f03a1fbfca7094cbea180489bc5d}{int \hyperlink{a00997_ad8f0f03a1fbfca7094cbea180489bc5d}{debug\+Level\+\_\+}}\label{a00997_ad8f0f03a1fbfca7094cbea180489bc5d}

\begin{DoxyCompactList}\small\item\em perform extra checks for debugging\+: 0 -\/$>$ no checks, 1 -\/$>$ fast checks, 2 -\/$>$ more checks etc. \end{DoxyCompactList}\item 
\hypertarget{a00997_a27275112ae99a41e8fc79201d5c2f212}{\hyperlink{a00562}{A\+C\+G\+::\+F\+B\+O} \hyperlink{a00997_a27275112ae99a41e8fc79201d5c2f212}{scene\+F\+B\+O\+\_\+} \mbox{[}2\mbox{]}}\label{a00997_a27275112ae99a41e8fc79201d5c2f212}

\begin{DoxyCompactList}\small\item\em F\+B\+O for scene rendering, one for each eye in stereo mode, possibly multisampled. \end{DoxyCompactList}\item 
\hypertarget{a00997_a48c9542ce47deb550eef649007163c91}{\hyperlink{a00562}{A\+C\+G\+::\+F\+B\+O} \hyperlink{a00997_a48c9542ce47deb550eef649007163c91}{proc\+F\+B\+O\+\_\+} \mbox{[}2\mbox{]}}\label{a00997_a48c9542ce47deb550eef649007163c91}

\begin{DoxyCompactList}\small\item\em post-\/processing read/write F\+B\+Os, no msaa \end{DoxyCompactList}\item 
\hypertarget{a00997_af451e7921e5d0c448580e98c420b27b5}{\hyperlink{a00562}{A\+C\+G\+::\+F\+B\+O} \hyperlink{a00997_af451e7921e5d0c448580e98c420b27b5}{stereo\+F\+B\+O\+\_\+} \mbox{[}2\mbox{]}}\label{a00997_af451e7921e5d0c448580e98c420b27b5}

\begin{DoxyCompactList}\small\item\em store post processing results for each stereo eyes, input for anaglyph processor, no msaa \end{DoxyCompactList}\item 
\hypertarget{a00997_a6bcb3f4543828470bdf3b49b02b9d226}{G\+Luint \hyperlink{a00997_a6bcb3f4543828470bdf3b49b02b9d226}{backbuffer\+F\+B\+O\+\_\+}}\label{a00997_a6bcb3f4543828470bdf3b49b02b9d226}

\begin{DoxyCompactList}\small\item\em backbuffer output, not owned by this class \end{DoxyCompactList}\item 
\hypertarget{a00997_a8805d999e32c30da52431a923dcd26af}{G\+Luint {\bfseries backbuffer\+Target\+\_\+}}\label{a00997_a8805d999e32c30da52431a923dcd26af}

\item 
\hypertarget{a00997_a1432f50ee22d9b9e443dda7780035c1a}{G\+Lint {\bfseries backbuffer\+Viewport\+\_\+} \mbox{[}4\mbox{]}}\label{a00997_a1432f50ee22d9b9e443dda7780035c1a}

\item 
\hypertarget{a00997_ad6be80a2ba031857c017b1c05ba20b0b}{bool \hyperlink{a00997_ad6be80a2ba031857c017b1c05ba20b0b}{stereo\+Mode\+\_\+}}\label{a00997_ad6be80a2ba031857c017b1c05ba20b0b}

\begin{DoxyCompactList}\small\item\em postprocessing in stereo mode \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}


Definition at line 59 of file Post\+Processing.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a00997_a788066adade1462af07c4c0147ac71c0}{\index{Post\+Processing@{Post\+Processing}!post\+Process@{post\+Process}}
\index{post\+Process@{post\+Process}!Post\+Processing@{Post\+Processing}}
\subsubsection[{post\+Process}]{\setlength{\rightskip}{0pt plus 5cm}void Post\+Processing\+::post\+Process (
\begin{DoxyParamCaption}
\item[{int}]{\+\_\+viewer\+I\+D, }
\item[{{\bf A\+C\+G\+::\+G\+L\+State} $\ast$}]{\+\_\+glstate, }
\item[{const {\bf A\+C\+G\+::\+G\+L\+Matrixd} \&}]{\+\_\+modelview, }
\item[{const {\bf A\+C\+G\+::\+G\+L\+Matrixd} \&}]{\+\_\+proj1, }
\item[{const {\bf A\+C\+G\+::\+G\+L\+Matrixd} \&}]{\+\_\+proj2, }
\item[{bool}]{\+\_\+hw\+Open\+G\+L\+Stereo = {\ttfamily false}}
\end{DoxyParamCaption}
)}}\label{a00997_a788066adade1462af07c4c0147ac71c0}


Perform all post processing. 

Post processors might require modelview and projection matrix. In stereo mode, the post processor chain is executed for each eye separately. The resulting stereo buffers for each eye have to be resolved either by hardware Open\+G\+L support or by manually calling resole\+Stereo\+Anaglyph() afterwards.


\begin{DoxyParams}{Parameters}
{\em \+\_\+viewer\+I\+D} & Open\+Flipper viewer id (viewport index) \\
\hline
{\em \+\_\+modelview} & modelview matrix of the scene \\
\hline
{\em \+\_\+proj1} & projection matrix 1 (left eye in stereo mode) \\
\hline
{\em \+\_\+proj2} & projection matrix 2 (right eye in stereo mode) \\
\hline
{\em \+\_\+hw\+Open\+G\+L\+Stereo} & hardware stereo support should be used to resolve the stereo buffers (G\+L\+\_\+\+B\+A\+C\+K\+\_\+\+L\+E\+F\+T, G\+L\+\_\+\+B\+A\+C\+K\+\_\+\+R\+I\+G\+H\+T) \\
\hline
\end{DoxyParams}


Definition at line 235 of file Post\+Processing.\+cc.

\hypertarget{a00997_a4feb4ff851dcff75a28f1fb763e55399}{\index{Post\+Processing@{Post\+Processing}!resolve\+Stereo\+Anyglyph@{resolve\+Stereo\+Anyglyph}}
\index{resolve\+Stereo\+Anyglyph@{resolve\+Stereo\+Anyglyph}!Post\+Processing@{Post\+Processing}}
\subsubsection[{resolve\+Stereo\+Anyglyph}]{\setlength{\rightskip}{0pt plus 5cm}void Post\+Processing\+::resolve\+Stereo\+Anyglyph (
\begin{DoxyParamCaption}
\item[{int}]{\+\_\+viewer\+I\+D}
\end{DoxyParamCaption}
)}}\label{a00997_a4feb4ff851dcff75a28f1fb763e55399}


Resolve stereo buffers as anaglyph. 

Final textures are combined to an anaglyph image.


\begin{DoxyParams}{Parameters}
{\em \+\_\+viewer\+I\+D} & Open\+Flipper viewer id (viewport index) \\
\hline
\end{DoxyParams}


Definition at line 457 of file Post\+Processing.\+cc.

\hypertarget{a00997_a105ed9dea1db6fda3fb56adeac211b6b}{\index{Post\+Processing@{Post\+Processing}!setup\+Scene@{setup\+Scene}}
\index{setup\+Scene@{setup\+Scene}!Post\+Processing@{Post\+Processing}}
\subsubsection[{setup\+Scene}]{\setlength{\rightskip}{0pt plus 5cm}int Post\+Processing\+::setup\+Scene (
\begin{DoxyParamCaption}
\item[{int}]{\+\_\+viewer\+I\+D, }
\item[{int}]{\+\_\+width, }
\item[{int}]{\+\_\+height, }
\item[{int}]{\+\_\+samples = {\ttfamily 0}, }
\item[{int}]{\+\_\+stereo\+Eye = {\ttfamily -\/1}}
\end{DoxyParamCaption}
)}}\label{a00997_a105ed9dea1db6fda3fb56adeac211b6b}


Bind fbo for scene rendering. 

Setup fbo and draw buffer as target for scene rendering. Some post processing effects require special targets and \hyperlink{a00997_a105ed9dea1db6fda3fb56adeac211b6b}{setup\+Scene()} takes this into account.


\begin{DoxyParams}{Parameters}
{\em \+\_\+viewer\+I\+D} & Open\+Flipper viewer id (viewport index) \\
\hline
{\em \+\_\+width} & texture width \\
\hline
{\em \+\_\+height} & texture height \\
\hline
{\em \+\_\+samples} & number of samples for multisampling \\
\hline
{\em \+\_\+stereo\+Eye} & eye from which to render the scene\+: -\/1 (no stereo rendering), 0 (left eye), 1 (right eye) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
negative (unchanged fbo ie. use current hardware fbo), 0 (fail), 1 (fbo has been changed) 
\end{DoxyReturn}


Definition at line 76 of file Post\+Processing.\+cc.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/widgets/gl\+Widget/Post\+Processing.\+hh\item 
Open\+Flipper/widgets/gl\+Widget/Post\+Processing.\+cc\end{DoxyCompactItemize}
