\hypertarget{a06188}{}\section{G\+L\+SL Namespace Reference}
\label{a06188}\index{G\+L\+SL@{G\+L\+SL}}


This namespace contains all the classes and functions for handling \hyperlink{a06188}{G\+L\+SL} shader and program objects.  


\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{a08124}{Compute\+Shader}
\begin{DoxyCompactList}\small\item\em \hyperlink{a06188}{G\+L\+SL} compute shader. \end{DoxyCompactList}\item 
class \hyperlink{a08116}{Fragment\+Shader}
\begin{DoxyCompactList}\small\item\em \hyperlink{a06188}{G\+L\+SL} fragment shader. \end{DoxyCompactList}\item 
class \hyperlink{a08120}{Geometry\+Shader}
\begin{DoxyCompactList}\small\item\em \hyperlink{a06188}{G\+L\+SL} geometry shader. \end{DoxyCompactList}\item 
class \hyperlink{a08132}{Program}
\begin{DoxyCompactList}\small\item\em \hyperlink{a06188}{G\+L\+SL} program class. \end{DoxyCompactList}\item 
class \hyperlink{a08108}{Shader}
\begin{DoxyCompactList}\small\item\em A generic shader base class. \end{DoxyCompactList}\item 
class \hyperlink{a08136}{Uniform\+Pool}
\begin{DoxyCompactList}\small\item\em \hyperlink{a06188}{G\+L\+SL} uniform pool. \end{DoxyCompactList}\item 
class \hyperlink{a08112}{Vertex\+Shader}
\begin{DoxyCompactList}\small\item\em \hyperlink{a06188}{G\+L\+SL} vertex shader. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a06188_ab0271c685c9d3678ec03e5fe5fd200ca}\label{a06188_ab0271c685c9d3678ec03e5fe5fd200ca}} 
typedef std\+::list$<$ std\+::string $>$ {\bfseries String\+List}
\item 
\mbox{\Hypertarget{a06188_a15d034f967d55a97fc4873f7d7579b06}\label{a06188_a15d034f967d55a97fc4873f7d7579b06}} 
typedef \hyperlink{a08108}{Shader} $\ast$ {\bfseries Ptr\+Shader}
\item 
\mbox{\Hypertarget{a06188_ad3d59223e0b4cf515fa06b51e47e32c8}\label{a06188_ad3d59223e0b4cf515fa06b51e47e32c8}} 
typedef const \hyperlink{a08108}{Shader} $\ast$ {\bfseries Ptr\+Const\+Shader}
\item 
\mbox{\Hypertarget{a06188_aff61e6af4b7bb30ae175d249f36a3c2b}\label{a06188_aff61e6af4b7bb30ae175d249f36a3c2b}} 
typedef \hyperlink{a08112}{Vertex\+Shader} $\ast$ {\bfseries Ptr\+Vertex\+Shader}
\item 
\mbox{\Hypertarget{a06188_a77fc5893c8b442b6738513363d374e7d}\label{a06188_a77fc5893c8b442b6738513363d374e7d}} 
typedef const \hyperlink{a08112}{Vertex\+Shader} $\ast$ {\bfseries Ptr\+Vertex\+Const\+Shader}
\item 
\mbox{\Hypertarget{a06188_aeb86af9fa024596df33467183a1ee152}\label{a06188_aeb86af9fa024596df33467183a1ee152}} 
typedef \hyperlink{a08116}{Fragment\+Shader} $\ast$ {\bfseries Ptr\+Fragment\+Shader}
\item 
\mbox{\Hypertarget{a06188_a6bc2b86d29f3f3cf9f7e71d776f107c1}\label{a06188_a6bc2b86d29f3f3cf9f7e71d776f107c1}} 
typedef const \hyperlink{a08116}{Fragment\+Shader} $\ast$ {\bfseries Ptr\+Const\+Fragment\+Shader}
\item 
\mbox{\Hypertarget{a06188_a4d2b7f55c85b29e7f5006e0d36717779}\label{a06188_a4d2b7f55c85b29e7f5006e0d36717779}} 
typedef \hyperlink{a08120}{Geometry\+Shader} $\ast$ {\bfseries Ptr\+Geometry\+Shader}
\item 
\mbox{\Hypertarget{a06188_a51e094c52b216895f828d9d9532841ca}\label{a06188_a51e094c52b216895f828d9d9532841ca}} 
typedef const \hyperlink{a08120}{Geometry\+Shader} $\ast$ {\bfseries Ptr\+Const\+Geometry\+Shader}
\item 
\mbox{\Hypertarget{a06188_acc9bd428022217abd390cb4f9a481ecd}\label{a06188_acc9bd428022217abd390cb4f9a481ecd}} 
typedef \hyperlink{a08124}{Compute\+Shader} $\ast$ {\bfseries Ptr\+Compute\+Shader}
\item 
\mbox{\Hypertarget{a06188_a1b65dc0c981907c4c7b9672e8b75d4a7}\label{a06188_a1b65dc0c981907c4c7b9672e8b75d4a7}} 
typedef const \hyperlink{a08124}{Compute\+Shader} $\ast$ {\bfseries Ptr\+Const\+Compute\+Shader}
\item 
\mbox{\Hypertarget{a06188_ae47e3c255455cacb21b69840b0b773e5}\label{a06188_ae47e3c255455cacb21b69840b0b773e5}} 
typedef \hyperlink{a08132}{Program} $\ast$ {\bfseries Ptr\+Program}
\item 
\mbox{\Hypertarget{a06188_a2c09ef18ccedbf16ba1da299bff11436}\label{a06188_a2c09ef18ccedbf16ba1da299bff11436}} 
typedef const \hyperlink{a08132}{Program} $\ast$ {\bfseries Ptr\+Const\+Program}
\item 
\mbox{\Hypertarget{a06188_a8666aec6213e11a0f51b21fe7085c8bb}\label{a06188_a8666aec6213e11a0f51b21fe7085c8bb}} 
typedef \hyperlink{a08136}{Uniform\+Pool} $\ast$ {\bfseries Ptr\+Uniform\+Pool}
\item 
\mbox{\Hypertarget{a06188_a96cb5ab50fd179374c103ca3550c5b10}\label{a06188_a96cb5ab50fd179374c103ca3550c5b10}} 
typedef const \hyperlink{a08136}{Uniform\+Pool} $\ast$ {\bfseries Ptr\+Const\+Uniform\+Pool}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{a06188_a25600b64f6d2d498f60fd73feabcfb3f}{load\+Shader\+Rec} (const char $\ast$filename, bool append\+New\+Line\+Char, std\+::map$<$ Q\+String, int $>$ \&include\+Map, G\+L\+S\+L\+::\+String\+List \&shader\+Source)
\begin{DoxyCompactList}\small\item\em Loads the shader source and all recursive includes. \end{DoxyCompactList}\item 
G\+L\+S\+L\+::\+String\+List \hyperlink{a06188_aef2716742dae99d087e88607339223b7}{load\+Shader} (const char $\ast$filename, const G\+L\+S\+L\+::\+String\+List $\ast$macros, bool append\+New\+Line\+Char, G\+L\+S\+L\+::\+String\+List $\ast$out\+Includes)
\begin{DoxyCompactList}\small\item\em Loads the shader source. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06188_affa742c529a11d203a8f19d409ead6f0}\label{a06188_affa742c529a11d203a8f19d409ead6f0}} 
\hyperlink{a08112}{G\+L\+S\+L\+::\+Ptr\+Vertex\+Shader} \hyperlink{a06188_affa742c529a11d203a8f19d409ead6f0}{load\+Vertex\+Shader} (const char $\ast$name, const G\+L\+S\+L\+::\+String\+List $\ast$macros, bool verbose)
\begin{DoxyCompactList}\small\item\em Loads, compiles and installs a new vertex shader. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06188_a2d4a56ad7ab6220e459b95d690f6ff8e}\label{a06188_a2d4a56ad7ab6220e459b95d690f6ff8e}} 
\hyperlink{a08116}{G\+L\+S\+L\+::\+Ptr\+Fragment\+Shader} \hyperlink{a06188_a2d4a56ad7ab6220e459b95d690f6ff8e}{load\+Fragment\+Shader} (const char $\ast$name, const G\+L\+S\+L\+::\+String\+List $\ast$macros, bool verbose)
\begin{DoxyCompactList}\small\item\em Loads, compiles and installs a new vertex shader. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06188_a8829a03b4b555262a58e984580bb9c43}\label{a06188_a8829a03b4b555262a58e984580bb9c43}} 
\hyperlink{a08120}{G\+L\+S\+L\+::\+Ptr\+Geometry\+Shader} \hyperlink{a06188_a8829a03b4b555262a58e984580bb9c43}{load\+Geometry\+Shader} (const char $\ast$name, const G\+L\+S\+L\+::\+String\+List $\ast$macros, bool verbose)
\begin{DoxyCompactList}\small\item\em Loads, compiles and installs a new vertex shader. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06188_a32f2759e28e7a51dc758428c31fbdf61}\label{a06188_a32f2759e28e7a51dc758428c31fbdf61}} 
\hyperlink{a08108}{G\+L\+S\+L\+::\+Ptr\+Shader} \hyperlink{a06188_a32f2759e28e7a51dc758428c31fbdf61}{load\+Tess\+Control\+Shader} (const char $\ast$name, const G\+L\+S\+L\+::\+String\+List $\ast$macros, bool verbose)
\begin{DoxyCompactList}\small\item\em Loads, compiles and installs a new tessellation control shader. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06188_aa03e691829b45dc5e78f203c8cc7d641}\label{a06188_aa03e691829b45dc5e78f203c8cc7d641}} 
\hyperlink{a08108}{G\+L\+S\+L\+::\+Ptr\+Shader} \hyperlink{a06188_aa03e691829b45dc5e78f203c8cc7d641}{load\+Tess\+Evaluation\+Shader} (const char $\ast$name, const G\+L\+S\+L\+::\+String\+List $\ast$macros, bool verbose)
\begin{DoxyCompactList}\small\item\em Loads, compiles and installs a new tessellation evaluation shader. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06188_a0545306a0ce6bb3490a208535dafac4b}\label{a06188_a0545306a0ce6bb3490a208535dafac4b}} 
\hyperlink{a08124}{G\+L\+S\+L\+::\+Ptr\+Compute\+Shader} \hyperlink{a06188_a0545306a0ce6bb3490a208535dafac4b}{load\+Compute\+Shader} (const char $\ast$name, const G\+L\+S\+L\+::\+String\+List $\ast$macros, bool verbose)
\begin{DoxyCompactList}\small\item\em Loads, compiles and installs a new compute shader. \end{DoxyCompactList}\item 
\hyperlink{a08132}{G\+L\+S\+L\+::\+Ptr\+Program} \hyperlink{a06188_aadbde846fed270474a7c8a1df7c487c3}{load\+Program} (const char $\ast$vertex\+Shader\+File, const char $\ast$tess\+Control\+Shader\+File, const char $\ast$tess\+Evaluation\+Shader\+File, const char $\ast$geometry\+Shader\+File, const char $\ast$fragment\+Shader\+File, const G\+L\+S\+L\+::\+String\+List $\ast$macros, bool verbose)
\item 
\hyperlink{a08132}{G\+L\+S\+L\+::\+Ptr\+Program} \hyperlink{a06188_a8713aaa5b40870d5a027169d8d35004b}{load\+Program} (const char $\ast$vertex\+Shader\+File, const char $\ast$geometry\+Shader\+File, const char $\ast$fragment\+Shader\+File, const G\+L\+S\+L\+::\+String\+List $\ast$macros, bool verbose)
\item 
\hyperlink{a08132}{G\+L\+S\+L\+::\+Ptr\+Program} \hyperlink{a06188_a0f05f686e662363678a8b1f5f6ada41f}{load\+Program} (const char $\ast$vertex\+Shader\+File, const char $\ast$fragment\+Shader\+File, const G\+L\+S\+L\+::\+String\+List $\ast$macros, bool verbose)
\item 
\hyperlink{a08132}{G\+L\+S\+L\+::\+Ptr\+Program} \hyperlink{a06188_afd4a7fd8c727e94e3da0b3d39af41507}{load\+Compute\+Program} (const char $\ast$compute\+Shader\+File, const G\+L\+S\+L\+::\+String\+List $\ast$macros, bool verbose)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
This namespace contains all the classes and functions for handling \hyperlink{a06188}{G\+L\+SL} shader and program objects. 

\subsection{Function Documentation}
\mbox{\Hypertarget{a06188_afd4a7fd8c727e94e3da0b3d39af41507}\label{a06188_afd4a7fd8c727e94e3da0b3d39af41507}} 
\index{G\+L\+SL@{G\+L\+SL}!load\+Compute\+Program@{load\+Compute\+Program}}
\index{load\+Compute\+Program@{load\+Compute\+Program}!G\+L\+SL@{G\+L\+SL}}
\subsubsection{\texorpdfstring{load\+Compute\+Program()}{loadComputeProgram()}}
{\footnotesize\ttfamily \hyperlink{a08132}{G\+L\+S\+L\+::\+Ptr\+Program} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+RT G\+L\+S\+L\+::load\+Compute\+Program (\begin{DoxyParamCaption}\item[{const char $\ast$}]{compute\+Shader\+File,  }\item[{const G\+L\+S\+L\+::\+String\+List $\ast$}]{macros = {\ttfamily 0},  }\item[{bool}]{verbose = {\ttfamily true} }\end{DoxyParamCaption})}

load glsl compute shader and create \hyperlink{a06188}{G\+L\+SL} program if successful

\hyperlink{a08108}{Shader} file paths for this function are assumed to be relative to the \char`\"{}\+Shader\char`\"{} directory as specified in Shader\+Prog\+Generator\+::get\+Shader\+Dir() 

Definition at line 1154 of file G\+L\+S\+L\+Shader.\+cc.

\mbox{\Hypertarget{a06188_aadbde846fed270474a7c8a1df7c487c3}\label{a06188_aadbde846fed270474a7c8a1df7c487c3}} 
\index{G\+L\+SL@{G\+L\+SL}!load\+Program@{load\+Program}}
\index{load\+Program@{load\+Program}!G\+L\+SL@{G\+L\+SL}}
\subsubsection{\texorpdfstring{load\+Program()}{loadProgram()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \hyperlink{a08132}{G\+L\+S\+L\+::\+Ptr\+Program} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+RT G\+L\+S\+L\+::load\+Program (\begin{DoxyParamCaption}\item[{const char $\ast$}]{vertex\+Shader\+File,  }\item[{const char $\ast$}]{tess\+Control\+Shader\+File,  }\item[{const char $\ast$}]{tess\+Evaluation\+Shader\+File,  }\item[{const char $\ast$}]{geometry\+Shader\+File,  }\item[{const char $\ast$}]{fragment\+Shader\+File,  }\item[{const G\+L\+S\+L\+::\+String\+List $\ast$}]{macros = {\ttfamily 0},  }\item[{bool}]{verbose = {\ttfamily true} }\end{DoxyParamCaption})}

load shaders and create \hyperlink{a06188}{G\+L\+SL} program if successful

\hyperlink{a08108}{Shader} file paths for this function are assumed to be relative to the \char`\"{}\+Shader\char`\"{} directory as specified in Shader\+Prog\+Generator\+::get\+Shader\+Dir() 

Definition at line 1076 of file G\+L\+S\+L\+Shader.\+cc.

\mbox{\Hypertarget{a06188_a8713aaa5b40870d5a027169d8d35004b}\label{a06188_a8713aaa5b40870d5a027169d8d35004b}} 
\index{G\+L\+SL@{G\+L\+SL}!load\+Program@{load\+Program}}
\index{load\+Program@{load\+Program}!G\+L\+SL@{G\+L\+SL}}
\subsubsection{\texorpdfstring{load\+Program()}{loadProgram()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \hyperlink{a08132}{G\+L\+S\+L\+::\+Ptr\+Program} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+RT G\+L\+S\+L\+::load\+Program (\begin{DoxyParamCaption}\item[{const char $\ast$}]{vertex\+Shader\+File,  }\item[{const char $\ast$}]{geometry\+Shader\+File,  }\item[{const char $\ast$}]{fragment\+Shader\+File,  }\item[{const G\+L\+S\+L\+::\+String\+List $\ast$}]{macros = {\ttfamily 0},  }\item[{bool}]{verbose = {\ttfamily true} }\end{DoxyParamCaption})}

load shaders and create \hyperlink{a06188}{G\+L\+SL} program if successful

\hyperlink{a08108}{Shader} file paths for this function are assumed to be relative to the \char`\"{}\+Shader\char`\"{} directory as specified in Shader\+Prog\+Generator\+::get\+Shader\+Dir() 

Definition at line 1143 of file G\+L\+S\+L\+Shader.\+cc.

\mbox{\Hypertarget{a06188_a0f05f686e662363678a8b1f5f6ada41f}\label{a06188_a0f05f686e662363678a8b1f5f6ada41f}} 
\index{G\+L\+SL@{G\+L\+SL}!load\+Program@{load\+Program}}
\index{load\+Program@{load\+Program}!G\+L\+SL@{G\+L\+SL}}
\subsubsection{\texorpdfstring{load\+Program()}{loadProgram()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \hyperlink{a08132}{G\+L\+S\+L\+::\+Ptr\+Program} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+RT G\+L\+S\+L\+::load\+Program (\begin{DoxyParamCaption}\item[{const char $\ast$}]{vertex\+Shader\+File,  }\item[{const char $\ast$}]{fragment\+Shader\+File,  }\item[{const G\+L\+S\+L\+::\+String\+List $\ast$}]{macros = {\ttfamily 0},  }\item[{bool}]{verbose = {\ttfamily true} }\end{DoxyParamCaption})}

load shaders and create \hyperlink{a06188}{G\+L\+SL} program if successful

\hyperlink{a08108}{Shader} file paths for this function are assumed to be relative to the \char`\"{}\+Shader\char`\"{} directory as specified in Shader\+Prog\+Generator\+::get\+Shader\+Dir() 

Definition at line 1149 of file G\+L\+S\+L\+Shader.\+cc.

\mbox{\Hypertarget{a06188_aef2716742dae99d087e88607339223b7}\label{a06188_aef2716742dae99d087e88607339223b7}} 
\index{G\+L\+SL@{G\+L\+SL}!load\+Shader@{load\+Shader}}
\index{load\+Shader@{load\+Shader}!G\+L\+SL@{G\+L\+SL}}
\subsubsection{\texorpdfstring{load\+Shader()}{loadShader()}}
{\footnotesize\ttfamily G\+L\+S\+L\+::\+String\+List A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+RT G\+L\+S\+L\+::load\+Shader (\begin{DoxyParamCaption}\item[{const char $\ast$}]{filename,  }\item[{const G\+L\+S\+L\+::\+String\+List $\ast$}]{macros,  }\item[{bool}]{append\+New\+Line\+Char,  }\item[{G\+L\+S\+L\+::\+String\+List $\ast$}]{out\+Includes }\end{DoxyParamCaption})}



Loads the shader source. 

The shader is assumed to be placed in ../shader relative to the executable\textquotesingle{}s installation directory, if the path is a relative one. If it is determined that the path is absolute, the path is taken as is. Macros are inserted directly after the \#version directive. According to glsl spec, only comments and white space are allowed before \#version.


\begin{DoxyParams}{Parameters}
{\em filename} & filename of shader \\
\hline
{\em macros} & \mbox{[}in\mbox{]} preprocessor macros (optional) \\
\hline
{\em append\+New\+Line\+Char} & should each string in the String\+List end on a \textquotesingle{}~\newline
\textquotesingle{} \\
\hline
{\em out\+Includes} & \mbox{[}out\mbox{]} additional files that were loaded to resolve \#include directives. \\
\hline
\end{DoxyParams}


Definition at line 921 of file G\+L\+S\+L\+Shader.\+cc.

\mbox{\Hypertarget{a06188_a25600b64f6d2d498f60fd73feabcfb3f}\label{a06188_a25600b64f6d2d498f60fd73feabcfb3f}} 
\index{G\+L\+SL@{G\+L\+SL}!load\+Shader\+Rec@{load\+Shader\+Rec}}
\index{load\+Shader\+Rec@{load\+Shader\+Rec}!G\+L\+SL@{G\+L\+SL}}
\subsubsection{\texorpdfstring{load\+Shader\+Rec()}{loadShaderRec()}}
{\footnotesize\ttfamily void G\+L\+S\+L\+::load\+Shader\+Rec (\begin{DoxyParamCaption}\item[{const char $\ast$}]{filename,  }\item[{bool}]{append\+New\+Line\+Char,  }\item[{std\+::map$<$ Q\+String, int $>$ \&}]{include\+Map,  }\item[{G\+L\+S\+L\+::\+String\+List \&}]{shader\+Source }\end{DoxyParamCaption})}



Loads the shader source and all recursive includes. 

The shader is assumed to be placed in ../shader relative to the executable\textquotesingle{}s installation directory, if the path is a relativ one. If it is determined that the path is absolute, the path is taken as is. Included files via the \#include directive are recursively resolved. The include-\/map prevents getting stuck in an include loop. 

Definition at line 855 of file G\+L\+S\+L\+Shader.\+cc.

