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


\mbox{\hyperlink{namespace_ogre}{Ogre}} assumes that there are separate programs to deal with but \mbox{\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}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{class_ogre_1_1_g_l_s_l_program_manager_common_a7ff09badd2e7119d5c05c621809addb9}{$\sim$\+G\+L\+S\+L\+Program\+Manager\+Common}} ()
\item 
void \mbox{\hyperlink{class_ogre_1_1_g_l_s_l_program_manager_common_af0074b30d327b54e5f352ca64612a043}{destroy\+All\+By\+Shader}} (\mbox{\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 \mbox{\hyperlink{class_ogre_1_1_g_l_s_l_program_manager_common_ae8a109b69705dcab009b69f6334c58b1}{extract\+Uniforms\+From\+G\+L\+SL}} (const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&src, \mbox{\hyperlink{struct_ogre_1_1_gpu_named_constants}{Gpu\+Named\+Constants}} \&constant\+Defs, const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&filename)
\begin{DoxyCompactList}\small\item\em Populate a list of uniforms based on \mbox{\hyperlink{namespace_ogre_1_1_g_l_s_l}{G\+L\+SL}} source and store them in \mbox{\hyperlink{struct_ogre_1_1_gpu_named_constants}{Gpu\+Named\+Constants}}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\mbox{\hyperlink{namespace_ogre}{Ogre}} assumes that there are separate programs to deal with but \mbox{\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. 

\mbox{\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 \mbox{\hyperlink{namespace_ogre}{Ogre}} can only handle one program being active in a pass, the \mbox{\hyperlink{namespace_ogre_1_1_g_l_s_l}{G\+L\+SL}} Link Program Manager does the same. The \mbox{\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. 

\doxysubsection{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::GLSLProgramManagerCommon@{Ogre::GLSLProgramManagerCommon}!````~GLSLProgramManagerCommon@{$\sim$GLSLProgramManagerCommon}}
\index{````~GLSLProgramManagerCommon@{$\sim$GLSLProgramManagerCommon}!Ogre::GLSLProgramManagerCommon@{Ogre::GLSLProgramManagerCommon}}
\doxysubsubsection{\texorpdfstring{$\sim$GLSLProgramManagerCommon()}{~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]}}



\doxysubsection{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::GLSLProgramManagerCommon@{Ogre::GLSLProgramManagerCommon}!extractUniformsFromGLSL@{extractUniformsFromGLSL}}
\index{extractUniformsFromGLSL@{extractUniformsFromGLSL}!Ogre::GLSLProgramManagerCommon@{Ogre::GLSLProgramManagerCommon}}
\doxysubsubsection{\texorpdfstring{extractUniformsFromGLSL()}{extractUniformsFromGLSL()}}
{\footnotesize\ttfamily void Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common\+::extract\+Uniforms\+From\+G\+L\+SL (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&}]{src,  }\item[{\mbox{\hyperlink{struct_ogre_1_1_gpu_named_constants}{Gpu\+Named\+Constants}} \&}]{constant\+Defs,  }\item[{const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&}]{filename }\end{DoxyParamCaption})}



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

~\newline
 
\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). ~\newline
 \\
\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::GLSLProgramManagerCommon@{Ogre::GLSLProgramManagerCommon}!destroyAllByShader@{destroyAllByShader}}
\index{destroyAllByShader@{destroyAllByShader}!Ogre::GLSLProgramManagerCommon@{Ogre::GLSLProgramManagerCommon}}
\doxysubsubsection{\texorpdfstring{destroyAllByShader()}{destroyAllByShader()}}
{\footnotesize\ttfamily void Ogre\+::\+G\+L\+S\+L\+Program\+Manager\+Common\+::destroy\+All\+By\+Shader (\begin{DoxyParamCaption}\item[{\mbox{\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 
\mbox{\hyperlink{_ogre_g_l_s_l_program_manager_common_8h}{Ogre\+G\+L\+S\+L\+Program\+Manager\+Common.\+h}}\end{DoxyCompactItemize}
