\hypertarget{class_ogre_1_1_r_t_shader_1_1_render_state}{}\doxysection{Ogre\+::R\+T\+Shader\+::Render\+State Class Reference}
\label{class_ogre_1_1_r_t_shader_1_1_render_state}\index{Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}}


This is a container class for sub render state class.  




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



Inheritance diagram for Ogre\+::R\+T\+Shader\+::Render\+State\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=242pt]{class_ogre_1_1_r_t_shader_1_1_render_state__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_render_state_a9ad5c29c93f7e3852b2bf34ed7d71850}{Render\+State}} ()
\begin{DoxyCompactList}\small\item\em Class default constructor. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_render_state_adbe4e95bc100df25fe3f860869ee53a1}{$\sim$\+Render\+State}} ()
\begin{DoxyCompactList}\small\item\em Class destructor. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_render_state_af66edaf33c654e03ef89f1eaec384a1f}{add\+Template\+Sub\+Render\+State}} (\mbox{\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 Add a template sub render state to this render state. \end{DoxyCompactList}\item 
const \mbox{\hyperlink{namespace_ogre_aecf82a286f08cdf003677d472d33989b}{Vector3i}} \& \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_render_state_aa5f1b258f3a281cfa61f2a232ae6c18d}{get\+Light\+Count}} () const
\begin{DoxyCompactList}\small\item\em Get the light count per light type. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_render_state_ae0a7511e041d89378c5369ba2f42c23d}{get\+Light\+Count\+Auto\+Update}} () const
\begin{DoxyCompactList}\small\item\em Return true if this render state override the light count. \end{DoxyCompactList}\item 
const \mbox{\hyperlink{group___r_t_shader_ga4baf7a0833de141d1d8b8115c75c4794}{Sub\+Render\+State\+List}} \& \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_render_state_af6e6e0ebfd0bab55093172a795fc61e6}{get\+Template\+Sub\+Render\+State\+List}} () const
\begin{DoxyCompactList}\small\item\em Get the list of the template sub render states composing this render state. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_render_state_adf57c1505668d7cd9fc65c33231ee3ff}{remove\+Template\+Sub\+Render\+State}} (\mbox{\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 Remove a template sub render state from this render state. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_render_state_a0ca983d7872dd4af086d73f1685188f1}{reset}} ()
\begin{DoxyCompactList}\small\item\em Reset this render state. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_render_state_acb10ca9d88182aa3051086c5acee656f}{set\+Light\+Count}} (const \mbox{\hyperlink{namespace_ogre_aecf82a286f08cdf003677d472d33989b}{Vector3i}} \&light\+Count)
\begin{DoxyCompactList}\small\item\em Set the light count per light type. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_render_state_acd05f1eaf224a41f89b4c94823b96877}{set\+Light\+Count\+Auto\+Update}} (bool auto\+Update)
\begin{DoxyCompactList}\small\item\em Set the light count auto update state. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Friends}
\begin{DoxyCompactItemize}
\item 
class \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_render_state_a0ebb9db4c085496981b7dbdd61f34fc9}{F\+F\+P\+Render\+State\+Builder}}
\item 
class \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_render_state_ae46e120edae3a1f22dc68ebde7fbcfca}{Program\+Manager}}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This is a container class for sub render state class. 

A render state is defined by the sub render states that compose it. The user should use this interface to define global or per material custom behavior. I.\+E \mbox{\hyperlink{struct_ogre_1_1_r_t_shader_1_1_in}{In}} order to apply per pixel to a specific material one should implement a sub class of \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State}} that perform a per pixel lighting model, get the render state of the target material and add the custom sub class to it. 

\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_render_state_a9ad5c29c93f7e3852b2bf34ed7d71850}\label{class_ogre_1_1_r_t_shader_1_1_render_state_a9ad5c29c93f7e3852b2bf34ed7d71850}} 
\index{Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}!RenderState@{RenderState}}
\index{RenderState@{RenderState}!Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}}
\doxysubsubsection{\texorpdfstring{RenderState()}{RenderState()}}
{\footnotesize\ttfamily Ogre\+::\+R\+T\+Shader\+::\+Render\+State\+::\+Render\+State (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Class default constructor. 

\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_render_state_adbe4e95bc100df25fe3f860869ee53a1}\label{class_ogre_1_1_r_t_shader_1_1_render_state_adbe4e95bc100df25fe3f860869ee53a1}} 
\index{Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}!````~RenderState@{$\sim$RenderState}}
\index{````~RenderState@{$\sim$RenderState}!Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}}
\doxysubsubsection{\texorpdfstring{$\sim$RenderState()}{~RenderState()}}
{\footnotesize\ttfamily virtual Ogre\+::\+R\+T\+Shader\+::\+Render\+State\+::$\sim$\+Render\+State (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Class destructor. 



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_render_state_a0ca983d7872dd4af086d73f1685188f1}\label{class_ogre_1_1_r_t_shader_1_1_render_state_a0ca983d7872dd4af086d73f1685188f1}} 
\index{Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}!reset@{reset}}
\index{reset@{reset}!Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}}
\doxysubsubsection{\texorpdfstring{reset()}{reset()}}
{\footnotesize\ttfamily void Ogre\+::\+R\+T\+Shader\+::\+Render\+State\+::reset (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Reset this render state. 

\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_render_state_af66edaf33c654e03ef89f1eaec384a1f}\label{class_ogre_1_1_r_t_shader_1_1_render_state_af66edaf33c654e03ef89f1eaec384a1f}} 
\index{Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}!addTemplateSubRenderState@{addTemplateSubRenderState}}
\index{addTemplateSubRenderState@{addTemplateSubRenderState}!Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}}
\doxysubsubsection{\texorpdfstring{addTemplateSubRenderState()}{addTemplateSubRenderState()}}
{\footnotesize\ttfamily void Ogre\+::\+R\+T\+Shader\+::\+Render\+State\+::add\+Template\+Sub\+Render\+State (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State}} $\ast$}]{sub\+Render\+State }\end{DoxyParamCaption})}



Add a template sub render state to this render state. 


\begin{DoxyParams}{Parameters}
{\em sub\+Render\+State} & The sub render state template to add. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_render_state_adf57c1505668d7cd9fc65c33231ee3ff}\label{class_ogre_1_1_r_t_shader_1_1_render_state_adf57c1505668d7cd9fc65c33231ee3ff}} 
\index{Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}!removeTemplateSubRenderState@{removeTemplateSubRenderState}}
\index{removeTemplateSubRenderState@{removeTemplateSubRenderState}!Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}}
\doxysubsubsection{\texorpdfstring{removeTemplateSubRenderState()}{removeTemplateSubRenderState()}}
{\footnotesize\ttfamily void Ogre\+::\+R\+T\+Shader\+::\+Render\+State\+::remove\+Template\+Sub\+Render\+State (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_sub_render_state}{Sub\+Render\+State}} $\ast$}]{sub\+Render\+State }\end{DoxyParamCaption})}



Remove a template sub render state from this render state. 


\begin{DoxyParams}{Parameters}
{\em sub\+Render\+State} & The sub render state to remove. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_render_state_af6e6e0ebfd0bab55093172a795fc61e6}\label{class_ogre_1_1_r_t_shader_1_1_render_state_af6e6e0ebfd0bab55093172a795fc61e6}} 
\index{Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}!getTemplateSubRenderStateList@{getTemplateSubRenderStateList}}
\index{getTemplateSubRenderStateList@{getTemplateSubRenderStateList}!Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}}
\doxysubsubsection{\texorpdfstring{getTemplateSubRenderStateList()}{getTemplateSubRenderStateList()}}
{\footnotesize\ttfamily const \mbox{\hyperlink{group___r_t_shader_ga4baf7a0833de141d1d8b8115c75c4794}{Sub\+Render\+State\+List}}\& Ogre\+::\+R\+T\+Shader\+::\+Render\+State\+::get\+Template\+Sub\+Render\+State\+List (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the list of the template sub render states composing this render state. 

\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_render_state_acb10ca9d88182aa3051086c5acee656f}\label{class_ogre_1_1_r_t_shader_1_1_render_state_acb10ca9d88182aa3051086c5acee656f}} 
\index{Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}!setLightCount@{setLightCount}}
\index{setLightCount@{setLightCount}!Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}}
\doxysubsubsection{\texorpdfstring{setLightCount()}{setLightCount()}}
{\footnotesize\ttfamily void Ogre\+::\+R\+T\+Shader\+::\+Render\+State\+::set\+Light\+Count (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_aecf82a286f08cdf003677d472d33989b}{Vector3i}} \&}]{light\+Count }\end{DoxyParamCaption})}



Set the light count per light type. 


\begin{DoxyParams}{Parameters}
{\em light\+Count} & The light count per type. light\+Count\mbox{[}0\mbox{]} defines the point light count. light\+Count\mbox{[}1\mbox{]} defines the directional light count. light\+Count\mbox{[}2\mbox{]} defines the spot light count. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_render_state_aa5f1b258f3a281cfa61f2a232ae6c18d}\label{class_ogre_1_1_r_t_shader_1_1_render_state_aa5f1b258f3a281cfa61f2a232ae6c18d}} 
\index{Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}!getLightCount@{getLightCount}}
\index{getLightCount@{getLightCount}!Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}}
\doxysubsubsection{\texorpdfstring{getLightCount()}{getLightCount()}}
{\footnotesize\ttfamily const \mbox{\hyperlink{namespace_ogre_aecf82a286f08cdf003677d472d33989b}{Vector3i}}\& Ogre\+::\+R\+T\+Shader\+::\+Render\+State\+::get\+Light\+Count (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get the light count per light type. 

light\+Count\mbox{[}0\mbox{]} defines the point light count. light\+Count\mbox{[}1\mbox{]} defines the directional light count. light\+Count\mbox{[}2\mbox{]} defines the spot light count. \mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_render_state_acd05f1eaf224a41f89b4c94823b96877}\label{class_ogre_1_1_r_t_shader_1_1_render_state_acd05f1eaf224a41f89b4c94823b96877}} 
\index{Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}!setLightCountAutoUpdate@{setLightCountAutoUpdate}}
\index{setLightCountAutoUpdate@{setLightCountAutoUpdate}!Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}}
\doxysubsubsection{\texorpdfstring{setLightCountAutoUpdate()}{setLightCountAutoUpdate()}}
{\footnotesize\ttfamily void Ogre\+::\+R\+T\+Shader\+::\+Render\+State\+::set\+Light\+Count\+Auto\+Update (\begin{DoxyParamCaption}\item[{bool}]{auto\+Update }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Set the light count auto update state. 

If the value is false the light count will remain static for the values that were set by the user. If the value is true the light count will be updated from the owner shader generator scheme based on current scene lights. The default is true. \mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_render_state_ae0a7511e041d89378c5369ba2f42c23d}\label{class_ogre_1_1_r_t_shader_1_1_render_state_ae0a7511e041d89378c5369ba2f42c23d}} 
\index{Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}!getLightCountAutoUpdate@{getLightCountAutoUpdate}}
\index{getLightCountAutoUpdate@{getLightCountAutoUpdate}!Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}}
\doxysubsubsection{\texorpdfstring{getLightCountAutoUpdate()}{getLightCountAutoUpdate()}}
{\footnotesize\ttfamily bool Ogre\+::\+R\+T\+Shader\+::\+Render\+State\+::get\+Light\+Count\+Auto\+Update (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return true if this render state override the light count. 

If light count is not overridden it will be updated from the shader generator based on current scene lights. 

\doxysubsection{Friends And Related Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_render_state_ae46e120edae3a1f22dc68ebde7fbcfca}\label{class_ogre_1_1_r_t_shader_1_1_render_state_ae46e120edae3a1f22dc68ebde7fbcfca}} 
\index{Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}!ProgramManager@{ProgramManager}}
\index{ProgramManager@{ProgramManager}!Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}}
\doxysubsubsection{\texorpdfstring{ProgramManager}{ProgramManager}}
{\footnotesize\ttfamily friend class \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_program_manager}{Program\+Manager}}\hspace{0.3cm}{\ttfamily [friend]}}

\mbox{\Hypertarget{class_ogre_1_1_r_t_shader_1_1_render_state_a0ebb9db4c085496981b7dbdd61f34fc9}\label{class_ogre_1_1_r_t_shader_1_1_render_state_a0ebb9db4c085496981b7dbdd61f34fc9}} 
\index{Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}!FFPRenderStateBuilder@{FFPRenderStateBuilder}}
\index{FFPRenderStateBuilder@{FFPRenderStateBuilder}!Ogre::RTShader::RenderState@{Ogre::RTShader::RenderState}}
\doxysubsubsection{\texorpdfstring{FFPRenderStateBuilder}{FFPRenderStateBuilder}}
{\footnotesize\ttfamily friend class \mbox{\hyperlink{class_ogre_1_1_r_t_shader_1_1_f_f_p_render_state_builder}{F\+F\+P\+Render\+State\+Builder}}\hspace{0.3cm}{\ttfamily [friend]}}



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