\hypertarget{class_ogre_1_1_g_l_s_l_program_manager_common}{}\section{Ogre\+:\+:G\+L\+S\+L\+Program\+Manager\+Common Class Reference}
\label{class_ogre_1_1_g_l_s_l_program_manager_common}\index{Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common@{Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common}}


\hyperlink{namespace_ogre}{Ogre} assumes that there are separate programs to deal with but \hyperlink{namespace_ogre_1_1_g_l_s_l}{G\+L\+SL} has one program object that represents the active shader objects during a rendering state.  




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



Inheritance diagram for Ogre\+:\+:G\+L\+S\+L\+Program\+Manager\+Common\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_ogre_1_1_g_l_s_l_program_manager_common__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \hyperlink{class_ogre_1_1_g_l_s_l_program_manager_common_a7ff09badd2e7119d5c05c621809addb9}{$\sim$\+G\+L\+S\+L\+Program\+Manager\+Common} ()
\item 
void \hyperlink{class_ogre_1_1_g_l_s_l_program_manager_common_af0074b30d327b54e5f352ca64612a043}{destroy\+All\+By\+Shader} (\hyperlink{class_ogre_1_1_g_l_s_l_shader_common}{G\+L\+S\+L\+Shader\+Common} $\ast$shader)
\begin{DoxyCompactList}\small\item\em Destroy all programs which referencing this shader. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_g_l_s_l_program_manager_common_ae8a109b69705dcab009b69f6334c58b1}{extract\+Uniforms\+From\+G\+L\+SL} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&src, \hyperlink{struct_ogre_1_1_gpu_named_constants}{Gpu\+Named\+Constants} \&constant\+Defs, const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&filename)
\begin{DoxyCompactList}\small\item\em Populate a list of uniforms based on \hyperlink{namespace_ogre_1_1_g_l_s_l}{G\+L\+SL} source and store them in \hyperlink{struct_ogre_1_1_gpu_named_constants}{Gpu\+Named\+Constants}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{namespace_ogre}{Ogre} assumes that there are separate programs to deal with but \hyperlink{namespace_ogre_1_1_g_l_s_l}{G\+L\+SL} has one program object that represents the active shader objects during a rendering state. 

\hyperlink{namespace_ogre_1_1_g_l_s_l}{G\+L\+SL} shader objects are compiled separately and then attached to a program object and then the program object is linked. Since \hyperlink{namespace_ogre}{Ogre} can only handle one program being active in a pass, the \hyperlink{namespace_ogre_1_1_g_l_s_l}{G\+L\+SL} Link Program Manager does the same. The \hyperlink{namespace_ogre_1_1_g_l_s_l}{G\+L\+SL} Link program manager acts as a state machine and activates a program object based on the active programs. Previously created program objects are stored along with a unique key in a hash\+\_\+map for quick retrieval the next time the program object is required. 

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



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_g_l_s_l_program_manager_common_ae8a109b69705dcab009b69f6334c58b1}\label{class_ogre_1_1_g_l_s_l_program_manager_common_ae8a109b69705dcab009b69f6334c58b1}} 
\index{Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common@{Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common}!extract\+Uniforms\+From\+G\+L\+SL@{extract\+Uniforms\+From\+G\+L\+SL}}
\index{extract\+Uniforms\+From\+G\+L\+SL@{extract\+Uniforms\+From\+G\+L\+SL}!Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common@{Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common}}
\subsubsection{\texorpdfstring{extract\+Uniforms\+From\+G\+L\+S\+L()}{extractUniformsFromGLSL()}}
{\footnotesize\ttfamily void Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common\+::extract\+Uniforms\+From\+G\+L\+SL (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&}]{src,  }\item[{\hyperlink{struct_ogre_1_1_gpu_named_constants}{Gpu\+Named\+Constants} \&}]{constant\+Defs,  }\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&}]{filename }\end{DoxyParamCaption})}



Populate a list of uniforms based on \hyperlink{namespace_ogre_1_1_g_l_s_l}{G\+L\+SL} source and store them in \hyperlink{struct_ogre_1_1_gpu_named_constants}{Gpu\+Named\+Constants}. 


\begin{DoxyParams}{Parameters}
{\em src} & Reference to the source code. \\
\hline
{\em constant\+Defs} & The defs to populate (will not be cleared before adding, clear it yourself before calling this if that\textquotesingle{}s what you want). \\
\hline
{\em filename} & The file name this came from, for logging errors. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_g_l_s_l_program_manager_common_af0074b30d327b54e5f352ca64612a043}\label{class_ogre_1_1_g_l_s_l_program_manager_common_af0074b30d327b54e5f352ca64612a043}} 
\index{Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common@{Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common}!destroy\+All\+By\+Shader@{destroy\+All\+By\+Shader}}
\index{destroy\+All\+By\+Shader@{destroy\+All\+By\+Shader}!Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common@{Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common}}
\subsubsection{\texorpdfstring{destroy\+All\+By\+Shader()}{destroyAllByShader()}}
{\footnotesize\ttfamily void Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common\+::destroy\+All\+By\+Shader (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_g_l_s_l_shader_common}{G\+L\+S\+L\+Shader\+Common} $\ast$}]{shader }\end{DoxyParamCaption})}



Destroy all programs which referencing this shader. 



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