\hypertarget{a01168}{\section{A\+C\+G\+:\+:Shader\+Prog\+Generator Class Reference}
\label{a01168}\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
}


{\ttfamily \#include $<$A\+C\+G/\+G\+L/\+Shader\+Generator.\+hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a01168_a444eb2da25c49507e3a775e7b12d985d}{Shader\+Prog\+Generator} (const \hyperlink{a01158}{Shader\+Gen\+Desc} $\ast$\+\_\+desc)
\item 
\hyperlink{a01168_a39526258a8629e5dd9572fd11e098e1a}{Shader\+Prog\+Generator} (const \hyperlink{a01158}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const std\+::vector$<$ unsigned int $>$ \&\+\_\+modifier\+I\+Ds)
\item 
\hyperlink{a01168_af256b2f7d6f8a58cb9088d226285e09d}{Shader\+Prog\+Generator} (const \hyperlink{a01158}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const std\+::vector$<$ unsigned int $>$ $\ast$\+\_\+modifier\+I\+Ds)
\item 
\hyperlink{a01168_ad7c3b2e3d6d556b8e7ce2aafeb48a444}{Shader\+Prog\+Generator} (const \hyperlink{a01158}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const unsigned int $\ast$\+\_\+modifier\+I\+Ds, unsigned int \+\_\+num\+Modifiers)
\item 
\hyperlink{a01168_a144d0131e1927491a188c62f59dd151b}{Shader\+Prog\+Generator} (const \hyperlink{a01158}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, \hyperlink{a01163}{Shader\+Modifier} $\ast$const $\ast$\+\_\+modifiers, unsigned int \+\_\+num\+Modifiers)
\item 
\hyperlink{a01168_aef610cc6356faf8be29f4ed20768d337}{Shader\+Prog\+Generator} (const \hyperlink{a01158}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const std\+::vector$<$ \hyperlink{a01163}{Shader\+Modifier} $\ast$ $>$ \&\+\_\+modifiers)
\item 
\hyperlink{a01168_a6d1140d280366fd167a2d634fca04168}{Shader\+Prog\+Generator} (const \hyperlink{a01158}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const std\+::vector$<$ \hyperlink{a01163}{Shader\+Modifier} $\ast$ $>$ $\ast$\+\_\+modifiers)
\item 
\hypertarget{a01168_a35b6a1b0a1bf902e0d903a46a1201f68}{void {\bfseries save\+Vertex\+Sh\+To\+File} (const char $\ast$\+\_\+file\+Name)}\label{a01168_a35b6a1b0a1bf902e0d903a46a1201f68}

\item 
\hypertarget{a01168_a8b69059f56349a5cef9266c891f6beec}{void {\bfseries save\+Geometry\+Sh\+To\+File} (const char $\ast$\+\_\+file\+Name)}\label{a01168_a8b69059f56349a5cef9266c891f6beec}

\item 
\hypertarget{a01168_ac6a2e63f7eec4188b99b919fdc72ec3c}{void {\bfseries save\+Fragment\+Sh\+To\+File} (const char $\ast$\+\_\+file\+Name)}\label{a01168_ac6a2e63f7eec4188b99b919fdc72ec3c}

\item 
\hypertarget{a01168_afa4a7e6b177673dae1fcf0530a0ad5af}{const Q\+String\+List \& \hyperlink{a01168_afa4a7e6b177673dae1fcf0530a0ad5af}{get\+Vertex\+Shader\+Code} ()}\label{a01168_afa4a7e6b177673dae1fcf0530a0ad5af}

\begin{DoxyCompactList}\small\item\em Returns generated vertex shader code. \end{DoxyCompactList}\item 
\hypertarget{a01168_a12ec9ed7a350f7f3b21c0bcb1c0456c9}{const Q\+String\+List \& \hyperlink{a01168_a12ec9ed7a350f7f3b21c0bcb1c0456c9}{get\+Tess\+Control\+Shader\+Code} ()}\label{a01168_a12ec9ed7a350f7f3b21c0bcb1c0456c9}

\begin{DoxyCompactList}\small\item\em Returns generated vertex shader code. \end{DoxyCompactList}\item 
\hypertarget{a01168_a0f9459f8e95881e1cfe6f283d4727847}{const Q\+String\+List \& \hyperlink{a01168_a0f9459f8e95881e1cfe6f283d4727847}{get\+Tess\+Evaluation\+Shader\+Code} ()}\label{a01168_a0f9459f8e95881e1cfe6f283d4727847}

\begin{DoxyCompactList}\small\item\em Returns generated tessellation control shader code. \end{DoxyCompactList}\item 
\hypertarget{a01168_a3a28c9b4614c843d74749d6cd7a58ad1}{const Q\+String\+List \& \hyperlink{a01168_a3a28c9b4614c843d74749d6cd7a58ad1}{get\+Geometry\+Shader\+Code} ()}\label{a01168_a3a28c9b4614c843d74749d6cd7a58ad1}

\begin{DoxyCompactList}\small\item\em Returns generated tessellation evaluation shader code. \end{DoxyCompactList}\item 
\hypertarget{a01168_aa14e645f026678892fd3202c8bfb27f5}{const Q\+String\+List \& \hyperlink{a01168_aa14e645f026678892fd3202c8bfb27f5}{get\+Fragment\+Shader\+Code} ()}\label{a01168_aa14e645f026678892fd3202c8bfb27f5}

\begin{DoxyCompactList}\small\item\em Returns generated fragment shader code. \end{DoxyCompactList}\item 
\hypertarget{a01168_a69da4e39d14960bb0bae495b8c580b4e}{int \hyperlink{a01168_a69da4e39d14960bb0bae495b8c580b4e}{get\+Num\+Active\+Modifiers} () const }\label{a01168_a69da4e39d14960bb0bae495b8c580b4e}

\begin{DoxyCompactList}\small\item\em Get the number of active modifiers. \end{DoxyCompactList}\item 
\hypertarget{a01168_a2e99fe86312a22a2fbd87c276c723ead}{\hyperlink{a01163}{Shader\+Modifier} $\ast$ \hyperlink{a01168_a2e99fe86312a22a2fbd87c276c723ead}{get\+Active\+Modifier} (int \+\_\+i)}\label{a01168_a2e99fe86312a22a2fbd87c276c723ead}

\begin{DoxyCompactList}\small\item\em Get active modfiers for this program. \end{DoxyCompactList}\item 
\hypertarget{a01168_aa4937ae23a527f6c10da61ba5f127932}{bool \hyperlink{a01168_aa4937ae23a527f6c10da61ba5f127932}{has\+Geometry\+Shader} () const }\label{a01168_aa4937ae23a527f6c10da61ba5f127932}

\begin{DoxyCompactList}\small\item\em check whether there is a geometry shader present \end{DoxyCompactList}\item 
\hypertarget{a01168_aadb8f22da8bd5ee1e2b57d0d9dbe6c50}{bool \hyperlink{a01168_aadb8f22da8bd5ee1e2b57d0d9dbe6c50}{has\+Tess\+Control\+Shader} () const }\label{a01168_aadb8f22da8bd5ee1e2b57d0d9dbe6c50}

\begin{DoxyCompactList}\small\item\em check whether there is a tess-\/control shader present \end{DoxyCompactList}\item 
\hypertarget{a01168_aaddbc9784312fd66ac403c37b1e92e7d}{bool \hyperlink{a01168_aaddbc9784312fd66ac403c37b1e92e7d}{has\+Tess\+Evaluation\+Shader} () const }\label{a01168_aaddbc9784312fd66ac403c37b1e92e7d}

\begin{DoxyCompactList}\small\item\em check whether there is a tess-\/evaluation shader present \end{DoxyCompactList}\item 
\hypertarget{a01168_ace9ca42dd4f3b53e9b7d0377625b396a}{void \hyperlink{a01168_ace9ca42dd4f3b53e9b7d0377625b396a}{generate\+Shaders} ()}\label{a01168_ace9ca42dd4f3b53e9b7d0377625b396a}

\begin{DoxyCompactList}\small\item\em Generates the shader code. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static void \hyperlink{a01168_a8665cdfa3e85f49c59b426839017dd3f}{set\+Shader\+Dir} (Q\+String \+\_\+dir)
\item 
static Q\+String \hyperlink{a01168_a4ddc1ae85719dc115b52a5e971dc0ccb}{get\+Shader\+Dir} ()
\item 
static unsigned int \hyperlink{a01168_a96b207003d2c540b0b676c0fa267a2ab}{register\+Modifier} (\hyperlink{a01163}{Shader\+Modifier} $\ast$\+\_\+modifier)
\begin{DoxyCompactList}\small\item\em Shader modifiers have to be registered before they can be used. They also must remain allocated for the rest of the applications runtime. Use a combination of modifier-\/\+I\+Ds in the constructor of Shader\+Prog\+Gen to active them. \end{DoxyCompactList}\item 
static bool \hyperlink{a01168_a835d94ee397f52df3abc931c66a21637}{load\+String\+List\+From\+File} (Q\+String \+\_\+file\+Name, Q\+String\+List $\ast$\+\_\+out)
\begin{DoxyCompactList}\small\item\em Load a text file as string list. \end{DoxyCompactList}\item 
static Q\+String \hyperlink{a01168_aea29c67f1200dc760696c525eee0e23d}{get\+Abs\+File\+Path} (Q\+String \+\_\+file\+Name)
\begin{DoxyCompactList}\small\item\em Convert a filename to an absolute filename. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01168_a5e0de303fd074032ebbd53eea5001fdf}{void \hyperlink{a01168_a5e0de303fd074032ebbd53eea5001fdf}{load\+Shader\+Template\+From\+File} ()}\label{a01168_a5e0de303fd074032ebbd53eea5001fdf}

\begin{DoxyCompactList}\small\item\em Loads external shader templates. \end{DoxyCompactList}\item 
\hypertarget{a01168_a568797ef766eb9354a6b4aefd544ecd4}{void \hyperlink{a01168_a568797ef766eb9354a6b4aefd544ecd4}{scan\+Shader\+Template} (Q\+String\+List \&\+\_\+template\+Src, Q\+String \+\_\+template\+Filename, Q\+String\+List $\ast$\+\_\+out\+Layout\+Directives=0)}\label{a01168_a568797ef766eb9354a6b4aefd544ecd4}

\begin{DoxyCompactList}\small\item\em Scans loaded shader template for requested inputs, glsl version or includes. \end{DoxyCompactList}\item 
\hypertarget{a01168_aa8fdf07ab3a8a7cb358c8114f32a2c39}{void \hyperlink{a01168_aa8fdf07ab3a8a7cb358c8114f32a2c39}{init} (const \hyperlink{a01158}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, \hyperlink{a01163}{Shader\+Modifier} $\ast$const $\ast$\+\_\+modifiers, unsigned int \+\_\+num\+Active\+Mods)}\label{a01168_aa8fdf07ab3a8a7cb358c8114f32a2c39}

\begin{DoxyCompactList}\small\item\em Called in constructor. \end{DoxyCompactList}\item 
\hypertarget{a01168_a746b5e14ea84a4b0cc47add338eeed29}{void {\bfseries init} (const \hyperlink{a01158}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const unsigned int $\ast$\+\_\+modifiers, unsigned int \+\_\+num\+Active\+Mods)}\label{a01168_a746b5e14ea84a4b0cc47add338eeed29}

\item 
\hypertarget{a01168_a4c9929c86935bf0710f65d3a8bfc024a}{void {\bfseries build\+Vertex\+Shader} ()}\label{a01168_a4c9929c86935bf0710f65d3a8bfc024a}

\item 
\hypertarget{a01168_a8a80789d5702f9d1f1117e5dbad942ff}{void {\bfseries build\+Tess\+Control\+Shader} ()}\label{a01168_a8a80789d5702f9d1f1117e5dbad942ff}

\item 
\hypertarget{a01168_a4aa5dc7f9f88e92cf753646a9a11605f}{void {\bfseries build\+Tess\+Eval\+Shader} ()}\label{a01168_a4aa5dc7f9f88e92cf753646a9a11605f}

\item 
\hypertarget{a01168_aeb22d9f44ecf13bba464a513b30e4fb8}{void {\bfseries build\+Geometry\+Shader} ()}\label{a01168_aeb22d9f44ecf13bba464a513b30e4fb8}

\item 
\hypertarget{a01168_aea605ad7a52c13c7f452c9ee53d17a56}{void {\bfseries build\+Fragment\+Shader} ()}\label{a01168_aea605ad7a52c13c7f452c9ee53d17a56}

\item 
\hypertarget{a01168_ab825628e06970d72cd3bab6bc78c56ae}{void {\bfseries add\+Vertex\+Begin\+Code} (Q\+String\+List $\ast$\+\_\+code)}\label{a01168_ab825628e06970d72cd3bab6bc78c56ae}

\item 
\hypertarget{a01168_a5a65295876fac87356d2aaa70f992f5b}{void {\bfseries add\+Vertex\+End\+Code} (Q\+String\+List $\ast$\+\_\+code)}\label{a01168_a5a65295876fac87356d2aaa70f992f5b}

\item 
\hypertarget{a01168_a631f5ea24744ef0cb83cd5caa619dbd5}{void {\bfseries add\+Fragment\+Begin\+Code} (Q\+String\+List $\ast$\+\_\+code)}\label{a01168_a631f5ea24744ef0cb83cd5caa619dbd5}

\item 
\hypertarget{a01168_a403d4b7d3d028b08f2d7d2d3b553446e}{void {\bfseries add\+Fragment\+End\+Code} (Q\+String\+List $\ast$\+\_\+code)}\label{a01168_a403d4b7d3d028b08f2d7d2d3b553446e}

\item 
void \hyperlink{a01168_adbb15fbd0d7220746fa3a9e6a8a79dd2}{add\+Lighting\+Functions} (Q\+String\+List $\ast$\+\_\+code)
\begin{DoxyCompactList}\small\item\em Adds lighting definition functions. \end{DoxyCompactList}\item 
\hypertarget{a01168_ac5fbdd783628da06986dcf2b0e9c15f6}{void \hyperlink{a01168_ac5fbdd783628da06986dcf2b0e9c15f6}{add\+Lighting\+Code} (Q\+String\+List $\ast$\+\_\+code)}\label{a01168_ac5fbdd783628da06986dcf2b0e9c15f6}

\begin{DoxyCompactList}\small\item\em Adds lighting function calls to code. \end{DoxyCompactList}\item 
\hypertarget{a01168_a974bc12084e0131a602fae207b0665c0}{void \hyperlink{a01168_a974bc12084e0131a602fae207b0665c0}{modify\+Lighting\+Code} (Q\+String\+List $\ast$\+\_\+code, \hyperlink{a01163}{Shader\+Modifier} $\ast$\+\_\+modifier)}\label{a01168_a974bc12084e0131a602fae207b0665c0}

\begin{DoxyCompactList}\small\item\em Calls lighting modifier for each light. \end{DoxyCompactList}\item 
\hypertarget{a01168_a6e26ef2d0fa1d4761c95b47ba545e1d3}{void \hyperlink{a01168_a6e26ef2d0fa1d4761c95b47ba545e1d3}{add\+Tex\+Gen\+Code} (Q\+String\+List $\ast$\+\_\+code, bool \+\_\+fragment\+Shader)}\label{a01168_a6e26ef2d0fa1d4761c95b47ba545e1d3}

\begin{DoxyCompactList}\small\item\em Add texture coordinate generation code. \end{DoxyCompactList}\item 
int \hyperlink{a01168_adcd7fe00defdf5387c5058c59537b4c7}{check\+For\+Includes} (Q\+String \+\_\+str, \hyperlink{a01160}{Shader\+Generator} $\ast$\+\_\+gen, Q\+String \+\_\+include\+Path)
\item 
int \hyperlink{a01168_a6cb1deea62905eb409da6209d808bfb6}{check\+For\+Includes} (Q\+String \+\_\+str, Q\+String\+List $\ast$\+\_\+out\+Import, Q\+String \+\_\+include\+Path)
\item 
\hypertarget{a01168_a408ad7f8b0465ed0b63d73c2098f8e3a}{void \hyperlink{a01168_a408ad7f8b0465ed0b63d73c2098f8e3a}{init\+Gen\+Defines} (\hyperlink{a01160}{Shader\+Generator} $\ast$\+\_\+gen)}\label{a01168_a408ad7f8b0465ed0b63d73c2098f8e3a}

\begin{DoxyCompactList}\small\item\em provide generated defines to shader \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01168_a91d8d41d2bf8e0086876bcc87e6ba5ac}{static Q\+String \hyperlink{a01168_a91d8d41d2bf8e0086876bcc87e6ba5ac}{get\+Path\+Name} (Q\+String \+\_\+str\+File\+Name)}\label{a01168_a91d8d41d2bf8e0086876bcc87e6ba5ac}

\begin{DoxyCompactList}\small\item\em returns path to \+\_\+str\+File\+Name without last slash \end{DoxyCompactList}\item 
\hypertarget{a01168_aa7db2dfdc7f0c24e1fa8a3e6030b9e9d}{static void {\bfseries load\+Lighting\+Functions} ()}\label{a01168_aa7db2dfdc7f0c24e1fa8a3e6030b9e9d}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01168_affadd9c546567a2f0c38c738791fd6ba}{\hyperlink{a01160}{Shader\+Generator} $\ast$ {\bfseries vertex\+\_\+}}\label{a01168_affadd9c546567a2f0c38c738791fd6ba}

\item 
\hypertarget{a01168_ae9a23855de4a5c9df38458827acbb398}{\hyperlink{a01160}{Shader\+Generator} $\ast$ {\bfseries tess\+Control\+\_\+}}\label{a01168_ae9a23855de4a5c9df38458827acbb398}

\item 
\hypertarget{a01168_a339784f3c983d254db0d382f3b488973}{\hyperlink{a01160}{Shader\+Generator} $\ast$ {\bfseries tess\+Eval\+\_\+}}\label{a01168_a339784f3c983d254db0d382f3b488973}

\item 
\hypertarget{a01168_a2d3a9a7ff609b4361995638661471292}{\hyperlink{a01160}{Shader\+Generator} $\ast$ {\bfseries geometry\+\_\+}}\label{a01168_a2d3a9a7ff609b4361995638661471292}

\item 
\hypertarget{a01168_a3fe7d05cb599310d4e3dab194e37d56c}{\hyperlink{a01160}{Shader\+Generator} $\ast$ {\bfseries fragment\+\_\+}}\label{a01168_a3fe7d05cb599310d4e3dab194e37d56c}

\item 
\hypertarget{a01168_aa37152a28c33860387619a5cd9e8485f}{Q\+String\+List {\bfseries vertex\+Template\+\_\+}}\label{a01168_aa37152a28c33860387619a5cd9e8485f}

\item 
\hypertarget{a01168_a7fceb870776af0ffe2395074c1a35059}{Q\+String\+List {\bfseries tess\+Control\+Template\+\_\+}}\label{a01168_a7fceb870776af0ffe2395074c1a35059}

\item 
\hypertarget{a01168_a2e4845e3d9c13d9f26e2b3b9710439f6}{Q\+String\+List {\bfseries tess\+Eval\+Template\+\_\+}}\label{a01168_a2e4845e3d9c13d9f26e2b3b9710439f6}

\item 
\hypertarget{a01168_a03789be0477e706f57a0da7c95f20fba}{Q\+String\+List {\bfseries geometry\+Template\+\_\+}}\label{a01168_a03789be0477e706f57a0da7c95f20fba}

\item 
\hypertarget{a01168_acb73c9619748d9a9afcb0aee99c75814}{Q\+String\+List {\bfseries fragment\+Template\+\_\+}}\label{a01168_acb73c9619748d9a9afcb0aee99c75814}

\item 
\hypertarget{a01168_a327e4d15cf9870818dbaa5b132279edd}{\hyperlink{a01158}{Shader\+Gen\+Desc} {\bfseries desc\+\_\+}}\label{a01168_a327e4d15cf9870818dbaa5b132279edd}

\item 
\hypertarget{a01168_adf49f7b9b76c9d650638a9b9727697d0}{std\+::vector$<$ \hyperlink{a01163}{Shader\+Modifier} $\ast$ $>$ {\bfseries active\+Mods\+\_\+}}\label{a01168_adf49f7b9b76c9d650638a9b9727697d0}

\item 
\hypertarget{a01168_a307f3941b10e4abfa357f8386ddbe8dc}{Q\+String \hyperlink{a01168_a307f3941b10e4abfa357f8386ddbe8dc}{vertex\+Shader\+File\+\_\+}}\label{a01168_a307f3941b10e4abfa357f8386ddbe8dc}

\begin{DoxyCompactList}\small\item\em path + filename to shader templates \end{DoxyCompactList}\item 
\hypertarget{a01168_a327c02ba26b52ba44d0b98bb450450d3}{Q\+String {\bfseries tess\+Control\+Shader\+File\+\_\+}}\label{a01168_a327c02ba26b52ba44d0b98bb450450d3}

\item 
\hypertarget{a01168_a1188bfe2dc04b5a502887aff3b24e4d0}{Q\+String {\bfseries tess\+Eval\+Shader\+File\+\_\+}}\label{a01168_a1188bfe2dc04b5a502887aff3b24e4d0}

\item 
\hypertarget{a01168_a1531c9f37e4412f0a01ec5f1f9b069f9}{Q\+String {\bfseries geometry\+Shader\+File\+\_\+}}\label{a01168_a1531c9f37e4412f0a01ec5f1f9b069f9}

\item 
\hypertarget{a01168_a0297112fe3ff286baac0be752a4d99db}{Q\+String {\bfseries fragment\+Shader\+File\+\_\+}}\label{a01168_a0297112fe3ff286baac0be752a4d99db}

\item 
\hypertarget{a01168_a2009405060ac2c67fbf3d73279918296}{Q\+String\+List \hyperlink{a01168_a2009405060ac2c67fbf3d73279918296}{tess\+Control\+Layout\+\_\+}}\label{a01168_a2009405060ac2c67fbf3d73279918296}

\begin{DoxyCompactList}\small\item\em layout() directives scanned from loaded templates \end{DoxyCompactList}\item 
\hypertarget{a01168_a25f77e8e79dfaef5104efc10f04ab030}{Q\+String\+List {\bfseries tess\+Eval\+Layout\+\_\+}}\label{a01168_a25f77e8e79dfaef5104efc10f04ab030}

\item 
\hypertarget{a01168_a007e7d990317ad284cec473561533ee2}{\hyperlink{a00488}{Shader\+Generator\+::\+Default\+I\+O\+Desc} \hyperlink{a01168_a007e7d990317ad284cec473561533ee2}{io\+Desc\+\_\+}}\label{a01168_a007e7d990317ad284cec473561533ee2}

\begin{DoxyCompactList}\small\item\em default I\+O descriptor for the vertex shader \end{DoxyCompactList}\item 
\hypertarget{a01168_ac94c27f587e148d023f8660c4a327f4c}{bool \hyperlink{a01168_ac94c27f587e148d023f8660c4a327f4c}{renormalize\+Lighting\+\_\+}}\label{a01168_ac94c27f587e148d023f8660c4a327f4c}

\begin{DoxyCompactList}\small\item\em renormalize before lighting, default false, can be activated via \char`\"{}\#define S\+G\+\_\+\+R\+E\+Q\+U\+E\+S\+T\+\_\+\+R\+E\+N\+O\+R\+M\+A\+L\+I\+Z\+E\char`\"{} \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01168_a3a919288b84267061e25041d7b2ac3bd}{static int \hyperlink{a01168_a3a919288b84267061e25041d7b2ac3bd}{num\+Registered\+Modifiers\+\_\+} = 0}\label{a01168_a3a919288b84267061e25041d7b2ac3bd}

\begin{DoxyCompactList}\small\item\em registered shader modifier \end{DoxyCompactList}\item 
\hypertarget{a01168_af72283b571b96306c19de3432ee5852b}{static std\+::vector\\*
$<$ \hyperlink{a01163}{Shader\+Modifier} $\ast$ $>$ {\bfseries registered\+Modifiers\+\_\+}}\label{a01168_af72283b571b96306c19de3432ee5852b}

\item 
\hypertarget{a01168_a8274659152b28f22aac0eafaefa61c12}{static Q\+String {\bfseries shader\+Dir\+\_\+}}\label{a01168_a8274659152b28f22aac0eafaefa61c12}

\item 
\hypertarget{a01168_aad51f60af031b2fa92049f558b53307b}{static Q\+String\+List {\bfseries lighting\+Code\+\_\+}}\label{a01168_aad51f60af031b2fa92049f558b53307b}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{a01168}{Shader\+Prog\+Generator} is responsible for generating a matching pair of vertex and fragment shaders. 

Definition at line 1152 of file Shader\+Generator.\+hh.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{a01168_a444eb2da25c49507e3a775e7b12d985d}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!Shader\+Prog\+Generator@{Shader\+Prog\+Generator}}
\index{Shader\+Prog\+Generator@{Shader\+Prog\+Generator}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{Shader\+Prog\+Generator}]{\setlength{\rightskip}{0pt plus 5cm}A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (
\begin{DoxyParamCaption}
\item[{const {\bf Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc}
\end{DoxyParamCaption}
)}}\label{a01168_a444eb2da25c49507e3a775e7b12d985d}

\begin{DoxyParams}{Parameters}
{\em \+\_\+desc} & description-\/set of shader properties. \\
\hline
\end{DoxyParams}


Definition at line 834 of file Shader\+Generator.\+cc.

\hypertarget{a01168_a39526258a8629e5dd9572fd11e098e1a}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!Shader\+Prog\+Generator@{Shader\+Prog\+Generator}}
\index{Shader\+Prog\+Generator@{Shader\+Prog\+Generator}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{Shader\+Prog\+Generator}]{\setlength{\rightskip}{0pt plus 5cm}A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (
\begin{DoxyParamCaption}
\item[{const {\bf Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc, }
\item[{const std\+::vector$<$ unsigned int $>$ \&}]{\+\_\+modifier\+I\+Ds}
\end{DoxyParamCaption}
)}}\label{a01168_a39526258a8629e5dd9572fd11e098e1a}

\begin{DoxyParams}{Parameters}
{\em \+\_\+desc} & description-\/set of shader properties. \\
\hline
{\em \+\_\+modifier\+I\+Ds} & array of modifier-\/\+I\+Ds that should be used for the generation. \\
\hline
\end{DoxyParams}


Definition at line 846 of file Shader\+Generator.\+cc.

\hypertarget{a01168_af256b2f7d6f8a58cb9088d226285e09d}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!Shader\+Prog\+Generator@{Shader\+Prog\+Generator}}
\index{Shader\+Prog\+Generator@{Shader\+Prog\+Generator}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{Shader\+Prog\+Generator}]{\setlength{\rightskip}{0pt plus 5cm}A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (
\begin{DoxyParamCaption}
\item[{const {\bf Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc, }
\item[{const std\+::vector$<$ unsigned int $>$ $\ast$}]{\+\_\+modifier\+I\+Ds}
\end{DoxyParamCaption}
)}}\label{a01168_af256b2f7d6f8a58cb9088d226285e09d}

\begin{DoxyParams}{Parameters}
{\em \+\_\+desc} & description-\/set of shader properties. \\
\hline
{\em \+\_\+modifier\+I\+Ds} & array of modifier-\/\+I\+Ds that should be used for the generation. \\
\hline
\end{DoxyParams}


Definition at line 852 of file Shader\+Generator.\+cc.

\hypertarget{a01168_ad7c3b2e3d6d556b8e7ce2aafeb48a444}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!Shader\+Prog\+Generator@{Shader\+Prog\+Generator}}
\index{Shader\+Prog\+Generator@{Shader\+Prog\+Generator}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{Shader\+Prog\+Generator}]{\setlength{\rightskip}{0pt plus 5cm}A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (
\begin{DoxyParamCaption}
\item[{const {\bf Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc, }
\item[{const unsigned int $\ast$}]{\+\_\+modifier\+I\+Ds, }
\item[{unsigned int}]{\+\_\+num\+Modifiers}
\end{DoxyParamCaption}
)}}\label{a01168_ad7c3b2e3d6d556b8e7ce2aafeb48a444}

\begin{DoxyParams}{Parameters}
{\em \+\_\+desc} & description-\/set of shader properties. \\
\hline
{\em \+\_\+modifier\+I\+Ds} & array of modifier-\/\+I\+Ds that should be used for the generation. \\
\hline
{\em \+\_\+num\+Modifiers} & number of modifiers in \+\_\+modifier\+I\+Ds \\
\hline
\end{DoxyParams}


Definition at line 840 of file Shader\+Generator.\+cc.

\hypertarget{a01168_a144d0131e1927491a188c62f59dd151b}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!Shader\+Prog\+Generator@{Shader\+Prog\+Generator}}
\index{Shader\+Prog\+Generator@{Shader\+Prog\+Generator}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{Shader\+Prog\+Generator}]{\setlength{\rightskip}{0pt plus 5cm}A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (
\begin{DoxyParamCaption}
\item[{const {\bf Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc, }
\item[{{\bf Shader\+Modifier} $\ast$const $\ast$}]{\+\_\+modifiers, }
\item[{unsigned int}]{\+\_\+num\+Modifiers}
\end{DoxyParamCaption}
)}}\label{a01168_a144d0131e1927491a188c62f59dd151b}

\begin{DoxyParams}{Parameters}
{\em \+\_\+desc} & description-\/set of shader properties. \\
\hline
{\em \+\_\+modifiers} & array of modifiers that should be used for the generation. \\
\hline
{\em \+\_\+num\+Modifiers} & number of modifiers in \+\_\+modifier\+I\+Ds \\
\hline
\end{DoxyParams}


Definition at line 859 of file Shader\+Generator.\+cc.

\hypertarget{a01168_aef610cc6356faf8be29f4ed20768d337}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!Shader\+Prog\+Generator@{Shader\+Prog\+Generator}}
\index{Shader\+Prog\+Generator@{Shader\+Prog\+Generator}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{Shader\+Prog\+Generator}]{\setlength{\rightskip}{0pt plus 5cm}A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (
\begin{DoxyParamCaption}
\item[{const {\bf Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc, }
\item[{const std\+::vector$<$ {\bf Shader\+Modifier} $\ast$ $>$ \&}]{\+\_\+modifiers}
\end{DoxyParamCaption}
)}}\label{a01168_aef610cc6356faf8be29f4ed20768d337}

\begin{DoxyParams}{Parameters}
{\em \+\_\+desc} & description-\/set of shader properties. \\
\hline
{\em \+\_\+modifiers} & array of modifiers that should be used for the generation. \\
\hline
\end{DoxyParams}


Definition at line 865 of file Shader\+Generator.\+cc.

\hypertarget{a01168_a6d1140d280366fd167a2d634fca04168}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!Shader\+Prog\+Generator@{Shader\+Prog\+Generator}}
\index{Shader\+Prog\+Generator@{Shader\+Prog\+Generator}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{Shader\+Prog\+Generator}]{\setlength{\rightskip}{0pt plus 5cm}A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (
\begin{DoxyParamCaption}
\item[{const {\bf Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc, }
\item[{const std\+::vector$<$ {\bf Shader\+Modifier} $\ast$ $>$ $\ast$}]{\+\_\+modifiers}
\end{DoxyParamCaption}
)}}\label{a01168_a6d1140d280366fd167a2d634fca04168}

\begin{DoxyParams}{Parameters}
{\em \+\_\+desc} & description-\/set of shader properties. \\
\hline
{\em \+\_\+modifiers} & array of modifiers that should be used for the generation. \\
\hline
\end{DoxyParams}


Definition at line 871 of file Shader\+Generator.\+cc.



\subsection{Member Function Documentation}
\hypertarget{a01168_adbb15fbd0d7220746fa3a9e6a8a79dd2}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!add\+Lighting\+Functions@{add\+Lighting\+Functions}}
\index{add\+Lighting\+Functions@{add\+Lighting\+Functions}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{add\+Lighting\+Functions}]{\setlength{\rightskip}{0pt plus 5cm}void A\+C\+G\+::\+Shader\+Prog\+Generator\+::add\+Lighting\+Functions (
\begin{DoxyParamCaption}
\item[{Q\+String\+List $\ast$}]{\+\_\+code}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{a01168_adbb15fbd0d7220746fa3a9e6a8a79dd2}


Adds lighting definition functions. 

Lit\+Point\+Light() ... 

Definition at line 1926 of file Shader\+Generator.\+cc.

\hypertarget{a01168_adcd7fe00defdf5387c5058c59537b4c7}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!check\+For\+Includes@{check\+For\+Includes}}
\index{check\+For\+Includes@{check\+For\+Includes}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{check\+For\+Includes}]{\setlength{\rightskip}{0pt plus 5cm}int A\+C\+G\+::\+Shader\+Prog\+Generator\+::check\+For\+Includes (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+str, }
\item[{{\bf Shader\+Generator} $\ast$}]{\+\_\+gen, }
\item[{Q\+String}]{\+\_\+include\+Path}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{a01168_adcd7fe00defdf5387c5058c59537b4c7}
checks if \+\_\+str is an include directive eventually imports the included file to the specified generator 

Definition at line 1236 of file Shader\+Generator.\+cc.

\hypertarget{a01168_a6cb1deea62905eb409da6209d808bfb6}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!check\+For\+Includes@{check\+For\+Includes}}
\index{check\+For\+Includes@{check\+For\+Includes}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{check\+For\+Includes}]{\setlength{\rightskip}{0pt plus 5cm}int A\+C\+G\+::\+Shader\+Prog\+Generator\+::check\+For\+Includes (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+str, }
\item[{Q\+String\+List $\ast$}]{\+\_\+out\+Import, }
\item[{Q\+String}]{\+\_\+include\+Path}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{a01168_a6cb1deea62905eb409da6209d808bfb6}
checks if \+\_\+str is an include directive eventually imports the included file to the specified stringlist 

Definition at line 1257 of file Shader\+Generator.\+cc.

\hypertarget{a01168_aea29c67f1200dc760696c525eee0e23d}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!get\+Abs\+File\+Path@{get\+Abs\+File\+Path}}
\index{get\+Abs\+File\+Path@{get\+Abs\+File\+Path}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{get\+Abs\+File\+Path}]{\setlength{\rightskip}{0pt plus 5cm}Q\+String A\+C\+G\+::\+Shader\+Prog\+Generator\+::get\+Abs\+File\+Path (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+file\+Name}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{a01168_aea29c67f1200dc760696c525eee0e23d}


Convert a filename to an absolute filename. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+file\+Name} & relative (from shader dir) or absolute file name \\
\hline
\end{DoxyParams}


Definition at line 2390 of file Shader\+Generator.\+cc.

\hypertarget{a01168_a4ddc1ae85719dc115b52a5e971dc0ccb}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!get\+Shader\+Dir@{get\+Shader\+Dir}}
\index{get\+Shader\+Dir@{get\+Shader\+Dir}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{get\+Shader\+Dir}]{\setlength{\rightskip}{0pt plus 5cm}Q\+String A\+C\+G\+::\+Shader\+Prog\+Generator\+::get\+Shader\+Dir (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{a01168_a4ddc1ae85719dc115b52a5e971dc0ccb}
Return shader directory path as previosly specified by user 

Definition at line 2406 of file Shader\+Generator.\+cc.

\hypertarget{a01168_a835d94ee397f52df3abc931c66a21637}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!load\+String\+List\+From\+File@{load\+String\+List\+From\+File}}
\index{load\+String\+List\+From\+File@{load\+String\+List\+From\+File}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{load\+String\+List\+From\+File}]{\setlength{\rightskip}{0pt plus 5cm}bool A\+C\+G\+::\+Shader\+Prog\+Generator\+::load\+String\+List\+From\+File (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+file\+Name, }
\item[{Q\+String\+List $\ast$}]{\+\_\+out}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{a01168_a835d94ee397f52df3abc931c66a21637}


Load a text file as string list. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+file\+Name} & relative (from shader dir) or absolute file name \\
\hline
{\em \+\_\+out} & lines from text file \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, false otherwise 
\end{DoxyReturn}


Definition at line 955 of file Shader\+Generator.\+cc.

\hypertarget{a01168_a96b207003d2c540b0b676c0fa267a2ab}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!register\+Modifier@{register\+Modifier}}
\index{register\+Modifier@{register\+Modifier}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{register\+Modifier}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int A\+C\+G\+::\+Shader\+Prog\+Generator\+::register\+Modifier (
\begin{DoxyParamCaption}
\item[{{\bf Shader\+Modifier} $\ast$}]{\+\_\+modifier}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{a01168_a96b207003d2c540b0b676c0fa267a2ab}


Shader modifiers have to be registered before they can be used. They also must remain allocated for the rest of the applications runtime. Use a combination of modifier-\/\+I\+Ds in the constructor of Shader\+Prog\+Gen to active them. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+modifier} & address of a modifier implementation \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
modifier I\+D 
\end{DoxyReturn}


Definition at line 2412 of file Shader\+Generator.\+cc.

\hypertarget{a01168_a8665cdfa3e85f49c59b426839017dd3f}{\index{A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}!set\+Shader\+Dir@{set\+Shader\+Dir}}
\index{set\+Shader\+Dir@{set\+Shader\+Dir}!A\+C\+G\+::\+Shader\+Prog\+Generator@{A\+C\+G\+::\+Shader\+Prog\+Generator}}
\subsubsection[{set\+Shader\+Dir}]{\setlength{\rightskip}{0pt plus 5cm}void A\+C\+G\+::\+Shader\+Prog\+Generator\+::set\+Shader\+Dir (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+dir}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{a01168_a8665cdfa3e85f49c59b426839017dd3f}
The shader directory has to be defined first before making use of the generator! For example\+: set\+Shader\+Dir(\+Open\+Flipper\+::\+Options\+::shader\+Dir\+Str()) 

Definition at line 2401 of file Shader\+Generator.\+cc.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
A\+C\+G/\+G\+L/Shader\+Generator.\+hh\item 
A\+C\+G/\+G\+L/Shader\+Generator.\+cc\end{DoxyCompactItemize}
