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


{\ttfamily \#include $<$Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+G\+L/\+Shader\+Generator.\+hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a07584_a444eb2da25c49507e3a775e7b12d985d}{Shader\+Prog\+Generator} (const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$\+\_\+desc)
\item 
\hyperlink{a07584_a39526258a8629e5dd9572fd11e098e1a}{Shader\+Prog\+Generator} (const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const std\+::vector$<$ unsigned int $>$ \&\+\_\+modifier\+I\+Ds)
\item 
\hyperlink{a07584_af256b2f7d6f8a58cb9088d226285e09d}{Shader\+Prog\+Generator} (const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const std\+::vector$<$ unsigned int $>$ $\ast$\+\_\+modifier\+I\+Ds)
\item 
\hyperlink{a07584_ad7c3b2e3d6d556b8e7ce2aafeb48a444}{Shader\+Prog\+Generator} (const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const unsigned int $\ast$\+\_\+modifier\+I\+Ds, unsigned int \+\_\+num\+Modifiers)
\item 
\hyperlink{a07584_a144d0131e1927491a188c62f59dd151b}{Shader\+Prog\+Generator} (const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, \hyperlink{a07580}{Shader\+Modifier} $\ast$const $\ast$\+\_\+modifiers, unsigned int \+\_\+num\+Modifiers)
\item 
\hyperlink{a07584_a61dc8dbb9dc3ec357beb633a67666031}{Shader\+Prog\+Generator} (const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const std\+::vector$<$ \hyperlink{a07580}{Shader\+Modifier} $\ast$$>$ \&\+\_\+modifiers)
\item 
\hyperlink{a07584_a57904463a75e272c3a33f2eb0a6af107}{Shader\+Prog\+Generator} (const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const std\+::vector$<$ \hyperlink{a07580}{Shader\+Modifier} $\ast$$>$ $\ast$\+\_\+modifiers)
\item 
\mbox{\Hypertarget{a07584_a35b6a1b0a1bf902e0d903a46a1201f68}\label{a07584_a35b6a1b0a1bf902e0d903a46a1201f68}} 
void {\bfseries save\+Vertex\+Sh\+To\+File} (const char $\ast$\+\_\+file\+Name)
\item 
\mbox{\Hypertarget{a07584_a8b69059f56349a5cef9266c891f6beec}\label{a07584_a8b69059f56349a5cef9266c891f6beec}} 
void {\bfseries save\+Geometry\+Sh\+To\+File} (const char $\ast$\+\_\+file\+Name)
\item 
\mbox{\Hypertarget{a07584_ac6a2e63f7eec4188b99b919fdc72ec3c}\label{a07584_ac6a2e63f7eec4188b99b919fdc72ec3c}} 
void {\bfseries save\+Fragment\+Sh\+To\+File} (const char $\ast$\+\_\+file\+Name)
\item 
\mbox{\Hypertarget{a07584_afa4a7e6b177673dae1fcf0530a0ad5af}\label{a07584_afa4a7e6b177673dae1fcf0530a0ad5af}} 
const Q\+String\+List \& \hyperlink{a07584_afa4a7e6b177673dae1fcf0530a0ad5af}{get\+Vertex\+Shader\+Code} ()
\begin{DoxyCompactList}\small\item\em Returns generated vertex shader code. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_a12ec9ed7a350f7f3b21c0bcb1c0456c9}\label{a07584_a12ec9ed7a350f7f3b21c0bcb1c0456c9}} 
const Q\+String\+List \& \hyperlink{a07584_a12ec9ed7a350f7f3b21c0bcb1c0456c9}{get\+Tess\+Control\+Shader\+Code} ()
\begin{DoxyCompactList}\small\item\em Returns generated vertex shader code. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_a0f9459f8e95881e1cfe6f283d4727847}\label{a07584_a0f9459f8e95881e1cfe6f283d4727847}} 
const Q\+String\+List \& \hyperlink{a07584_a0f9459f8e95881e1cfe6f283d4727847}{get\+Tess\+Evaluation\+Shader\+Code} ()
\begin{DoxyCompactList}\small\item\em Returns generated tessellation control shader code. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_a3a28c9b4614c843d74749d6cd7a58ad1}\label{a07584_a3a28c9b4614c843d74749d6cd7a58ad1}} 
const Q\+String\+List \& \hyperlink{a07584_a3a28c9b4614c843d74749d6cd7a58ad1}{get\+Geometry\+Shader\+Code} ()
\begin{DoxyCompactList}\small\item\em Returns generated tessellation evaluation shader code. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_aa14e645f026678892fd3202c8bfb27f5}\label{a07584_aa14e645f026678892fd3202c8bfb27f5}} 
const Q\+String\+List \& \hyperlink{a07584_aa14e645f026678892fd3202c8bfb27f5}{get\+Fragment\+Shader\+Code} ()
\begin{DoxyCompactList}\small\item\em Returns generated fragment shader code. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_aa5003ddc00627a154341fbcbd13c8b0d}\label{a07584_aa5003ddc00627a154341fbcbd13c8b0d}} 
int \hyperlink{a07584_aa5003ddc00627a154341fbcbd13c8b0d}{get\+Num\+Active\+Modifiers} () const
\begin{DoxyCompactList}\small\item\em Get the number of active modifiers. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_a2e99fe86312a22a2fbd87c276c723ead}\label{a07584_a2e99fe86312a22a2fbd87c276c723ead}} 
\hyperlink{a07580}{Shader\+Modifier} $\ast$ \hyperlink{a07584_a2e99fe86312a22a2fbd87c276c723ead}{get\+Active\+Modifier} (int \+\_\+i)
\begin{DoxyCompactList}\small\item\em Get active modfiers for this program. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_a8df67118c380729e3d5db9e71a840eb4}\label{a07584_a8df67118c380729e3d5db9e71a840eb4}} 
bool \hyperlink{a07584_a8df67118c380729e3d5db9e71a840eb4}{has\+Geometry\+Shader} () const
\begin{DoxyCompactList}\small\item\em check whether there is a geometry shader present \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_a91764c4bb7d0fb87ca89a8cb9393d3d9}\label{a07584_a91764c4bb7d0fb87ca89a8cb9393d3d9}} 
bool \hyperlink{a07584_a91764c4bb7d0fb87ca89a8cb9393d3d9}{has\+Tess\+Control\+Shader} () const
\begin{DoxyCompactList}\small\item\em check whether there is a tess-\/control shader present \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_a26b6d099cdb61ab667612755935b8f64}\label{a07584_a26b6d099cdb61ab667612755935b8f64}} 
bool \hyperlink{a07584_a26b6d099cdb61ab667612755935b8f64}{has\+Tess\+Evaluation\+Shader} () const
\begin{DoxyCompactList}\small\item\em check whether there is a tess-\/evaluation shader present \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_ace9ca42dd4f3b53e9b7d0377625b396a}\label{a07584_ace9ca42dd4f3b53e9b7d0377625b396a}} 
void \hyperlink{a07584_ace9ca42dd4f3b53e9b7d0377625b396a}{generate\+Shaders} ()
\begin{DoxyCompactList}\small\item\em Generates the shader code. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static void \hyperlink{a07584_a8665cdfa3e85f49c59b426839017dd3f}{set\+Shader\+Dir} (Q\+String \+\_\+dir)
\item 
static Q\+String \hyperlink{a07584_a4ddc1ae85719dc115b52a5e971dc0ccb}{get\+Shader\+Dir} ()
\item 
static unsigned int \hyperlink{a07584_a96b207003d2c540b0b676c0fa267a2ab}{register\+Modifier} (\hyperlink{a07580}{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{a07584_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{a07584_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 
\mbox{\Hypertarget{a07584_a5e0de303fd074032ebbd53eea5001fdf}\label{a07584_a5e0de303fd074032ebbd53eea5001fdf}} 
void \hyperlink{a07584_a5e0de303fd074032ebbd53eea5001fdf}{load\+Shader\+Template\+From\+File} ()
\begin{DoxyCompactList}\small\item\em Loads external shader templates. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_a568797ef766eb9354a6b4aefd544ecd4}\label{a07584_a568797ef766eb9354a6b4aefd544ecd4}} 
void \hyperlink{a07584_a568797ef766eb9354a6b4aefd544ecd4}{scan\+Shader\+Template} (Q\+String\+List \&\+\_\+template\+Src, Q\+String \+\_\+template\+Filename, Q\+String\+List $\ast$\+\_\+out\+Layout\+Directives=0)
\begin{DoxyCompactList}\small\item\em Scans loaded shader template for requested inputs, glsl version or includes. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_aa8fdf07ab3a8a7cb358c8114f32a2c39}\label{a07584_aa8fdf07ab3a8a7cb358c8114f32a2c39}} 
void \hyperlink{a07584_aa8fdf07ab3a8a7cb358c8114f32a2c39}{init} (const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, \hyperlink{a07580}{Shader\+Modifier} $\ast$const $\ast$\+\_\+modifiers, unsigned int \+\_\+num\+Active\+Mods)
\begin{DoxyCompactList}\small\item\em Called in constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_a746b5e14ea84a4b0cc47add338eeed29}\label{a07584_a746b5e14ea84a4b0cc47add338eeed29}} 
void {\bfseries init} (const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const unsigned int $\ast$\+\_\+modifiers, unsigned int \+\_\+num\+Active\+Mods)
\item 
\mbox{\Hypertarget{a07584_a4c9929c86935bf0710f65d3a8bfc024a}\label{a07584_a4c9929c86935bf0710f65d3a8bfc024a}} 
void {\bfseries build\+Vertex\+Shader} ()
\item 
\mbox{\Hypertarget{a07584_a8a80789d5702f9d1f1117e5dbad942ff}\label{a07584_a8a80789d5702f9d1f1117e5dbad942ff}} 
void {\bfseries build\+Tess\+Control\+Shader} ()
\item 
\mbox{\Hypertarget{a07584_a4aa5dc7f9f88e92cf753646a9a11605f}\label{a07584_a4aa5dc7f9f88e92cf753646a9a11605f}} 
void {\bfseries build\+Tess\+Eval\+Shader} ()
\item 
\mbox{\Hypertarget{a07584_aeb22d9f44ecf13bba464a513b30e4fb8}\label{a07584_aeb22d9f44ecf13bba464a513b30e4fb8}} 
void {\bfseries build\+Geometry\+Shader} ()
\item 
\mbox{\Hypertarget{a07584_aea605ad7a52c13c7f452c9ee53d17a56}\label{a07584_aea605ad7a52c13c7f452c9ee53d17a56}} 
void {\bfseries build\+Fragment\+Shader} ()
\item 
\mbox{\Hypertarget{a07584_ab825628e06970d72cd3bab6bc78c56ae}\label{a07584_ab825628e06970d72cd3bab6bc78c56ae}} 
void {\bfseries add\+Vertex\+Begin\+Code} (Q\+String\+List $\ast$\+\_\+code)
\item 
\mbox{\Hypertarget{a07584_a5a65295876fac87356d2aaa70f992f5b}\label{a07584_a5a65295876fac87356d2aaa70f992f5b}} 
void {\bfseries add\+Vertex\+End\+Code} (Q\+String\+List $\ast$\+\_\+code)
\item 
\mbox{\Hypertarget{a07584_a631f5ea24744ef0cb83cd5caa619dbd5}\label{a07584_a631f5ea24744ef0cb83cd5caa619dbd5}} 
void {\bfseries add\+Fragment\+Begin\+Code} (Q\+String\+List $\ast$\+\_\+code)
\item 
\mbox{\Hypertarget{a07584_a403d4b7d3d028b08f2d7d2d3b553446e}\label{a07584_a403d4b7d3d028b08f2d7d2d3b553446e}} 
void {\bfseries add\+Fragment\+End\+Code} (Q\+String\+List $\ast$\+\_\+code)
\item 
void \hyperlink{a07584_adbb15fbd0d7220746fa3a9e6a8a79dd2}{add\+Lighting\+Functions} (Q\+String\+List $\ast$\+\_\+code)
\begin{DoxyCompactList}\small\item\em Adds lighting definition functions. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_ac5fbdd783628da06986dcf2b0e9c15f6}\label{a07584_ac5fbdd783628da06986dcf2b0e9c15f6}} 
void \hyperlink{a07584_ac5fbdd783628da06986dcf2b0e9c15f6}{add\+Lighting\+Code} (Q\+String\+List $\ast$\+\_\+code)
\begin{DoxyCompactList}\small\item\em Adds lighting function calls to code. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_a974bc12084e0131a602fae207b0665c0}\label{a07584_a974bc12084e0131a602fae207b0665c0}} 
void \hyperlink{a07584_a974bc12084e0131a602fae207b0665c0}{modify\+Lighting\+Code} (Q\+String\+List $\ast$\+\_\+code, \hyperlink{a07580}{Shader\+Modifier} $\ast$\+\_\+modifier)
\begin{DoxyCompactList}\small\item\em Calls lighting modifier for each light. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_a6e26ef2d0fa1d4761c95b47ba545e1d3}\label{a07584_a6e26ef2d0fa1d4761c95b47ba545e1d3}} 
void \hyperlink{a07584_a6e26ef2d0fa1d4761c95b47ba545e1d3}{add\+Tex\+Gen\+Code} (Q\+String\+List $\ast$\+\_\+code, bool \+\_\+fragment\+Shader)
\begin{DoxyCompactList}\small\item\em Add texture coordinate generation code. \end{DoxyCompactList}\item 
int \hyperlink{a07584_adcd7fe00defdf5387c5058c59537b4c7}{check\+For\+Includes} (Q\+String \+\_\+str, \hyperlink{a07568}{Shader\+Generator} $\ast$\+\_\+gen, Q\+String \+\_\+include\+Path)
\item 
int \hyperlink{a07584_a6cb1deea62905eb409da6209d808bfb6}{check\+For\+Includes} (Q\+String \+\_\+str, Q\+String\+List $\ast$\+\_\+out\+Import, Q\+String \+\_\+include\+Path)
\item 
\mbox{\Hypertarget{a07584_a408ad7f8b0465ed0b63d73c2098f8e3a}\label{a07584_a408ad7f8b0465ed0b63d73c2098f8e3a}} 
void \hyperlink{a07584_a408ad7f8b0465ed0b63d73c2098f8e3a}{init\+Gen\+Defines} (\hyperlink{a07568}{Shader\+Generator} $\ast$\+\_\+gen)
\begin{DoxyCompactList}\small\item\em provide generated defines to shader \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07584_a91d8d41d2bf8e0086876bcc87e6ba5ac}\label{a07584_a91d8d41d2bf8e0086876bcc87e6ba5ac}} 
static Q\+String \hyperlink{a07584_a91d8d41d2bf8e0086876bcc87e6ba5ac}{get\+Path\+Name} (Q\+String \+\_\+str\+File\+Name)
\begin{DoxyCompactList}\small\item\em returns path to \+\_\+str\+File\+Name without last slash \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_aa7db2dfdc7f0c24e1fa8a3e6030b9e9d}\label{a07584_aa7db2dfdc7f0c24e1fa8a3e6030b9e9d}} 
static void {\bfseries load\+Lighting\+Functions} ()
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07584_affadd9c546567a2f0c38c738791fd6ba}\label{a07584_affadd9c546567a2f0c38c738791fd6ba}} 
\hyperlink{a07568}{Shader\+Generator} $\ast$ {\bfseries vertex\+\_\+}
\item 
\mbox{\Hypertarget{a07584_ae9a23855de4a5c9df38458827acbb398}\label{a07584_ae9a23855de4a5c9df38458827acbb398}} 
\hyperlink{a07568}{Shader\+Generator} $\ast$ {\bfseries tess\+Control\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a339784f3c983d254db0d382f3b488973}\label{a07584_a339784f3c983d254db0d382f3b488973}} 
\hyperlink{a07568}{Shader\+Generator} $\ast$ {\bfseries tess\+Eval\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a2d3a9a7ff609b4361995638661471292}\label{a07584_a2d3a9a7ff609b4361995638661471292}} 
\hyperlink{a07568}{Shader\+Generator} $\ast$ {\bfseries geometry\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a3fe7d05cb599310d4e3dab194e37d56c}\label{a07584_a3fe7d05cb599310d4e3dab194e37d56c}} 
\hyperlink{a07568}{Shader\+Generator} $\ast$ {\bfseries fragment\+\_\+}
\item 
\mbox{\Hypertarget{a07584_aa37152a28c33860387619a5cd9e8485f}\label{a07584_aa37152a28c33860387619a5cd9e8485f}} 
Q\+String\+List {\bfseries vertex\+Template\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a7fceb870776af0ffe2395074c1a35059}\label{a07584_a7fceb870776af0ffe2395074c1a35059}} 
Q\+String\+List {\bfseries tess\+Control\+Template\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a2e4845e3d9c13d9f26e2b3b9710439f6}\label{a07584_a2e4845e3d9c13d9f26e2b3b9710439f6}} 
Q\+String\+List {\bfseries tess\+Eval\+Template\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a03789be0477e706f57a0da7c95f20fba}\label{a07584_a03789be0477e706f57a0da7c95f20fba}} 
Q\+String\+List {\bfseries geometry\+Template\+\_\+}
\item 
\mbox{\Hypertarget{a07584_acb73c9619748d9a9afcb0aee99c75814}\label{a07584_acb73c9619748d9a9afcb0aee99c75814}} 
Q\+String\+List {\bfseries fragment\+Template\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a327e4d15cf9870818dbaa5b132279edd}\label{a07584_a327e4d15cf9870818dbaa5b132279edd}} 
\hyperlink{a07560}{Shader\+Gen\+Desc} {\bfseries desc\+\_\+}
\item 
\mbox{\Hypertarget{a07584_adf49f7b9b76c9d650638a9b9727697d0}\label{a07584_adf49f7b9b76c9d650638a9b9727697d0}} 
std\+::vector$<$ \hyperlink{a07580}{Shader\+Modifier} $\ast$ $>$ {\bfseries active\+Mods\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a307f3941b10e4abfa357f8386ddbe8dc}\label{a07584_a307f3941b10e4abfa357f8386ddbe8dc}} 
Q\+String \hyperlink{a07584_a307f3941b10e4abfa357f8386ddbe8dc}{vertex\+Shader\+File\+\_\+}
\begin{DoxyCompactList}\small\item\em path + filename to shader templates \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_a327c02ba26b52ba44d0b98bb450450d3}\label{a07584_a327c02ba26b52ba44d0b98bb450450d3}} 
Q\+String {\bfseries tess\+Control\+Shader\+File\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a1188bfe2dc04b5a502887aff3b24e4d0}\label{a07584_a1188bfe2dc04b5a502887aff3b24e4d0}} 
Q\+String {\bfseries tess\+Eval\+Shader\+File\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a1531c9f37e4412f0a01ec5f1f9b069f9}\label{a07584_a1531c9f37e4412f0a01ec5f1f9b069f9}} 
Q\+String {\bfseries geometry\+Shader\+File\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a0297112fe3ff286baac0be752a4d99db}\label{a07584_a0297112fe3ff286baac0be752a4d99db}} 
Q\+String {\bfseries fragment\+Shader\+File\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a2009405060ac2c67fbf3d73279918296}\label{a07584_a2009405060ac2c67fbf3d73279918296}} 
Q\+String\+List \hyperlink{a07584_a2009405060ac2c67fbf3d73279918296}{tess\+Control\+Layout\+\_\+}
\begin{DoxyCompactList}\small\item\em layout() directives scanned from loaded templates \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_a25f77e8e79dfaef5104efc10f04ab030}\label{a07584_a25f77e8e79dfaef5104efc10f04ab030}} 
Q\+String\+List {\bfseries tess\+Eval\+Layout\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a007e7d990317ad284cec473561533ee2}\label{a07584_a007e7d990317ad284cec473561533ee2}} 
\hyperlink{a07572}{Shader\+Generator\+::\+Default\+I\+O\+Desc} \hyperlink{a07584_a007e7d990317ad284cec473561533ee2}{io\+Desc\+\_\+}
\begin{DoxyCompactList}\small\item\em default IO descriptor for the vertex shader \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07584_a3a919288b84267061e25041d7b2ac3bd}\label{a07584_a3a919288b84267061e25041d7b2ac3bd}} 
static int \hyperlink{a07584_a3a919288b84267061e25041d7b2ac3bd}{num\+Registered\+Modifiers\+\_\+} = 0
\begin{DoxyCompactList}\small\item\em registered shader modifier \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07584_af72283b571b96306c19de3432ee5852b}\label{a07584_af72283b571b96306c19de3432ee5852b}} 
static std\+::vector$<$ \hyperlink{a07580}{Shader\+Modifier} $\ast$ $>$ {\bfseries registered\+Modifiers\+\_\+}
\item 
\mbox{\Hypertarget{a07584_a8274659152b28f22aac0eafaefa61c12}\label{a07584_a8274659152b28f22aac0eafaefa61c12}} 
static Q\+String {\bfseries shader\+Dir\+\_\+}
\item 
\mbox{\Hypertarget{a07584_aad51f60af031b2fa92049f558b53307b}\label{a07584_aad51f60af031b2fa92049f558b53307b}} 
static Q\+String\+List {\bfseries lighting\+Code\+\_\+}
\end{DoxyCompactItemize}


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

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



\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{a07584_a444eb2da25c49507e3a775e7b12d985d}\label{a07584_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{\texorpdfstring{Shader\+Prog\+Generator()}{ShaderProgGenerator()}\hspace{0.1cm}{\footnotesize\ttfamily [1/7]}}
{\footnotesize\ttfamily A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (\begin{DoxyParamCaption}\item[{const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}}


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


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

\mbox{\Hypertarget{a07584_a39526258a8629e5dd9572fd11e098e1a}\label{a07584_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{\texorpdfstring{Shader\+Prog\+Generator()}{ShaderProgGenerator()}\hspace{0.1cm}{\footnotesize\ttfamily [2/7]}}
{\footnotesize\ttfamily A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (\begin{DoxyParamCaption}\item[{const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc,  }\item[{const std\+::vector$<$ unsigned int $>$ \&}]{\+\_\+modifier\+I\+Ds }\end{DoxyParamCaption})}


\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 838 of file Shader\+Generator.\+cc.

\mbox{\Hypertarget{a07584_af256b2f7d6f8a58cb9088d226285e09d}\label{a07584_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{\texorpdfstring{Shader\+Prog\+Generator()}{ShaderProgGenerator()}\hspace{0.1cm}{\footnotesize\ttfamily [3/7]}}
{\footnotesize\ttfamily A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (\begin{DoxyParamCaption}\item[{const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc,  }\item[{const std\+::vector$<$ unsigned int $>$ $\ast$}]{\+\_\+modifier\+I\+Ds }\end{DoxyParamCaption})}


\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 844 of file Shader\+Generator.\+cc.

\mbox{\Hypertarget{a07584_ad7c3b2e3d6d556b8e7ce2aafeb48a444}\label{a07584_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{\texorpdfstring{Shader\+Prog\+Generator()}{ShaderProgGenerator()}\hspace{0.1cm}{\footnotesize\ttfamily [4/7]}}
{\footnotesize\ttfamily A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (\begin{DoxyParamCaption}\item[{const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc,  }\item[{const unsigned int $\ast$}]{\+\_\+modifier\+I\+Ds,  }\item[{unsigned int}]{\+\_\+num\+Modifiers }\end{DoxyParamCaption})}


\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 832 of file Shader\+Generator.\+cc.

\mbox{\Hypertarget{a07584_a144d0131e1927491a188c62f59dd151b}\label{a07584_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{\texorpdfstring{Shader\+Prog\+Generator()}{ShaderProgGenerator()}\hspace{0.1cm}{\footnotesize\ttfamily [5/7]}}
{\footnotesize\ttfamily A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (\begin{DoxyParamCaption}\item[{const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc,  }\item[{\hyperlink{a07580}{Shader\+Modifier} $\ast$const $\ast$}]{\+\_\+modifiers,  }\item[{unsigned int}]{\+\_\+num\+Modifiers }\end{DoxyParamCaption})}


\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 851 of file Shader\+Generator.\+cc.

\mbox{\Hypertarget{a07584_a61dc8dbb9dc3ec357beb633a67666031}\label{a07584_a61dc8dbb9dc3ec357beb633a67666031}} 
\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{\texorpdfstring{Shader\+Prog\+Generator()}{ShaderProgGenerator()}\hspace{0.1cm}{\footnotesize\ttfamily [6/7]}}
{\footnotesize\ttfamily A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (\begin{DoxyParamCaption}\item[{const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc,  }\item[{const std\+::vector$<$ \hyperlink{a07580}{Shader\+Modifier} $\ast$$>$ \&}]{\+\_\+modifiers }\end{DoxyParamCaption})}


\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 857 of file Shader\+Generator.\+cc.

\mbox{\Hypertarget{a07584_a57904463a75e272c3a33f2eb0a6af107}\label{a07584_a57904463a75e272c3a33f2eb0a6af107}} 
\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{\texorpdfstring{Shader\+Prog\+Generator()}{ShaderProgGenerator()}\hspace{0.1cm}{\footnotesize\ttfamily [7/7]}}
{\footnotesize\ttfamily A\+C\+G\+::\+Shader\+Prog\+Generator\+::\+Shader\+Prog\+Generator (\begin{DoxyParamCaption}\item[{const \hyperlink{a07560}{Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc,  }\item[{const std\+::vector$<$ \hyperlink{a07580}{Shader\+Modifier} $\ast$$>$ $\ast$}]{\+\_\+modifiers }\end{DoxyParamCaption})}


\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 863 of file Shader\+Generator.\+cc.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a07584_adbb15fbd0d7220746fa3a9e6a8a79dd2}\label{a07584_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{\texorpdfstring{add\+Lighting\+Functions()}{addLightingFunctions()}}
{\footnotesize\ttfamily 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]}}



Adds lighting definition functions. 

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

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

\mbox{\Hypertarget{a07584_adcd7fe00defdf5387c5058c59537b4c7}\label{a07584_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{\texorpdfstring{check\+For\+Includes()}{checkForIncludes()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily int A\+C\+G\+::\+Shader\+Prog\+Generator\+::check\+For\+Includes (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+str,  }\item[{\hyperlink{a07568}{Shader\+Generator} $\ast$}]{\+\_\+gen,  }\item[{Q\+String}]{\+\_\+include\+Path }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}

checks if \+\_\+str is an include directive eventually imports the included file to the specified generator 

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

\mbox{\Hypertarget{a07584_a6cb1deea62905eb409da6209d808bfb6}\label{a07584_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{\texorpdfstring{check\+For\+Includes()}{checkForIncludes()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily 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]}}

checks if \+\_\+str is an include directive eventually imports the included file to the specified stringlist 

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

\mbox{\Hypertarget{a07584_aea29c67f1200dc760696c525eee0e23d}\label{a07584_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{\texorpdfstring{get\+Abs\+File\+Path()}{getAbsFilePath()}}
{\footnotesize\ttfamily 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]}}



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 2435 of file Shader\+Generator.\+cc.

\mbox{\Hypertarget{a07584_a4ddc1ae85719dc115b52a5e971dc0ccb}\label{a07584_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{\texorpdfstring{get\+Shader\+Dir()}{getShaderDir()}}
{\footnotesize\ttfamily Q\+String A\+C\+G\+::\+Shader\+Prog\+Generator\+::get\+Shader\+Dir (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

Return shader directory path as previosly specified by user 

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

\mbox{\Hypertarget{a07584_a835d94ee397f52df3abc931c66a21637}\label{a07584_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{\texorpdfstring{load\+String\+List\+From\+File()}{loadStringListFromFile()}}
{\footnotesize\ttfamily 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]}}



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 963 of file Shader\+Generator.\+cc.

\mbox{\Hypertarget{a07584_a96b207003d2c540b0b676c0fa267a2ab}\label{a07584_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{\texorpdfstring{register\+Modifier()}{registerModifier()}}
{\footnotesize\ttfamily unsigned int A\+C\+G\+::\+Shader\+Prog\+Generator\+::register\+Modifier (\begin{DoxyParamCaption}\item[{\hyperlink{a07580}{Shader\+Modifier} $\ast$}]{\+\_\+modifier }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



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 ID 
\end{DoxyReturn}


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

\mbox{\Hypertarget{a07584_a8665cdfa3e85f49c59b426839017dd3f}\label{a07584_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{\texorpdfstring{set\+Shader\+Dir()}{setShaderDir()}}
{\footnotesize\ttfamily void A\+C\+G\+::\+Shader\+Prog\+Generator\+::set\+Shader\+Dir (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+dir }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

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 2446 of file Shader\+Generator.\+cc.



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