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


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


\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classGLSL_1_1ComputeShader}{Compute\+Shader}
\begin{DoxyCompactList}\small\item\em \hyperlink{namespaceGLSL}{G\+L\+SL} compute shader. \end{DoxyCompactList}\item 
class \hyperlink{classGLSL_1_1FragmentShader}{Fragment\+Shader}
\begin{DoxyCompactList}\small\item\em \hyperlink{namespaceGLSL}{G\+L\+SL} fragment shader. \end{DoxyCompactList}\item 
class \hyperlink{classGLSL_1_1GeometryShader}{Geometry\+Shader}
\begin{DoxyCompactList}\small\item\em \hyperlink{namespaceGLSL}{G\+L\+SL} geometry shader. \end{DoxyCompactList}\item 
class \hyperlink{classGLSL_1_1Program}{Program}
\begin{DoxyCompactList}\small\item\em \hyperlink{namespaceGLSL}{G\+L\+SL} program class. \end{DoxyCompactList}\item 
class \hyperlink{classGLSL_1_1Shader}{Shader}
\begin{DoxyCompactList}\small\item\em A generic shader base class. \end{DoxyCompactList}\item 
class \hyperlink{classGLSL_1_1UniformPool}{Uniform\+Pool}
\begin{DoxyCompactList}\small\item\em \hyperlink{namespaceGLSL}{G\+L\+SL} uniform pool. \end{DoxyCompactList}\item 
class \hyperlink{classGLSL_1_1VertexShader}{Vertex\+Shader}
\begin{DoxyCompactList}\small\item\em \hyperlink{namespaceGLSL}{G\+L\+SL} vertex shader. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{namespaceGLSL_ab0271c685c9d3678ec03e5fe5fd200ca}\label{namespaceGLSL_ab0271c685c9d3678ec03e5fe5fd200ca}} 
typedef std\+::list$<$ std\+::string $>$ {\bfseries String\+List}
\item 
\mbox{\Hypertarget{namespaceGLSL_a15d034f967d55a97fc4873f7d7579b06}\label{namespaceGLSL_a15d034f967d55a97fc4873f7d7579b06}} 
typedef \hyperlink{classGLSL_1_1Shader}{Shader} $\ast$ {\bfseries Ptr\+Shader}
\item 
\mbox{\Hypertarget{namespaceGLSL_ad3d59223e0b4cf515fa06b51e47e32c8}\label{namespaceGLSL_ad3d59223e0b4cf515fa06b51e47e32c8}} 
typedef const \hyperlink{classGLSL_1_1Shader}{Shader} $\ast$ {\bfseries Ptr\+Const\+Shader}
\item 
\mbox{\Hypertarget{namespaceGLSL_aff61e6af4b7bb30ae175d249f36a3c2b}\label{namespaceGLSL_aff61e6af4b7bb30ae175d249f36a3c2b}} 
typedef \hyperlink{classGLSL_1_1VertexShader}{Vertex\+Shader} $\ast$ {\bfseries Ptr\+Vertex\+Shader}
\item 
\mbox{\Hypertarget{namespaceGLSL_a77fc5893c8b442b6738513363d374e7d}\label{namespaceGLSL_a77fc5893c8b442b6738513363d374e7d}} 
typedef const \hyperlink{classGLSL_1_1VertexShader}{Vertex\+Shader} $\ast$ {\bfseries Ptr\+Vertex\+Const\+Shader}
\item 
\mbox{\Hypertarget{namespaceGLSL_aeb86af9fa024596df33467183a1ee152}\label{namespaceGLSL_aeb86af9fa024596df33467183a1ee152}} 
typedef \hyperlink{classGLSL_1_1FragmentShader}{Fragment\+Shader} $\ast$ {\bfseries Ptr\+Fragment\+Shader}
\item 
\mbox{\Hypertarget{namespaceGLSL_a6bc2b86d29f3f3cf9f7e71d776f107c1}\label{namespaceGLSL_a6bc2b86d29f3f3cf9f7e71d776f107c1}} 
typedef const \hyperlink{classGLSL_1_1FragmentShader}{Fragment\+Shader} $\ast$ {\bfseries Ptr\+Const\+Fragment\+Shader}
\item 
\mbox{\Hypertarget{namespaceGLSL_a4d2b7f55c85b29e7f5006e0d36717779}\label{namespaceGLSL_a4d2b7f55c85b29e7f5006e0d36717779}} 
typedef \hyperlink{classGLSL_1_1GeometryShader}{Geometry\+Shader} $\ast$ {\bfseries Ptr\+Geometry\+Shader}
\item 
\mbox{\Hypertarget{namespaceGLSL_a51e094c52b216895f828d9d9532841ca}\label{namespaceGLSL_a51e094c52b216895f828d9d9532841ca}} 
typedef const \hyperlink{classGLSL_1_1GeometryShader}{Geometry\+Shader} $\ast$ {\bfseries Ptr\+Const\+Geometry\+Shader}
\item 
\mbox{\Hypertarget{namespaceGLSL_acc9bd428022217abd390cb4f9a481ecd}\label{namespaceGLSL_acc9bd428022217abd390cb4f9a481ecd}} 
typedef \hyperlink{classGLSL_1_1ComputeShader}{Compute\+Shader} $\ast$ {\bfseries Ptr\+Compute\+Shader}
\item 
\mbox{\Hypertarget{namespaceGLSL_a1b65dc0c981907c4c7b9672e8b75d4a7}\label{namespaceGLSL_a1b65dc0c981907c4c7b9672e8b75d4a7}} 
typedef const \hyperlink{classGLSL_1_1ComputeShader}{Compute\+Shader} $\ast$ {\bfseries Ptr\+Const\+Compute\+Shader}
\item 
\mbox{\Hypertarget{namespaceGLSL_ae47e3c255455cacb21b69840b0b773e5}\label{namespaceGLSL_ae47e3c255455cacb21b69840b0b773e5}} 
typedef \hyperlink{classGLSL_1_1Program}{Program} $\ast$ {\bfseries Ptr\+Program}
\item 
\mbox{\Hypertarget{namespaceGLSL_a2c09ef18ccedbf16ba1da299bff11436}\label{namespaceGLSL_a2c09ef18ccedbf16ba1da299bff11436}} 
typedef const \hyperlink{classGLSL_1_1Program}{Program} $\ast$ {\bfseries Ptr\+Const\+Program}
\item 
\mbox{\Hypertarget{namespaceGLSL_a8666aec6213e11a0f51b21fe7085c8bb}\label{namespaceGLSL_a8666aec6213e11a0f51b21fe7085c8bb}} 
typedef \hyperlink{classGLSL_1_1UniformPool}{Uniform\+Pool} $\ast$ {\bfseries Ptr\+Uniform\+Pool}
\item 
\mbox{\Hypertarget{namespaceGLSL_a96cb5ab50fd179374c103ca3550c5b10}\label{namespaceGLSL_a96cb5ab50fd179374c103ca3550c5b10}} 
typedef const \hyperlink{classGLSL_1_1UniformPool}{Uniform\+Pool} $\ast$ {\bfseries Ptr\+Const\+Uniform\+Pool}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{namespaceGLSL_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{namespaceGLSL_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{namespaceGLSL_affa742c529a11d203a8f19d409ead6f0}\label{namespaceGLSL_affa742c529a11d203a8f19d409ead6f0}} 
\hyperlink{classGLSL_1_1VertexShader}{G\+L\+S\+L\+::\+Ptr\+Vertex\+Shader} \hyperlink{namespaceGLSL_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{namespaceGLSL_a2d4a56ad7ab6220e459b95d690f6ff8e}\label{namespaceGLSL_a2d4a56ad7ab6220e459b95d690f6ff8e}} 
\hyperlink{classGLSL_1_1FragmentShader}{G\+L\+S\+L\+::\+Ptr\+Fragment\+Shader} \hyperlink{namespaceGLSL_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{namespaceGLSL_a8829a03b4b555262a58e984580bb9c43}\label{namespaceGLSL_a8829a03b4b555262a58e984580bb9c43}} 
\hyperlink{classGLSL_1_1GeometryShader}{G\+L\+S\+L\+::\+Ptr\+Geometry\+Shader} \hyperlink{namespaceGLSL_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{namespaceGLSL_a32f2759e28e7a51dc758428c31fbdf61}\label{namespaceGLSL_a32f2759e28e7a51dc758428c31fbdf61}} 
\hyperlink{classGLSL_1_1Shader}{G\+L\+S\+L\+::\+Ptr\+Shader} \hyperlink{namespaceGLSL_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{namespaceGLSL_aa03e691829b45dc5e78f203c8cc7d641}\label{namespaceGLSL_aa03e691829b45dc5e78f203c8cc7d641}} 
\hyperlink{classGLSL_1_1Shader}{G\+L\+S\+L\+::\+Ptr\+Shader} \hyperlink{namespaceGLSL_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{namespaceGLSL_a0545306a0ce6bb3490a208535dafac4b}\label{namespaceGLSL_a0545306a0ce6bb3490a208535dafac4b}} 
\hyperlink{classGLSL_1_1ComputeShader}{G\+L\+S\+L\+::\+Ptr\+Compute\+Shader} \hyperlink{namespaceGLSL_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{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Ptr\+Program} \hyperlink{namespaceGLSL_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{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Ptr\+Program} \hyperlink{namespaceGLSL_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{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Ptr\+Program} \hyperlink{namespaceGLSL_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{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Ptr\+Program} \hyperlink{namespaceGLSL_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{namespaceGLSL}{G\+L\+SL} shader and program objects. 

\subsection{Function Documentation}
\mbox{\Hypertarget{namespaceGLSL_afd4a7fd8c727e94e3da0b3d39af41507}\label{namespaceGLSL_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{classGLSL_1_1Program}{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{namespaceGLSL}{G\+L\+SL} program if successful

\hyperlink{classGLSL_1_1Shader}{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{namespaceGLSL_aadbde846fed270474a7c8a1df7c487c3}\label{namespaceGLSL_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{classGLSL_1_1Program}{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{namespaceGLSL}{G\+L\+SL} program if successful

\hyperlink{classGLSL_1_1Shader}{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{namespaceGLSL_a8713aaa5b40870d5a027169d8d35004b}\label{namespaceGLSL_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{classGLSL_1_1Program}{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{namespaceGLSL}{G\+L\+SL} program if successful

\hyperlink{classGLSL_1_1Shader}{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{namespaceGLSL_a0f05f686e662363678a8b1f5f6ada41f}\label{namespaceGLSL_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{classGLSL_1_1Program}{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{namespaceGLSL}{G\+L\+SL} program if successful

\hyperlink{classGLSL_1_1Shader}{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{namespaceGLSL_aef2716742dae99d087e88607339223b7}\label{namespaceGLSL_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{namespaceGLSL_a25600b64f6d2d498f60fd73feabcfb3f}\label{namespaceGLSL_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.

