\hypertarget{classPostProcessing}{}\section{Post\+Processing Class Reference}
\label{classPostProcessing}\index{Post\+Processing@{Post\+Processing}}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classPostProcessing_a13eb7666778bcb5af69c2e41ccff4769}\label{classPostProcessing_a13eb7666778bcb5af69c2e41ccff4769}} 
int \hyperlink{classPostProcessing_a13eb7666778bcb5af69c2e41ccff4769}{num\+Processors} () const
\begin{DoxyCompactList}\small\item\em Number of post processors. \end{DoxyCompactList}\item 
int \hyperlink{classPostProcessing_a105ed9dea1db6fda3fb56adeac211b6b}{setup\+Scene} (int \+\_\+viewer\+ID, 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{classPostProcessing_a788066adade1462af07c4c0147ac71c0}{post\+Process} (int \+\_\+viewer\+ID, \hyperlink{classACG_1_1GLState}{A\+C\+G\+::\+G\+L\+State} $\ast$\+\_\+glstate, const \hyperlink{namespaceACG_a574eaee6f4eff166845ff5c654b0b852}{A\+C\+G\+::\+G\+L\+Matrixd} \&\+\_\+modelview, const \hyperlink{namespaceACG_a574eaee6f4eff166845ff5c654b0b852}{A\+C\+G\+::\+G\+L\+Matrixd} \&\+\_\+proj1, const \hyperlink{namespaceACG_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{classPostProcessing_a4feb4ff851dcff75a28f1fb763e55399}{resolve\+Stereo\+Anyglyph} (int \+\_\+viewer\+ID)
\begin{DoxyCompactList}\small\item\em Resolve stereo buffers as anaglyph. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classPostProcessing_a9ce721527551ad803465b896ed076a4d}\label{classPostProcessing_a9ce721527551ad803465b896ed076a4d}} 
void {\bfseries setup\+F\+BO} (\hyperlink{classACG_1_1FBO}{A\+C\+G\+::\+F\+BO} $\ast$\+\_\+dst, int \+\_\+width, int \+\_\+height, G\+Luint \+\_\+intfmt, int \+\_\+samples)
\item 
\mbox{\Hypertarget{classPostProcessing_a016b0e33b35ed162cf252be9a3c227a1}\label{classPostProcessing_a016b0e33b35ed162cf252be9a3c227a1}} 
void {\bfseries resolve\+Multisampling} (\hyperlink{classACG_1_1FBO}{A\+C\+G\+::\+F\+BO} $\ast$\+\_\+dst, \hyperlink{classACG_1_1FBO}{A\+C\+G\+::\+F\+BO} $\ast$\+\_\+src)
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classPostProcessing_ad8f0f03a1fbfca7094cbea180489bc5d}\label{classPostProcessing_ad8f0f03a1fbfca7094cbea180489bc5d}} 
int \hyperlink{classPostProcessing_ad8f0f03a1fbfca7094cbea180489bc5d}{debug\+Level\+\_\+}
\begin{DoxyCompactList}\small\item\em perform extra checks for debugging\+: 0 -\/$>$ no checks, 1 -\/$>$ fast checks, 2 -\/$>$ more checks etc. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classPostProcessing_a27275112ae99a41e8fc79201d5c2f212}\label{classPostProcessing_a27275112ae99a41e8fc79201d5c2f212}} 
\hyperlink{classACG_1_1FBO}{A\+C\+G\+::\+F\+BO} \hyperlink{classPostProcessing_a27275112ae99a41e8fc79201d5c2f212}{scene\+F\+B\+O\+\_\+} \mbox{[}2\mbox{]}
\begin{DoxyCompactList}\small\item\em F\+BO for scene rendering, one for each eye in stereo mode, possibly multisampled. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classPostProcessing_a48c9542ce47deb550eef649007163c91}\label{classPostProcessing_a48c9542ce47deb550eef649007163c91}} 
\hyperlink{classACG_1_1FBO}{A\+C\+G\+::\+F\+BO} \hyperlink{classPostProcessing_a48c9542ce47deb550eef649007163c91}{proc\+F\+B\+O\+\_\+} \mbox{[}2\mbox{]}
\begin{DoxyCompactList}\small\item\em post-\/processing read/write F\+B\+Os, no msaa \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classPostProcessing_af451e7921e5d0c448580e98c420b27b5}\label{classPostProcessing_af451e7921e5d0c448580e98c420b27b5}} 
\hyperlink{classACG_1_1FBO}{A\+C\+G\+::\+F\+BO} \hyperlink{classPostProcessing_af451e7921e5d0c448580e98c420b27b5}{stereo\+F\+B\+O\+\_\+} \mbox{[}2\mbox{]}
\begin{DoxyCompactList}\small\item\em store post processing results for each stereo eyes, input for anaglyph processor, no msaa \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classPostProcessing_a6bcb3f4543828470bdf3b49b02b9d226}\label{classPostProcessing_a6bcb3f4543828470bdf3b49b02b9d226}} 
G\+Luint \hyperlink{classPostProcessing_a6bcb3f4543828470bdf3b49b02b9d226}{backbuffer\+F\+B\+O\+\_\+}
\begin{DoxyCompactList}\small\item\em backbuffer output, not owned by this class \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classPostProcessing_a8805d999e32c30da52431a923dcd26af}\label{classPostProcessing_a8805d999e32c30da52431a923dcd26af}} 
G\+Luint {\bfseries backbuffer\+Target\+\_\+}
\item 
\mbox{\Hypertarget{classPostProcessing_a1432f50ee22d9b9e443dda7780035c1a}\label{classPostProcessing_a1432f50ee22d9b9e443dda7780035c1a}} 
G\+Lint {\bfseries backbuffer\+Viewport\+\_\+} \mbox{[}4\mbox{]}
\item 
\mbox{\Hypertarget{classPostProcessing_ad6be80a2ba031857c017b1c05ba20b0b}\label{classPostProcessing_ad6be80a2ba031857c017b1c05ba20b0b}} 
bool \hyperlink{classPostProcessing_ad6be80a2ba031857c017b1c05ba20b0b}{stereo\+Mode\+\_\+}
\begin{DoxyCompactList}\small\item\em postprocessing in stereo mode \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}


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



\subsection{Member Function Documentation}
\mbox{\Hypertarget{classPostProcessing_a788066adade1462af07c4c0147ac71c0}\label{classPostProcessing_a788066adade1462af07c4c0147ac71c0}} 
\index{Post\+Processing@{Post\+Processing}!post\+Process@{post\+Process}}
\index{post\+Process@{post\+Process}!Post\+Processing@{Post\+Processing}}
\subsubsection{\texorpdfstring{post\+Process()}{postProcess()}}
{\footnotesize\ttfamily void Post\+Processing\+::post\+Process (\begin{DoxyParamCaption}\item[{int}]{\+\_\+viewer\+ID,  }\item[{\hyperlink{classACG_1_1GLState}{A\+C\+G\+::\+G\+L\+State} $\ast$}]{\+\_\+glstate,  }\item[{const \hyperlink{namespaceACG_a574eaee6f4eff166845ff5c654b0b852}{A\+C\+G\+::\+G\+L\+Matrixd} \&}]{\+\_\+modelview,  }\item[{const \hyperlink{namespaceACG_a574eaee6f4eff166845ff5c654b0b852}{A\+C\+G\+::\+G\+L\+Matrixd} \&}]{\+\_\+proj1,  }\item[{const \hyperlink{namespaceACG_a574eaee6f4eff166845ff5c654b0b852}{A\+C\+G\+::\+G\+L\+Matrixd} \&}]{\+\_\+proj2,  }\item[{bool}]{\+\_\+hw\+Open\+G\+L\+Stereo = {\ttfamily false} }\end{DoxyParamCaption})}



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\+GL support or by manually calling resole\+Stereo\+Anaglyph() afterwards.


\begin{DoxyParams}{Parameters}
{\em \+\_\+viewer\+ID} & 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\+FT, G\+L\+\_\+\+B\+A\+C\+K\+\_\+\+R\+I\+G\+HT) \\
\hline
\end{DoxyParams}


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

\mbox{\Hypertarget{classPostProcessing_a4feb4ff851dcff75a28f1fb763e55399}\label{classPostProcessing_a4feb4ff851dcff75a28f1fb763e55399}} 
\index{Post\+Processing@{Post\+Processing}!resolve\+Stereo\+Anyglyph@{resolve\+Stereo\+Anyglyph}}
\index{resolve\+Stereo\+Anyglyph@{resolve\+Stereo\+Anyglyph}!Post\+Processing@{Post\+Processing}}
\subsubsection{\texorpdfstring{resolve\+Stereo\+Anyglyph()}{resolveStereoAnyglyph()}}
{\footnotesize\ttfamily void Post\+Processing\+::resolve\+Stereo\+Anyglyph (\begin{DoxyParamCaption}\item[{int}]{\+\_\+viewer\+ID }\end{DoxyParamCaption})}



Resolve stereo buffers as anaglyph. 

Final textures are combined to an anaglyph image.


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


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

\mbox{\Hypertarget{classPostProcessing_a105ed9dea1db6fda3fb56adeac211b6b}\label{classPostProcessing_a105ed9dea1db6fda3fb56adeac211b6b}} 
\index{Post\+Processing@{Post\+Processing}!setup\+Scene@{setup\+Scene}}
\index{setup\+Scene@{setup\+Scene}!Post\+Processing@{Post\+Processing}}
\subsubsection{\texorpdfstring{setup\+Scene()}{setupScene()}}
{\footnotesize\ttfamily int Post\+Processing\+::setup\+Scene (\begin{DoxyParamCaption}\item[{int}]{\+\_\+viewer\+ID,  }\item[{int}]{\+\_\+width,  }\item[{int}]{\+\_\+height,  }\item[{int}]{\+\_\+samples = {\ttfamily 0},  }\item[{int}]{\+\_\+stereo\+Eye = {\ttfamily -\/1} }\end{DoxyParamCaption})}



Bind fbo for scene rendering. 

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


\begin{DoxyParams}{Parameters}
{\em \+\_\+viewer\+ID} & 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 70 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}
