\hypertarget{class_ogre_1_1_quake3_shader_manager}{}\section{Ogre\+:\+:Quake3\+Shader\+Manager Class Reference}
\label{class_ogre_1_1_quake3_shader_manager}\index{Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}}


Class for managing Quake3 custom shaders.  




{\ttfamily \#include $<$Ogre\+Quake3\+Shader\+Manager.\+h$>$}



Inheritance diagram for Ogre\+:\+:Quake3\+Shader\+Manager\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_ogre_1_1_quake3_shader_manager__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ogre_1_1_quake3_shader_manager_af2d238e94a372c870e1348ce91f9ad10}{Quake3\+Shader\+Manager} ()
\item 
virtual \hyperlink{class_ogre_1_1_quake3_shader_manager_ad533bdc0349934d72a80416f61320332}{$\sim$\+Quake3\+Shader\+Manager} ()
\item 
void \hyperlink{class_ogre_1_1_quake3_shader_manager_aa9db24c7fdb71cc3ffc9b4fbf7272e39}{clear} (void)
\begin{DoxyCompactList}\small\item\em Clear all the current shaders. \end{DoxyCompactList}\item 
\hyperlink{class_ogre_1_1_quake3_shader}{Quake3\+Shader} $\ast$ \hyperlink{class_ogre_1_1_quake3_shader_manager_a9d394f39583ef60f40caef3345b460a5}{create} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&name)
\begin{DoxyCompactList}\small\item\em Create implementation. \end{DoxyCompactList}\item 
\hyperlink{class_ogre_1_1_quake3_shader}{Quake3\+Shader} $\ast$ \hyperlink{class_ogre_1_1_quake3_shader_manager_ad33905e2edfeff5bc41061cdcb5a2f74}{get\+By\+Name} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&name)
\begin{DoxyCompactList}\small\item\em Retrieve a \hyperlink{class_ogre_1_1_quake3_shader}{Quake3\+Shader} by name. \end{DoxyCompactList}\item 
\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} \hyperlink{class_ogre_1_1_quake3_shader_manager_acac48222f4be26855091e87db3b215f1}{get\+Loading\+Order} (void) const
\begin{DoxyCompactList}\small\item\em Gets the relative loading order of scripts of this type. \end{DoxyCompactList}\item 
const \hyperlink{group___general_ga783e5227595f351519627abfb740ec85}{String\+Vector} \& \hyperlink{class_ogre_1_1_quake3_shader_manager_a720714f467d34f5f24179fc2efad36fe}{get\+Script\+Patterns} (void) const
\begin{DoxyCompactList}\small\item\em Gets the file patterns which should be used to find scripts for this class. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_quake3_shader_manager_a7beb32399a0e8b0395024725ca4fbfcd}{parse\+Script} (\hyperlink{namespace_ogre_a8a2a961b4205aacff9c01e81e08d7781}{Data\+Stream\+Ptr} \&stream, const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&group\+Name)
\begin{DoxyCompactList}\small\item\em Parse a script file. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \hyperlink{class_ogre_1_1_quake3_shader_manager}{Quake3\+Shader\+Manager} \& \hyperlink{class_ogre_1_1_quake3_shader_manager_a59f5afd151f77e6ac1b3cab08226956a}{get\+Singleton} (void)
\begin{DoxyCompactList}\small\item\em Get the singleton instance. \end{DoxyCompactList}\item 
static \hyperlink{class_ogre_1_1_quake3_shader_manager}{Quake3\+Shader\+Manager} $\ast$ \hyperlink{class_ogre_1_1_quake3_shader_manager_a61fd79541facb160395e2704634f6db4}{get\+Singleton\+Ptr} (void)
\begin{DoxyCompactList}\small\item\em Get the singleton instance. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Class for managing Quake3 custom shaders. 

Quake3 uses .shader files to define custom shaders, or Materials in Ogre-\/speak. When a surface texture is mentioned in a level file, it includes no file extension meaning that it can either be a standard texture image (+lightmap) if there is only a .jpg or .tga file, or it may refer to a custom shader if a shader with that name is included in one of the .shader files in the scripts/ folder. Because there are multiple shaders per file you have to parse all the .shader files available to know if there is a custom shader available. This class is designed to parse all the .shader files available and save their settings for future use. I choose not to set up \hyperlink{class_ogre_1_1_material}{Material} instances for shaders found since they may or may not be used by a level, so it would be very wasteful to set up Materials since they load texture images for each layer (apart from the lightmap). Once the usage of a shader is confirmed, a full \hyperlink{class_ogre_1_1_material}{Material} instance can be set up from it. Because this is a subclass of \hyperlink{class_ogre_1_1_script_loader}{Script\+Loader}, any files mentioned will be searched for in any path or archive added to the Resource\+Group\+Manager\+::\+W\+O\+R\+L\+D\+\_\+\+G\+R\+O\+U\+P\+\_\+\+N\+A\+ME group. See \hyperlink{class_ogre_1_1_resource_group_manager}{Resource\+Group\+Manager} for details. 

\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_quake3_shader_manager_af2d238e94a372c870e1348ce91f9ad10}\label{class_ogre_1_1_quake3_shader_manager_af2d238e94a372c870e1348ce91f9ad10}} 
\index{Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}!Quake3\+Shader\+Manager@{Quake3\+Shader\+Manager}}
\index{Quake3\+Shader\+Manager@{Quake3\+Shader\+Manager}!Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}}
\subsubsection{\texorpdfstring{Quake3\+Shader\+Manager()}{Quake3ShaderManager()}}
{\footnotesize\ttfamily Ogre\+::\+Quake3\+Shader\+Manager\+::\+Quake3\+Shader\+Manager (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

\mbox{\Hypertarget{class_ogre_1_1_quake3_shader_manager_ad533bdc0349934d72a80416f61320332}\label{class_ogre_1_1_quake3_shader_manager_ad533bdc0349934d72a80416f61320332}} 
\index{Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}!````~Quake3\+Shader\+Manager@{$\sim$\+Quake3\+Shader\+Manager}}
\index{````~Quake3\+Shader\+Manager@{$\sim$\+Quake3\+Shader\+Manager}!Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}}
\subsubsection{\texorpdfstring{$\sim$\+Quake3\+Shader\+Manager()}{~Quake3ShaderManager()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Quake3\+Shader\+Manager\+::$\sim$\+Quake3\+Shader\+Manager (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_quake3_shader_manager_a720714f467d34f5f24179fc2efad36fe}\label{class_ogre_1_1_quake3_shader_manager_a720714f467d34f5f24179fc2efad36fe}} 
\index{Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}!get\+Script\+Patterns@{get\+Script\+Patterns}}
\index{get\+Script\+Patterns@{get\+Script\+Patterns}!Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}}
\subsubsection{\texorpdfstring{get\+Script\+Patterns()}{getScriptPatterns()}}
{\footnotesize\ttfamily const \hyperlink{group___general_ga783e5227595f351519627abfb740ec85}{String\+Vector}\& Ogre\+::\+Quake3\+Shader\+Manager\+::get\+Script\+Patterns (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Gets the file patterns which should be used to find scripts for this class. 

\begin{DoxyRemark}{Remarks}
This method is called when a resource group is loaded if you use \hyperlink{class_ogre_1_1_resource_group_manager_aafd69be90e1774f2a4b34c4e6dcaa38a}{Resource\+Group\+Manager\+::\+\_\+register\+Script\+Loader}. 
\end{DoxyRemark}
\begin{DoxyReturn}{Returns}
A list of file patterns, in the order they should be searched in. 
\end{DoxyReturn}


Implements \hyperlink{class_ogre_1_1_script_loader_a78189fd757a233f34d5d272f76f6abf6}{Ogre\+::\+Script\+Loader}.

\mbox{\Hypertarget{class_ogre_1_1_quake3_shader_manager_a7beb32399a0e8b0395024725ca4fbfcd}\label{class_ogre_1_1_quake3_shader_manager_a7beb32399a0e8b0395024725ca4fbfcd}} 
\index{Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}!parse\+Script@{parse\+Script}}
\index{parse\+Script@{parse\+Script}!Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}}
\subsubsection{\texorpdfstring{parse\+Script()}{parseScript()}}
{\footnotesize\ttfamily void Ogre\+::\+Quake3\+Shader\+Manager\+::parse\+Script (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_a8a2a961b4205aacff9c01e81e08d7781}{Data\+Stream\+Ptr} \&}]{stream,  }\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&}]{group\+Name }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Parse a script file. 


\begin{DoxyParams}{Parameters}
{\em stream} & Weak reference to a data stream which is the source of the script \\
\hline
{\em group\+Name} & The name of a resource group which should be used if any resources are created during the parse of this script. \\
\hline
\end{DoxyParams}


Implements \hyperlink{class_ogre_1_1_script_loader_a6bd73a15503c5cb29ed8b7e264e12293}{Ogre\+::\+Script\+Loader}.

\mbox{\Hypertarget{class_ogre_1_1_quake3_shader_manager_acac48222f4be26855091e87db3b215f1}\label{class_ogre_1_1_quake3_shader_manager_acac48222f4be26855091e87db3b215f1}} 
\index{Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}!get\+Loading\+Order@{get\+Loading\+Order}}
\index{get\+Loading\+Order@{get\+Loading\+Order}!Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}}
\subsubsection{\texorpdfstring{get\+Loading\+Order()}{getLoadingOrder()}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real} Ogre\+::\+Quake3\+Shader\+Manager\+::get\+Loading\+Order (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Gets the relative loading order of scripts of this type. 

\begin{DoxyRemark}{Remarks}
There are dependencies between some kinds of scripts, and to enforce this all implementors of this interface must define a loading order. 
\end{DoxyRemark}
\begin{DoxyReturn}{Returns}
A value representing the relative loading order of these scripts compared to other script users, where higher values load later. 
\end{DoxyReturn}


Implements \hyperlink{class_ogre_1_1_script_loader_a12af311e1399d48c02c57bb545b50497}{Ogre\+::\+Script\+Loader}.

\mbox{\Hypertarget{class_ogre_1_1_quake3_shader_manager_a9d394f39583ef60f40caef3345b460a5}\label{class_ogre_1_1_quake3_shader_manager_a9d394f39583ef60f40caef3345b460a5}} 
\index{Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}!create@{create}}
\index{create@{create}!Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}}
\subsubsection{\texorpdfstring{create()}{create()}}
{\footnotesize\ttfamily \hyperlink{class_ogre_1_1_quake3_shader}{Quake3\+Shader}$\ast$ Ogre\+::\+Quake3\+Shader\+Manager\+::create (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&}]{name }\end{DoxyParamCaption})}



Create implementation. 

\mbox{\Hypertarget{class_ogre_1_1_quake3_shader_manager_aa9db24c7fdb71cc3ffc9b4fbf7272e39}\label{class_ogre_1_1_quake3_shader_manager_aa9db24c7fdb71cc3ffc9b4fbf7272e39}} 
\index{Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}!clear@{clear}}
\index{clear@{clear}!Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}}
\subsubsection{\texorpdfstring{clear()}{clear()}}
{\footnotesize\ttfamily void Ogre\+::\+Quake3\+Shader\+Manager\+::clear (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Clear all the current shaders. 

\mbox{\Hypertarget{class_ogre_1_1_quake3_shader_manager_ad33905e2edfeff5bc41061cdcb5a2f74}\label{class_ogre_1_1_quake3_shader_manager_ad33905e2edfeff5bc41061cdcb5a2f74}} 
\index{Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}!get\+By\+Name@{get\+By\+Name}}
\index{get\+By\+Name@{get\+By\+Name}!Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}}
\subsubsection{\texorpdfstring{get\+By\+Name()}{getByName()}}
{\footnotesize\ttfamily \hyperlink{class_ogre_1_1_quake3_shader}{Quake3\+Shader}$\ast$ Ogre\+::\+Quake3\+Shader\+Manager\+::get\+By\+Name (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \&}]{name }\end{DoxyParamCaption})}



Retrieve a \hyperlink{class_ogre_1_1_quake3_shader}{Quake3\+Shader} by name. 

\mbox{\Hypertarget{class_ogre_1_1_quake3_shader_manager_a59f5afd151f77e6ac1b3cab08226956a}\label{class_ogre_1_1_quake3_shader_manager_a59f5afd151f77e6ac1b3cab08226956a}} 
\index{Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}!get\+Singleton@{get\+Singleton}}
\index{get\+Singleton@{get\+Singleton}!Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}}
\subsubsection{\texorpdfstring{get\+Singleton()}{getSingleton()}}
{\footnotesize\ttfamily static \hyperlink{class_ogre_1_1_quake3_shader_manager}{Quake3\+Shader\+Manager}\& Ogre\+::\+Quake3\+Shader\+Manager\+::get\+Singleton (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Get the singleton instance. 

\mbox{\Hypertarget{class_ogre_1_1_quake3_shader_manager_a61fd79541facb160395e2704634f6db4}\label{class_ogre_1_1_quake3_shader_manager_a61fd79541facb160395e2704634f6db4}} 
\index{Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}!get\+Singleton\+Ptr@{get\+Singleton\+Ptr}}
\index{get\+Singleton\+Ptr@{get\+Singleton\+Ptr}!Ogre\+::\+Quake3\+Shader\+Manager@{Ogre\+::\+Quake3\+Shader\+Manager}}
\subsubsection{\texorpdfstring{get\+Singleton\+Ptr()}{getSingletonPtr()}}
{\footnotesize\ttfamily static \hyperlink{class_ogre_1_1_quake3_shader_manager}{Quake3\+Shader\+Manager}$\ast$ Ogre\+::\+Quake3\+Shader\+Manager\+::get\+Singleton\+Ptr (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Get the singleton instance. 



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{_ogre_quake3_shader_manager_8h}{Ogre\+Quake3\+Shader\+Manager.\+h}\end{DoxyCompactItemize}
