\hypertarget{class_ogre_1_1_g_l_state_cache_manager_common}{}\section{Ogre\+:\+:G\+L\+State\+Cache\+Manager\+Common Class Reference}
\label{class_ogre_1_1_g_l_state_cache_manager_common}\index{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common@{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common}}


An in memory cache of the Open\+GL state.  




{\ttfamily \#include $<$Ogre\+G\+L\+State\+Cache\+Manager\+Common.\+h$>$}



Inheritance diagram for Ogre\+:\+:G\+L\+State\+Cache\+Manager\+Common\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_ogre_1_1_g_l_state_cache_manager_common__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \hyperlink{class_ogre_1_1_g_l_state_cache_manager_common_a8fd43e7bcc25c811bceb407e00994a68}{$\sim$\+G\+L\+State\+Cache\+Manager\+Common} ()
\item 
\hyperlink{namespace_ogre_a07f1f7c1d84d58c9beae02e1ebb945e4}{uchar} $\ast$ \hyperlink{class_ogre_1_1_g_l_state_cache_manager_common_aed0a1810279e037e0c7b12f9ffc0c65e}{get\+Colour\+Mask} ()
\begin{DoxyCompactList}\small\item\em Gets the current colour mask setting. \end{DoxyCompactList}\item 
\hyperlink{namespace_ogre_a07f1f7c1d84d58c9beae02e1ebb945e4}{uchar} \hyperlink{class_ogre_1_1_g_l_state_cache_manager_common_a6176362b2fcb20cccafc9821951778ee}{get\+Depth\+Mask} () const
\begin{DoxyCompactList}\small\item\em Gets the current depth mask setting. \end{DoxyCompactList}\item 
\hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32} \hyperlink{class_ogre_1_1_g_l_state_cache_manager_common_a01d78d20763464f69a157b0c81ba454f}{get\+Stencil\+Mask} (void) const
\begin{DoxyCompactList}\small\item\em Gets the current stencil mask. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_g_l_state_cache_manager_common_a8cf8ecd02d3f7d9ecbda6decdabc09d8}{get\+Viewport} (int $\ast$array)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
An in memory cache of the Open\+GL state. 

State changes can be particularly expensive time wise. This is because a change requires Open\+GL to re-\/evaluate and update the state machine. Because of the general purpose nature of O\+G\+RE we often set the state for a specific texture, material, buffer, etc. But this may be the same as the current status of the state machine and is therefore redundant and causes unnecessary work to be performed by Open\+GL. \begin{DoxyParagraph}{}
Instead we are caching the state so that we can check whether it actually does need to be updated. This leads to improved performance all around and can be somewhat dramatic in some cases. 
\end{DoxyParagraph}


\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_g_l_state_cache_manager_common_a8fd43e7bcc25c811bceb407e00994a68}\label{class_ogre_1_1_g_l_state_cache_manager_common_a8fd43e7bcc25c811bceb407e00994a68}} 
\index{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common@{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common}!````~G\+L\+State\+Cache\+Manager\+Common@{$\sim$\+G\+L\+State\+Cache\+Manager\+Common}}
\index{````~G\+L\+State\+Cache\+Manager\+Common@{$\sim$\+G\+L\+State\+Cache\+Manager\+Common}!Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common@{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common}}
\subsubsection{\texorpdfstring{$\sim$\+G\+L\+State\+Cache\+Manager\+Common()}{~GLStateCacheManagerCommon()}}
{\footnotesize\ttfamily virtual Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common\+::$\sim$\+G\+L\+State\+Cache\+Manager\+Common (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_g_l_state_cache_manager_common_a8cf8ecd02d3f7d9ecbda6decdabc09d8}\label{class_ogre_1_1_g_l_state_cache_manager_common_a8cf8ecd02d3f7d9ecbda6decdabc09d8}} 
\index{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common@{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common}!get\+Viewport@{get\+Viewport}}
\index{get\+Viewport@{get\+Viewport}!Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common@{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common}}
\subsubsection{\texorpdfstring{get\+Viewport()}{getViewport()}}
{\footnotesize\ttfamily void Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common\+::get\+Viewport (\begin{DoxyParamCaption}\item[{int $\ast$}]{array }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

\mbox{\Hypertarget{class_ogre_1_1_g_l_state_cache_manager_common_aed0a1810279e037e0c7b12f9ffc0c65e}\label{class_ogre_1_1_g_l_state_cache_manager_common_aed0a1810279e037e0c7b12f9ffc0c65e}} 
\index{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common@{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common}!get\+Colour\+Mask@{get\+Colour\+Mask}}
\index{get\+Colour\+Mask@{get\+Colour\+Mask}!Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common@{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common}}
\subsubsection{\texorpdfstring{get\+Colour\+Mask()}{getColourMask()}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_a07f1f7c1d84d58c9beae02e1ebb945e4}{uchar}$\ast$ Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common\+::get\+Colour\+Mask (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Gets the current colour mask setting. 

\begin{DoxyReturn}{Returns}
An array containing the mask in R\+G\+BA order. 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_g_l_state_cache_manager_common_a6176362b2fcb20cccafc9821951778ee}\label{class_ogre_1_1_g_l_state_cache_manager_common_a6176362b2fcb20cccafc9821951778ee}} 
\index{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common@{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common}!get\+Depth\+Mask@{get\+Depth\+Mask}}
\index{get\+Depth\+Mask@{get\+Depth\+Mask}!Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common@{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common}}
\subsubsection{\texorpdfstring{get\+Depth\+Mask()}{getDepthMask()}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_a07f1f7c1d84d58c9beae02e1ebb945e4}{uchar} Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common\+::get\+Depth\+Mask (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Gets the current depth mask setting. 

\begin{DoxyReturn}{Returns}
The current depth mask. 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_g_l_state_cache_manager_common_a01d78d20763464f69a157b0c81ba454f}\label{class_ogre_1_1_g_l_state_cache_manager_common_a01d78d20763464f69a157b0c81ba454f}} 
\index{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common@{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common}!get\+Stencil\+Mask@{get\+Stencil\+Mask}}
\index{get\+Stencil\+Mask@{get\+Stencil\+Mask}!Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common@{Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common}}
\subsubsection{\texorpdfstring{get\+Stencil\+Mask()}{getStencilMask()}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32} Ogre\+::\+G\+L\+State\+Cache\+Manager\+Common\+::get\+Stencil\+Mask (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Gets the current stencil mask. 

\begin{DoxyReturn}{Returns}
The stencil mask. 
\end{DoxyReturn}


The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{_ogre_g_l_state_cache_manager_common_8h}{Ogre\+G\+L\+State\+Cache\+Manager\+Common.\+h}\end{DoxyCompactItemize}
