\hypertarget{struct_ogre_1_1_pass_1_1_hash_func}{}\doxysection{Ogre\+::Pass\+::Hash\+Func Struct Reference}
\label{struct_ogre_1_1_pass_1_1_hash_func}\index{Ogre::Pass::HashFunc@{Ogre::Pass::HashFunc}}


Definition of a functor for calculating the hashcode of a \mbox{\hyperlink{class_ogre_1_1_pass}{Pass}}.  




{\ttfamily \#include $<$Ogre\+Pass.\+h$>$}

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{struct_ogre_1_1_pass_1_1_hash_func_a01cf55085247cf9db23648dcc3be4daa}{$\sim$\+Hash\+Func}} ()
\begin{DoxyCompactList}\small\item\em Need virtual destructor in case subclasses use it. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32}} \mbox{\hyperlink{struct_ogre_1_1_pass_1_1_hash_func_a400b09fb165aef788325d193a7c3d2a0}{operator()}} (const \mbox{\hyperlink{class_ogre_1_1_pass}{Pass}} $\ast$p) const =0
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Definition of a functor for calculating the hashcode of a \mbox{\hyperlink{class_ogre_1_1_pass}{Pass}}. 

\begin{DoxyRemark}{Remarks}
The hashcode of a \mbox{\hyperlink{class_ogre_1_1_pass}{Pass}} is used to sort Passes for rendering, in order to reduce the number of render state changes. Each \mbox{\hyperlink{class_ogre_1_1_pass}{Pass}} represents a single unique set of states, but by ordering them, state changes can be minimised between passes. An implementation of this functor should order passes so that the elements that you want to keep constant are sorted next to each other.
\end{DoxyRemark}
Hash format is 32-\/bit, divided as follows (high to low bits) bits purpose 4 \mbox{\hyperlink{class_ogre_1_1_pass}{Pass}} index (i.\+e. max 16 passes!). 28 \mbox{\hyperlink{class_ogre_1_1_pass}{Pass}} contents

\begin{DoxyNote}{Note}
the high bits returned by this function will get overwritten
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
Pass\+::set\+Hash\+Func 
\end{DoxySeeAlso}


\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{struct_ogre_1_1_pass_1_1_hash_func_a01cf55085247cf9db23648dcc3be4daa}\label{struct_ogre_1_1_pass_1_1_hash_func_a01cf55085247cf9db23648dcc3be4daa}} 
\index{Ogre::Pass::HashFunc@{Ogre::Pass::HashFunc}!````~HashFunc@{$\sim$HashFunc}}
\index{````~HashFunc@{$\sim$HashFunc}!Ogre::Pass::HashFunc@{Ogre::Pass::HashFunc}}
\doxysubsubsection{\texorpdfstring{$\sim$HashFunc()}{~HashFunc()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Pass\+::\+Hash\+Func\+::$\sim$\+Hash\+Func (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Need virtual destructor in case subclasses use it. 



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{struct_ogre_1_1_pass_1_1_hash_func_a400b09fb165aef788325d193a7c3d2a0}\label{struct_ogre_1_1_pass_1_1_hash_func_a400b09fb165aef788325d193a7c3d2a0}} 
\index{Ogre::Pass::HashFunc@{Ogre::Pass::HashFunc}!operator()@{operator()}}
\index{operator()@{operator()}!Ogre::Pass::HashFunc@{Ogre::Pass::HashFunc}}
\doxysubsubsection{\texorpdfstring{operator()()}{operator()()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32}} Ogre\+::\+Pass\+::\+Hash\+Func\+::operator() (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_pass}{Pass}} $\ast$}]{p }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{_ogre_pass_8h}{Ogre\+Pass.\+h}}\end{DoxyCompactItemize}
