\hypertarget{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory}{}\section{Ogre\+:\+:R\+T\+Shader\+:\+:Sub\+Render\+State\+Factory Class Reference}
\label{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory}\index{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}}


Abstract factory interface for creating \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} implementation instances.  




{\ttfamily \#include $<$Ogre\+Shader\+Sub\+Render\+State.\+h$>$}



Inheritance diagram for Ogre\+:\+:R\+T\+Shader\+:\+:Sub\+Render\+State\+Factory\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a7482107fd30c95cb68b26ae03e3a3b0e}{Sub\+Render\+State\+Factory} ()
\item 
virtual \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a9b3e25bb3aa398c8068cd5790002899d}{$\sim$\+Sub\+Render\+State\+Factory} ()
\item 
virtual \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} $\ast$ \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a14ce88a3c6833585ec73b77b7536b441}{create\+Instance} () \hyperlink{_ogre_platform_8h_a11162eebee0099930c48076229cc6f04}{O\+G\+R\+E\+\_\+\+N\+O\+D\+I\+S\+C\+A\+RD}
\begin{DoxyCompactList}\small\item\em Create an instance of the \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} sub class it suppose to create. \end{DoxyCompactList}\item 
virtual \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} $\ast$ \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_af417d9241d5ff0ed4d4bb2aa835b872e}{create\+Instance} (\hyperlink{class_ogre_1_1_script_compiler}{Script\+Compiler} $\ast$compiler, \hyperlink{class_ogre_1_1_property_abstract_node}{Property\+Abstract\+Node} $\ast$prop, \hyperlink{class_ogre_1_1_pass}{Pass} $\ast$pass, \hyperlink{class_ogre_1_1_r_t_shader_1_1_s_g_script_translator}{S\+G\+Script\+Translator} $\ast$translator) \hyperlink{_ogre_platform_8h_a11162eebee0099930c48076229cc6f04}{O\+G\+R\+E\+\_\+\+N\+O\+D\+I\+S\+C\+A\+RD}
\begin{DoxyCompactList}\small\item\em Create an instance of the \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} based on script properties. \end{DoxyCompactList}\item 
virtual \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} $\ast$ \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a57deb4c224e304fa290247c56e74890e}{create\+Instance} (\hyperlink{class_ogre_1_1_script_compiler}{Script\+Compiler} $\ast$compiler, \hyperlink{class_ogre_1_1_property_abstract_node}{Property\+Abstract\+Node} $\ast$prop, \hyperlink{class_ogre_1_1_texture_unit_state}{Texture\+Unit\+State} $\ast$tex\+State, \hyperlink{class_ogre_1_1_r_t_shader_1_1_s_g_script_translator}{S\+G\+Script\+Translator} $\ast$translator) \hyperlink{_ogre_platform_8h_a11162eebee0099930c48076229cc6f04}{O\+G\+R\+E\+\_\+\+N\+O\+D\+I\+S\+C\+A\+RD}
\begin{DoxyCompactList}\small\item\em Create an instance of the \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} based on script properties. \end{DoxyCompactList}\item 
virtual \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} $\ast$ \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a54a6f6eba1624fef1de9c20eb7b0a6b5}{create\+Or\+Retrieve\+Instance} (\hyperlink{class_ogre_1_1_r_t_shader_1_1_s_g_script_translator}{S\+G\+Script\+Translator} $\ast$translator)
\begin{DoxyCompactList}\small\item\em Retrieve the previous instance the S\+RS in the script translator or create a new instance if not found. \end{DoxyCompactList}\item 
virtual void \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_ab89670718152dcb35f2428cf5909ed99}{destroy\+All\+Instances} ()
\begin{DoxyCompactList}\small\item\em Destroy all the instances that created by this factory. \end{DoxyCompactList}\item 
virtual void \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a23839e5fc35257e4ffb9076e2aaf9409}{destroy\+Instance} (\hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} $\ast$sub\+Render\+State)
\begin{DoxyCompactList}\small\item\em Destroy the given instance. \end{DoxyCompactList}\item 
virtual const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \& \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a62346d71416d91a03f429ed7404ca450}{get\+Type} () const =0
\begin{DoxyCompactList}\small\item\em Get the type of this sub render state factory. \end{DoxyCompactList}\item 
virtual void \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_ada31909080bae96784504be42d9bd77c}{write\+Instance} (\hyperlink{class_ogre_1_1_material_serializer}{Material\+Serializer} $\ast$ser, \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} $\ast$sub\+Render\+State, \hyperlink{class_ogre_1_1_pass}{Pass} $\ast$src\+Pass, \hyperlink{class_ogre_1_1_pass}{Pass} $\ast$dst\+Pass)
\begin{DoxyCompactList}\small\item\em Write the given sub-\/render state instance using the material serializer. \end{DoxyCompactList}\item 
virtual void \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a10b565ec536c0539e44fb1147ef777a4}{write\+Instance} (\hyperlink{class_ogre_1_1_material_serializer}{Material\+Serializer} $\ast$ser, \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} $\ast$sub\+Render\+State, const \hyperlink{class_ogre_1_1_texture_unit_state}{Texture\+Unit\+State} $\ast$src\+Texture\+Unit, const \hyperlink{class_ogre_1_1_texture_unit_state}{Texture\+Unit\+State} $\ast$dst\+Texture\+Unit)
\begin{DoxyCompactList}\small\item\em Write the given sub-\/render state instance using the material serializer. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Abstract factory interface for creating \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} implementation instances. 

\begin{DoxyRemark}{Remarks}
Plugins or 3rd party applications can add new types of sub render states to the \hyperlink{namespace_ogre_1_1_r_t_shader}{R\+T\+Shader} System by creating subclasses of the \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} class. Because multiple instances of these sub class may be required, a factory class to manage the instances is also required. 
\end{DoxyRemark}
\begin{DoxyParagraph}{}
\hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory}{Sub\+Render\+State\+Factory} subclasses must allow the creation and destruction of \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} subclasses. They must also be registered with the \hyperlink{class_ogre_1_1_r_t_shader_1_1_shader_generator_ac266946244d79b2d4732607ae9479bd9}{Shader\+Generator\+::add\+Sub\+Render\+State\+Factory}. All factories have a type which identifies them and the sub class of \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} they creates. 
\end{DoxyParagraph}


\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a7482107fd30c95cb68b26ae03e3a3b0e}\label{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a7482107fd30c95cb68b26ae03e3a3b0e}} 
\index{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}!Sub\+Render\+State\+Factory@{Sub\+Render\+State\+Factory}}
\index{Sub\+Render\+State\+Factory@{Sub\+Render\+State\+Factory}!Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}}
\subsubsection{\texorpdfstring{Sub\+Render\+State\+Factory()}{SubRenderStateFactory()}}
{\footnotesize\ttfamily Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory\+::\+Sub\+Render\+State\+Factory (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



References O\+G\+R\+E\+\_\+\+N\+O\+D\+I\+S\+C\+A\+RD.

\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a9b3e25bb3aa398c8068cd5790002899d}\label{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a9b3e25bb3aa398c8068cd5790002899d}} 
\index{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}!````~Sub\+Render\+State\+Factory@{$\sim$\+Sub\+Render\+State\+Factory}}
\index{````~Sub\+Render\+State\+Factory@{$\sim$\+Sub\+Render\+State\+Factory}!Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}}
\subsubsection{\texorpdfstring{$\sim$\+Sub\+Render\+State\+Factory()}{~SubRenderStateFactory()}}
{\footnotesize\ttfamily virtual Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory\+::$\sim$\+Sub\+Render\+State\+Factory (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a62346d71416d91a03f429ed7404ca450}\label{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a62346d71416d91a03f429ed7404ca450}} 
\index{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}!get\+Type@{get\+Type}}
\index{get\+Type@{get\+Type}!Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}}
\subsubsection{\texorpdfstring{get\+Type()}{getType()}}
{\footnotesize\ttfamily virtual const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}\& Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory\+::get\+Type (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Get the type of this sub render state factory. 

\begin{DoxyRemark}{Remarks}
The type string should be the same as the type of the \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} sub class it is going to create. 
\end{DoxyRemark}
\begin{DoxySeeAlso}{See also}
\hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state_ae91b7b8f76848d67652b6e5832a27a49}{Sub\+Render\+State\+::get\+Type}. 
\end{DoxySeeAlso}


Implemented in \hyperlink{class_ogre_1_1_r_t_shader_1_1_per_pixel_lighting_factory_aa0a8dce11c787c710b70a132143695af}{Ogre\+::\+R\+T\+Shader\+::\+Per\+Pixel\+Lighting\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_normal_map_lighting_factory_a902d1a5d572ef2fd9e47cf2be227c90d}{Ogre\+::\+R\+T\+Shader\+::\+Normal\+Map\+Lighting\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_texturing_factory_ada66be2fb77792675367a9197672e4e3}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Texturing\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_texture_atlas_sampler_factory_ac84da356c2b4cbac8cf4b1232c942e16}{Ogre\+::\+R\+T\+Shader\+::\+Texture\+Atlas\+Sampler\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_lighting_factory_adbfccf67c65311df0d62fd1bb00e72de}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Lighting\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_layered_blending_factory_afa69547c1ac6acc3429dfc51850b04d2}{Ogre\+::\+R\+T\+Shader\+::\+Layered\+Blending\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_integrated_p_s_s_m3_factory_a1ce2c1603b749326414b4ad1c4a9d711}{Ogre\+::\+R\+T\+Shader\+::\+Integrated\+P\+S\+S\+M3\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_triplanar_texturing_factory_adb316161610e10bfefea06bf0245d861}{Ogre\+::\+R\+T\+Shader\+::\+Triplanar\+Texturing\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_hardware_skinning_factory_ab42229a296355221b714e621dd2b328b}{Ogre\+::\+R\+T\+Shader\+::\+Hardware\+Skinning\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_fog_factory_a3f19a55a579e86da7721b5b98179e5a9}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Fog\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_colour_factory_a46e9c33fd09df67dd9066df78a65dc5e}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Colour\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_alpha_test_factory_a5a4245e48c96662001d5e7f6ecb336d1}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Alpha\+Test\+Factory}, and \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_transform_factory_a698f1429653f4224ff6dd98a98a96604}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Transform\+Factory}.

\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a14ce88a3c6833585ec73b77b7536b441}\label{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a14ce88a3c6833585ec73b77b7536b441}} 
\index{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}!create\+Instance@{create\+Instance}}
\index{create\+Instance@{create\+Instance}!Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}}
\subsubsection{\texorpdfstring{create\+Instance()}{createInstance()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily virtual \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State}$\ast$ Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory\+::create\+Instance (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Create an instance of the \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} sub class it suppose to create. 

\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_af417d9241d5ff0ed4d4bb2aa835b872e}\label{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_af417d9241d5ff0ed4d4bb2aa835b872e}} 
\index{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}!create\+Instance@{create\+Instance}}
\index{create\+Instance@{create\+Instance}!Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}}
\subsubsection{\texorpdfstring{create\+Instance()}{createInstance()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily virtual \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State}$\ast$ Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory\+::create\+Instance (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_script_compiler}{Script\+Compiler} $\ast$}]{compiler,  }\item[{\hyperlink{class_ogre_1_1_property_abstract_node}{Property\+Abstract\+Node} $\ast$}]{prop,  }\item[{\hyperlink{class_ogre_1_1_pass}{Pass} $\ast$}]{pass,  }\item[{\hyperlink{class_ogre_1_1_r_t_shader_1_1_s_g_script_translator}{S\+G\+Script\+Translator} $\ast$}]{translator }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Create an instance of the \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} based on script properties. 

This method is called in the context of script parsing and let this factory the opportunity to create custom \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} instances based on extended script properties. 
\begin{DoxyParams}{Parameters}
{\em compiler} & The compiler instance. \\
\hline
{\em prop} & The abstract property node. \\
\hline
{\em pass} & The pass that is the parent context of this node. \\
\hline
{\em translator} & The translator instance holding existing scripts. \\
\hline
\end{DoxyParams}


Reimplemented in \hyperlink{class_ogre_1_1_r_t_shader_1_1_per_pixel_lighting_factory_a48396468013175a92b69f1270b98e60a}{Ogre\+::\+R\+T\+Shader\+::\+Per\+Pixel\+Lighting\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_normal_map_lighting_factory_aa07c275dea73cf9e26c63fb33646c7d2}{Ogre\+::\+R\+T\+Shader\+::\+Normal\+Map\+Lighting\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_texturing_factory_a68d2bc5a27602fc55d0c1a2799d38eda}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Texturing\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_texture_atlas_sampler_factory_ae1478cf71297ae57d26114b79e7610c0}{Ogre\+::\+R\+T\+Shader\+::\+Texture\+Atlas\+Sampler\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_lighting_factory_a576e3851921a29f531497c37786b8def}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Lighting\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_integrated_p_s_s_m3_factory_a5a3a34e5b29f4380a3cf8cb784acd3e8}{Ogre\+::\+R\+T\+Shader\+::\+Integrated\+P\+S\+S\+M3\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_triplanar_texturing_factory_a3691c3e327fbf3d7236db6110de0cd5c}{Ogre\+::\+R\+T\+Shader\+::\+Triplanar\+Texturing\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_hardware_skinning_factory_aa900dc9ee4c35c9e05a0d572072cc6ea}{Ogre\+::\+R\+T\+Shader\+::\+Hardware\+Skinning\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_fog_factory_a8e4462024776620961286e0ed043655a}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Fog\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_colour_factory_a5e1861380836217f9328bc4f60bfefdc}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Colour\+Factory}, and \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_transform_factory_a9f8dd11053108976403a64f3511930b0}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Transform\+Factory}.

\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a57deb4c224e304fa290247c56e74890e}\label{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a57deb4c224e304fa290247c56e74890e}} 
\index{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}!create\+Instance@{create\+Instance}}
\index{create\+Instance@{create\+Instance}!Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}}
\subsubsection{\texorpdfstring{create\+Instance()}{createInstance()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily virtual \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State}$\ast$ Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory\+::create\+Instance (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_script_compiler}{Script\+Compiler} $\ast$}]{compiler,  }\item[{\hyperlink{class_ogre_1_1_property_abstract_node}{Property\+Abstract\+Node} $\ast$}]{prop,  }\item[{\hyperlink{class_ogre_1_1_texture_unit_state}{Texture\+Unit\+State} $\ast$}]{tex\+State,  }\item[{\hyperlink{class_ogre_1_1_r_t_shader_1_1_s_g_script_translator}{S\+G\+Script\+Translator} $\ast$}]{translator }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Create an instance of the \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} based on script properties. 

This method is called in the context of script parsing and let this factory the opportunity to create custom \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} instances based on extended script properties. 
\begin{DoxyParams}{Parameters}
{\em compiler} & The compiler instance. \\
\hline
{\em prop} & The abstract property node. \\
\hline
{\em tex\+State} & The pass that is the parent context of this node. \\
\hline
{\em translator} & The translator instance holding existing scripts. \\
\hline
\end{DoxyParams}


Reimplemented in \hyperlink{class_ogre_1_1_r_t_shader_1_1_layered_blending_factory_a6a40cb7ee8dfafc528d9d35cd04dba69}{Ogre\+::\+R\+T\+Shader\+::\+Layered\+Blending\+Factory}.

\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a54a6f6eba1624fef1de9c20eb7b0a6b5}\label{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a54a6f6eba1624fef1de9c20eb7b0a6b5}} 
\index{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}!create\+Or\+Retrieve\+Instance@{create\+Or\+Retrieve\+Instance}}
\index{create\+Or\+Retrieve\+Instance@{create\+Or\+Retrieve\+Instance}!Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}}
\subsubsection{\texorpdfstring{create\+Or\+Retrieve\+Instance()}{createOrRetrieveInstance()}}
{\footnotesize\ttfamily virtual \hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State}$\ast$ Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory\+::create\+Or\+Retrieve\+Instance (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_r_t_shader_1_1_s_g_script_translator}{S\+G\+Script\+Translator} $\ast$}]{translator }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Retrieve the previous instance the S\+RS in the script translator or create a new instance if not found. 


\begin{DoxyParams}{Parameters}
{\em translator} & The translator instance holding existing scripts. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a23839e5fc35257e4ffb9076e2aaf9409}\label{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a23839e5fc35257e4ffb9076e2aaf9409}} 
\index{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}!destroy\+Instance@{destroy\+Instance}}
\index{destroy\+Instance@{destroy\+Instance}!Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}}
\subsubsection{\texorpdfstring{destroy\+Instance()}{destroyInstance()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory\+::destroy\+Instance (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} $\ast$}]{sub\+Render\+State }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Destroy the given instance. 


\begin{DoxyParams}{Parameters}
{\em sub\+Render\+State} & The instance to destroy. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_ab89670718152dcb35f2428cf5909ed99}\label{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_ab89670718152dcb35f2428cf5909ed99}} 
\index{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}!destroy\+All\+Instances@{destroy\+All\+Instances}}
\index{destroy\+All\+Instances@{destroy\+All\+Instances}!Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}}
\subsubsection{\texorpdfstring{destroy\+All\+Instances()}{destroyAllInstances()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory\+::destroy\+All\+Instances (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Destroy all the instances that created by this factory. 

\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_ada31909080bae96784504be42d9bd77c}\label{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_ada31909080bae96784504be42d9bd77c}} 
\index{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}!write\+Instance@{write\+Instance}}
\index{write\+Instance@{write\+Instance}!Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}}
\subsubsection{\texorpdfstring{write\+Instance()}{writeInstance()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily virtual void Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory\+::write\+Instance (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_material_serializer}{Material\+Serializer} $\ast$}]{ser,  }\item[{\hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} $\ast$}]{sub\+Render\+State,  }\item[{\hyperlink{class_ogre_1_1_pass}{Pass} $\ast$}]{src\+Pass,  }\item[{\hyperlink{class_ogre_1_1_pass}{Pass} $\ast$}]{dst\+Pass }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Write the given sub-\/render state instance using the material serializer. 

This method is called in the context of material serialization. It is useful for integrating into bigger context of material exporters from various environment that want to take advantage of the RT Shader System. Sub classes of this interface should override in case they need to write custom properties into the script context. 
\begin{DoxyParams}{Parameters}
{\em ser} & The material serializer instance. \\
\hline
{\em sub\+Render\+State} & The sub render state instance to write down. \\
\hline
{\em src\+Pass} & The source pass. \\
\hline
{\em dst\+Pass} & The generated shader based pass. \\
\hline
\end{DoxyParams}


Reimplemented in \hyperlink{class_ogre_1_1_r_t_shader_1_1_per_pixel_lighting_factory_a558d6dce6cf22456fdc71ac6e17a9ffe}{Ogre\+::\+R\+T\+Shader\+::\+Per\+Pixel\+Lighting\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_normal_map_lighting_factory_a9146933d8a0abbca680ae204db22c86f}{Ogre\+::\+R\+T\+Shader\+::\+Normal\+Map\+Lighting\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_texturing_factory_af4928e53ce907e3282753452f692d497}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Texturing\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_texture_atlas_sampler_factory_ac222dd44e1ee51a691d939f2f41508de}{Ogre\+::\+R\+T\+Shader\+::\+Texture\+Atlas\+Sampler\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_lighting_factory_a7bd66ed4824b4330bb02ae06f552cf43}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Lighting\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_hardware_skinning_factory_af5695d48c4d58f91f0939b49a2bbd4cb}{Ogre\+::\+R\+T\+Shader\+::\+Hardware\+Skinning\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_fog_factory_a3aa5f8c428bde322595cafda2880fbc9}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Fog\+Factory}, \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_colour_factory_af707b80a34dd94e60f774804f0e46d19}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Colour\+Factory}, and \hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_transform_factory_a6909fe6ad89136e2b2eaeb7527e18581}{Ogre\+::\+R\+T\+Shader\+::\+F\+F\+P\+Transform\+Factory}.

\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a10b565ec536c0539e44fb1147ef777a4}\label{class_ogre_1_1_r_t_shader_1_1_sub_render_state_factory_a10b565ec536c0539e44fb1147ef777a4}} 
\index{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}!write\+Instance@{write\+Instance}}
\index{write\+Instance@{write\+Instance}!Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory@{Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory}}
\subsubsection{\texorpdfstring{write\+Instance()}{writeInstance()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily virtual void Ogre\+::\+R\+T\+Shader\+::\+Sub\+Render\+State\+Factory\+::write\+Instance (\begin{DoxyParamCaption}\item[{\hyperlink{class_ogre_1_1_material_serializer}{Material\+Serializer} $\ast$}]{ser,  }\item[{\hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State} $\ast$}]{sub\+Render\+State,  }\item[{const \hyperlink{class_ogre_1_1_texture_unit_state}{Texture\+Unit\+State} $\ast$}]{src\+Texture\+Unit,  }\item[{const \hyperlink{class_ogre_1_1_texture_unit_state}{Texture\+Unit\+State} $\ast$}]{dst\+Texture\+Unit }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Write the given sub-\/render state instance using the material serializer. 

This method is called in the context of material serialization. It is useful for integrating into bigger context of material exporters from various environment that want to take advantage of the RT Shader System. Sub classes of this interface should override in case they need to write custom properties into the script context. 
\begin{DoxyParams}{Parameters}
{\em ser} & The material serializer instance. \\
\hline
{\em sub\+Render\+State} & The sub render state instance to write down. \\
\hline
{\em src\+Texture\+Unit} & The source texture unit state. \\
\hline
{\em dst\+Texture\+Unit} & The generated shader based texture unit state. \\
\hline
\end{DoxyParams}


Reimplemented in \hyperlink{class_ogre_1_1_r_t_shader_1_1_layered_blending_factory_a8aee377a93249d8bd462f2986018fb04}{Ogre\+::\+R\+T\+Shader\+::\+Layered\+Blending\+Factory}.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{_ogre_shader_sub_render_state_8h}{Ogre\+Shader\+Sub\+Render\+State.\+h}\end{DoxyCompactItemize}
