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


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}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_quake3_shader_manager_af2d238e94a372c870e1348ce91f9ad10}{Quake3\+Shader\+Manager}} ()
\item 
virtual \mbox{\hyperlink{class_ogre_1_1_quake3_shader_manager_ad533bdc0349934d72a80416f61320332}{$\sim$\+Quake3\+Shader\+Manager}} ()
\item 
void \mbox{\hyperlink{class_ogre_1_1_quake3_shader_manager_aa9db24c7fdb71cc3ffc9b4fbf7272e39}{clear}} (void)
\begin{DoxyCompactList}\small\item\em Clear all the current shaders. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_quake3_shader}{Quake3\+Shader}} $\ast$ \mbox{\hyperlink{class_ogre_1_1_quake3_shader_manager_a9d394f39583ef60f40caef3345b460a5}{create}} (const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&name)
\begin{DoxyCompactList}\small\item\em Create implementation. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_quake3_shader}{Quake3\+Shader}} $\ast$ \mbox{\hyperlink{class_ogre_1_1_quake3_shader_manager_ad33905e2edfeff5bc41061cdcb5a2f74}{get\+By\+Name}} (const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&name)
\begin{DoxyCompactList}\small\item\em Retrieve a \mbox{\hyperlink{class_ogre_1_1_quake3_shader}{Quake3\+Shader}} by name. \end{DoxyCompactList}\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\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 \mbox{\hyperlink{group___general_ga783e5227595f351519627abfb740ec85}{String\+Vector}} \& \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_quake3_shader_manager_a7beb32399a0e8b0395024725ca4fbfcd}{parse\+Script}} (\mbox{\hyperlink{namespace_ogre_a8a2a961b4205aacff9c01e81e08d7781}{Data\+Stream\+Ptr}} \&stream, const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&group\+Name)
\begin{DoxyCompactList}\small\item\em Parse a script file. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \mbox{\hyperlink{class_ogre_1_1_quake3_shader_manager}{Quake3\+Shader\+Manager}} \& \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_quake3_shader_manager}{Quake3\+Shader\+Manager}} $\ast$ \mbox{\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}


\doxysubsection{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 \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_material}{Material}} instance can be set up from it. Because this is a subclass of \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_resource_group_manager}{Resource\+Group\+Manager}} for details. 

\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_quake3_shader_manager_af2d238e94a372c870e1348ce91f9ad10}\label{class_ogre_1_1_quake3_shader_manager_af2d238e94a372c870e1348ce91f9ad10}} 
\index{Ogre::Quake3ShaderManager@{Ogre::Quake3ShaderManager}!Quake3ShaderManager@{Quake3ShaderManager}}
\index{Quake3ShaderManager@{Quake3ShaderManager}!Ogre::Quake3ShaderManager@{Ogre::Quake3ShaderManager}}
\doxysubsubsection{\texorpdfstring{Quake3ShaderManager()}{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::Quake3ShaderManager@{Ogre::Quake3ShaderManager}!````~Quake3ShaderManager@{$\sim$Quake3ShaderManager}}
\index{````~Quake3ShaderManager@{$\sim$Quake3ShaderManager}!Ogre::Quake3ShaderManager@{Ogre::Quake3ShaderManager}}
\doxysubsubsection{\texorpdfstring{$\sim$Quake3ShaderManager()}{~Quake3ShaderManager()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Quake3\+Shader\+Manager\+::$\sim$\+Quake3\+Shader\+Manager (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_quake3_shader_manager_a720714f467d34f5f24179fc2efad36fe}\label{class_ogre_1_1_quake3_shader_manager_a720714f467d34f5f24179fc2efad36fe}} 
\index{Ogre::Quake3ShaderManager@{Ogre::Quake3ShaderManager}!getScriptPatterns@{getScriptPatterns}}
\index{getScriptPatterns@{getScriptPatterns}!Ogre::Quake3ShaderManager@{Ogre::Quake3ShaderManager}}
\doxysubsubsection{\texorpdfstring{getScriptPatterns()}{getScriptPatterns()}}
{\footnotesize\ttfamily const \mbox{\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 \mbox{\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 \mbox{\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::Quake3ShaderManager@{Ogre::Quake3ShaderManager}!parseScript@{parseScript}}
\index{parseScript@{parseScript}!Ogre::Quake3ShaderManager@{Ogre::Quake3ShaderManager}}
\doxysubsubsection{\texorpdfstring{parseScript()}{parseScript()}}
{\footnotesize\ttfamily void Ogre\+::\+Quake3\+Shader\+Manager\+::parse\+Script (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_a8a2a961b4205aacff9c01e81e08d7781}{Data\+Stream\+Ptr}} \&}]{stream,  }\item[{const \mbox{\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 \mbox{\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::Quake3ShaderManager@{Ogre::Quake3ShaderManager}!getLoadingOrder@{getLoadingOrder}}
\index{getLoadingOrder@{getLoadingOrder}!Ogre::Quake3ShaderManager@{Ogre::Quake3ShaderManager}}
\doxysubsubsection{\texorpdfstring{getLoadingOrder()}{getLoadingOrder()}}
{\footnotesize\ttfamily \mbox{\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 \mbox{\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::Quake3ShaderManager@{Ogre::Quake3ShaderManager}!create@{create}}
\index{create@{create}!Ogre::Quake3ShaderManager@{Ogre::Quake3ShaderManager}}
\doxysubsubsection{\texorpdfstring{create()}{create()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_quake3_shader}{Quake3\+Shader}}$\ast$ Ogre\+::\+Quake3\+Shader\+Manager\+::create (\begin{DoxyParamCaption}\item[{const \mbox{\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::Quake3ShaderManager@{Ogre::Quake3ShaderManager}!clear@{clear}}
\index{clear@{clear}!Ogre::Quake3ShaderManager@{Ogre::Quake3ShaderManager}}
\doxysubsubsection{\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::Quake3ShaderManager@{Ogre::Quake3ShaderManager}!getByName@{getByName}}
\index{getByName@{getByName}!Ogre::Quake3ShaderManager@{Ogre::Quake3ShaderManager}}
\doxysubsubsection{\texorpdfstring{getByName()}{getByName()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_ogre_1_1_quake3_shader}{Quake3\+Shader}}$\ast$ Ogre\+::\+Quake3\+Shader\+Manager\+::get\+By\+Name (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&}]{name }\end{DoxyParamCaption})}



Retrieve a \mbox{\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::Quake3ShaderManager@{Ogre::Quake3ShaderManager}!getSingleton@{getSingleton}}
\index{getSingleton@{getSingleton}!Ogre::Quake3ShaderManager@{Ogre::Quake3ShaderManager}}
\doxysubsubsection{\texorpdfstring{getSingleton()}{getSingleton()}}
{\footnotesize\ttfamily static \mbox{\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::Quake3ShaderManager@{Ogre::Quake3ShaderManager}!getSingletonPtr@{getSingletonPtr}}
\index{getSingletonPtr@{getSingletonPtr}!Ogre::Quake3ShaderManager@{Ogre::Quake3ShaderManager}}
\doxysubsubsection{\texorpdfstring{getSingletonPtr()}{getSingletonPtr()}}
{\footnotesize\ttfamily static \mbox{\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 
\mbox{\hyperlink{_ogre_quake3_shader_manager_8h}{Ogre\+Quake3\+Shader\+Manager.\+h}}\end{DoxyCompactItemize}
