\hypertarget{a03348}{\section{A\+C\+G\+:\+:Scene\+Graph\+:\+:G\+L\+S\+L Namespace Reference}
\label{a03348}\index{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L@{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L}}
}


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


\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{a00447}{Compute\+Shader}
\begin{DoxyCompactList}\small\item\em \hyperlink{a03348}{G\+L\+S\+L} compute shader. \end{DoxyCompactList}\item 
class \hyperlink{a00600}{Fragment\+Shader}
\begin{DoxyCompactList}\small\item\em \hyperlink{a03348}{G\+L\+S\+L} fragment shader. \end{DoxyCompactList}\item 
class \hyperlink{a00629}{Geometry\+Shader}
\begin{DoxyCompactList}\small\item\em \hyperlink{a03348}{G\+L\+S\+L} geometry shader. \end{DoxyCompactList}\item 
class \hyperlink{a01019}{Program}
\begin{DoxyCompactList}\small\item\em \hyperlink{a03348}{G\+L\+S\+L} program class. \end{DoxyCompactList}\item 
class \hyperlink{a01154}{Shader}
\begin{DoxyCompactList}\small\item\em A generic shader base class. \end{DoxyCompactList}\item 
class \hyperlink{a01385}{Uniform\+Pool}
\begin{DoxyCompactList}\small\item\em \hyperlink{a03348}{G\+L\+S\+L} uniform pool. \end{DoxyCompactList}\item 
class \hyperlink{a01434}{Vertex\+Shader}
\begin{DoxyCompactList}\small\item\em \hyperlink{a03348}{G\+L\+S\+L} vertex shader. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a03348_a102499e55576375d1615eec6957aaf4a}{typedef std\+::list$<$ std\+::string $>$ {\bfseries String\+List}}\label{a03348_a102499e55576375d1615eec6957aaf4a}

\item 
\hypertarget{a03348_a49b37eec450796c6d27d6905ad1a7165}{typedef \hyperlink{a01154}{Shader} $\ast$ {\bfseries Ptr\+Shader}}\label{a03348_a49b37eec450796c6d27d6905ad1a7165}

\item 
\hypertarget{a03348_a213b219166ac8e84594d3eba64ea44e7}{typedef const \hyperlink{a01154}{Shader} $\ast$ {\bfseries Ptr\+Const\+Shader}}\label{a03348_a213b219166ac8e84594d3eba64ea44e7}

\item 
\hypertarget{a03348_a1b57b0686ad1e5bc464b4a33fff71717}{typedef \hyperlink{a01434}{Vertex\+Shader} $\ast$ {\bfseries Ptr\+Vertex\+Shader}}\label{a03348_a1b57b0686ad1e5bc464b4a33fff71717}

\item 
\hypertarget{a03348_a2667671bdc34e2e21968f62487b05715}{typedef const \hyperlink{a01434}{Vertex\+Shader} $\ast$ {\bfseries Ptr\+Vertex\+Const\+Shader}}\label{a03348_a2667671bdc34e2e21968f62487b05715}

\item 
\hypertarget{a03348_a1b8ba24bc3216a5803123c969c35515d}{typedef \hyperlink{a00600}{Fragment\+Shader} $\ast$ {\bfseries Ptr\+Fragment\+Shader}}\label{a03348_a1b8ba24bc3216a5803123c969c35515d}

\item 
\hypertarget{a03348_a87583bdda72450be23bf5b6e2a97f1a4}{typedef const \hyperlink{a00600}{Fragment\+Shader} $\ast$ {\bfseries Ptr\+Const\+Fragment\+Shader}}\label{a03348_a87583bdda72450be23bf5b6e2a97f1a4}

\item 
\hypertarget{a03348_aa25267b3bd228acc488844bacfc16cd7}{typedef \hyperlink{a00629}{Geometry\+Shader} $\ast$ {\bfseries Ptr\+Geometry\+Shader}}\label{a03348_aa25267b3bd228acc488844bacfc16cd7}

\item 
\hypertarget{a03348_a8869af5b4e3809abc58f8e1cf50cbeae}{typedef const \hyperlink{a00629}{Geometry\+Shader} $\ast$ {\bfseries Ptr\+Const\+Geometry\+Shader}}\label{a03348_a8869af5b4e3809abc58f8e1cf50cbeae}

\item 
\hypertarget{a03348_a3e0d30e09378f4448e04db5477260480}{typedef \hyperlink{a00447}{Compute\+Shader} $\ast$ {\bfseries Ptr\+Compute\+Shader}}\label{a03348_a3e0d30e09378f4448e04db5477260480}

\item 
\hypertarget{a03348_a1e09c9e8e0539bb08ae08a734bc4b5d3}{typedef const \hyperlink{a00447}{Compute\+Shader} $\ast$ {\bfseries Ptr\+Const\+Compute\+Shader}}\label{a03348_a1e09c9e8e0539bb08ae08a734bc4b5d3}

\item 
\hypertarget{a03348_a66358990ac266b4c79b6fd573d886eed}{typedef \hyperlink{a01019}{Program} $\ast$ {\bfseries Ptr\+Program}}\label{a03348_a66358990ac266b4c79b6fd573d886eed}

\item 
\hypertarget{a03348_a80f3a66b3f50b273c442153d6bdaa024}{typedef const \hyperlink{a01019}{Program} $\ast$ {\bfseries Ptr\+Const\+Program}}\label{a03348_a80f3a66b3f50b273c442153d6bdaa024}

\item 
\hypertarget{a03348_a97d8f3d7553b2764e34cf18677867feb}{typedef \hyperlink{a01385}{Uniform\+Pool} $\ast$ {\bfseries Ptr\+Uniform\+Pool}}\label{a03348_a97d8f3d7553b2764e34cf18677867feb}

\item 
\hypertarget{a03348_a41ba0b0728add4303a73b96bbc266eee}{typedef const \hyperlink{a01385}{Uniform\+Pool} $\ast$ {\bfseries Ptr\+Const\+Uniform\+Pool}}\label{a03348_a41ba0b0728add4303a73b96bbc266eee}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
G\+L\+S\+L\+::\+String\+List A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T \hyperlink{a03348_a51439a11f60cdfb2ec82e37307829d43}{load\+Shader} (const char $\ast$filename, const G\+L\+S\+L\+::\+String\+List $\ast$macros=0, bool append\+New\+Line\+Char=true, G\+L\+S\+L\+::\+String\+List $\ast$out\+Includes=0)
\begin{DoxyCompactList}\small\item\em Loads the shader source. \end{DoxyCompactList}\item 
\hypertarget{a03348_acdbe93dcfe14b2c30bca217435e77f18}{\hyperlink{a01434}{G\+L\+S\+L\+::\+Ptr\+Vertex\+Shader} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T \hyperlink{a03348_acdbe93dcfe14b2c30bca217435e77f18}{load\+Vertex\+Shader} (const char $\ast$name, const G\+L\+S\+L\+::\+String\+List $\ast$macros=0, bool verbose=true)}\label{a03348_acdbe93dcfe14b2c30bca217435e77f18}

\begin{DoxyCompactList}\small\item\em Loads, compiles and installs a new vertex shader. \end{DoxyCompactList}\item 
\hypertarget{a03348_a7d145fcaf7ddbc840dad755b9497edb1}{\hyperlink{a00600}{G\+L\+S\+L\+::\+Ptr\+Fragment\+Shader} \\*
A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T \hyperlink{a03348_a7d145fcaf7ddbc840dad755b9497edb1}{load\+Fragment\+Shader} (const char $\ast$name, const G\+L\+S\+L\+::\+String\+List $\ast$macros=0, bool verbose=true)}\label{a03348_a7d145fcaf7ddbc840dad755b9497edb1}

\begin{DoxyCompactList}\small\item\em Loads, compiles and installs a new vertex shader. \end{DoxyCompactList}\item 
\hypertarget{a03348_a75af0cedc4e651b71eee003d1ba603ab}{\hyperlink{a00629}{G\+L\+S\+L\+::\+Ptr\+Geometry\+Shader} \\*
A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T \hyperlink{a03348_a75af0cedc4e651b71eee003d1ba603ab}{load\+Geometry\+Shader} (const char $\ast$name, const G\+L\+S\+L\+::\+String\+List $\ast$macros=0, bool verbose=true)}\label{a03348_a75af0cedc4e651b71eee003d1ba603ab}

\begin{DoxyCompactList}\small\item\em Loads, compiles and installs a new vertex shader. \end{DoxyCompactList}\item 
\hypertarget{a03348_a3ed020e96ba1d48d6699db45e8eecb9b}{\hyperlink{a01154}{G\+L\+S\+L\+::\+Ptr\+Shader} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T \hyperlink{a03348_a3ed020e96ba1d48d6699db45e8eecb9b}{load\+Tess\+Control\+Shader} (const char $\ast$name, const G\+L\+S\+L\+::\+String\+List $\ast$macros=0, bool verbose=true)}\label{a03348_a3ed020e96ba1d48d6699db45e8eecb9b}

\begin{DoxyCompactList}\small\item\em Loads, compiles and installs a new tessellation control shader. \end{DoxyCompactList}\item 
\hypertarget{a03348_a52d151be5348f99fa23f9d27ef2af649}{\hyperlink{a01154}{G\+L\+S\+L\+::\+Ptr\+Shader} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T \hyperlink{a03348_a52d151be5348f99fa23f9d27ef2af649}{load\+Tess\+Evaluation\+Shader} (const char $\ast$name, const G\+L\+S\+L\+::\+String\+List $\ast$macros=0, bool verbose=true)}\label{a03348_a52d151be5348f99fa23f9d27ef2af649}

\begin{DoxyCompactList}\small\item\em Loads, compiles and installs a new tessellation evaluation shader. \end{DoxyCompactList}\item 
\hypertarget{a03348_a9c76355a5a035632fbb44473aed76f35}{\hyperlink{a00447}{G\+L\+S\+L\+::\+Ptr\+Compute\+Shader} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T \hyperlink{a03348_a9c76355a5a035632fbb44473aed76f35}{load\+Compute\+Shader} (const char $\ast$name, const G\+L\+S\+L\+::\+String\+List $\ast$macros=0, bool verbose=true)}\label{a03348_a9c76355a5a035632fbb44473aed76f35}

\begin{DoxyCompactList}\small\item\em Loads, compiles and installs a new compute shader. \end{DoxyCompactList}\item 
\hyperlink{a01019}{G\+L\+S\+L\+::\+Ptr\+Program} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T \hyperlink{a03348_a758a78e1c188c7880712e9515bb590ee}{load\+Program} (const char $\ast$vertex\+Shader\+File, const char $\ast$fragment\+Shader\+File, const G\+L\+S\+L\+::\+String\+List $\ast$macros=0, bool verbose=true)
\item 
\hyperlink{a01019}{G\+L\+S\+L\+::\+Ptr\+Program} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T \hyperlink{a03348_a04c2a7bcd99db2bc1f76129b76094092}{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=0, bool verbose=true)
\item 
\hyperlink{a01019}{G\+L\+S\+L\+::\+Ptr\+Program} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T \hyperlink{a03348_ac52e740d60ffa595641bff129232afa9}{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=0, bool verbose=true)
\item 
\hyperlink{a01019}{G\+L\+S\+L\+::\+Ptr\+Program} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T \hyperlink{a03348_aacca331c78915f8a585b613797c93bc8}{load\+Compute\+Program} (const char $\ast$compute\+Shader\+File, const G\+L\+S\+L\+::\+String\+List $\ast$macros=0, bool verbose=true)
\end{DoxyCompactItemize}


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

\subsection{Function Documentation}
\hypertarget{a03348_aacca331c78915f8a585b613797c93bc8}{\index{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L@{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L}!load\+Compute\+Program@{load\+Compute\+Program}}
\index{load\+Compute\+Program@{load\+Compute\+Program}!A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L@{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L}}
\subsubsection[{load\+Compute\+Program}]{\setlength{\rightskip}{0pt plus 5cm}{\bf G\+L\+S\+L\+::\+Ptr\+Program} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T A\+C\+G\+::\+Scene\+Graph\+::\+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}
)}}\label{a03348_aacca331c78915f8a585b613797c93bc8}
load glsl compute shader and create \hyperlink{a03348}{G\+L\+S\+L} program if successful

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

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

\hypertarget{a03348_a758a78e1c188c7880712e9515bb590ee}{\index{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L@{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L}!load\+Program@{load\+Program}}
\index{load\+Program@{load\+Program}!A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L@{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L}}
\subsubsection[{load\+Program}]{\setlength{\rightskip}{0pt plus 5cm}{\bf G\+L\+S\+L\+::\+Ptr\+Program} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T A\+C\+G\+::\+Scene\+Graph\+::\+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}
)}}\label{a03348_a758a78e1c188c7880712e9515bb590ee}
load shaders and create \hyperlink{a03348}{G\+L\+S\+L} program if successful

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

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

\hypertarget{a03348_a04c2a7bcd99db2bc1f76129b76094092}{\index{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L@{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L}!load\+Program@{load\+Program}}
\index{load\+Program@{load\+Program}!A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L@{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L}}
\subsubsection[{load\+Program}]{\setlength{\rightskip}{0pt plus 5cm}{\bf G\+L\+S\+L\+::\+Ptr\+Program} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T A\+C\+G\+::\+Scene\+Graph\+::\+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}
)}}\label{a03348_a04c2a7bcd99db2bc1f76129b76094092}
load shaders and create \hyperlink{a03348}{G\+L\+S\+L} program if successful

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

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

\hypertarget{a03348_ac52e740d60ffa595641bff129232afa9}{\index{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L@{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L}!load\+Program@{load\+Program}}
\index{load\+Program@{load\+Program}!A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L@{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L}}
\subsubsection[{load\+Program}]{\setlength{\rightskip}{0pt plus 5cm}{\bf G\+L\+S\+L\+::\+Ptr\+Program} A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T A\+C\+G\+::\+Scene\+Graph\+::\+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}
)}}\label{a03348_ac52e740d60ffa595641bff129232afa9}
load shaders and create \hyperlink{a03348}{G\+L\+S\+L} program if successful

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

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

\hypertarget{a03348_a51439a11f60cdfb2ec82e37307829d43}{\index{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L@{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L}!load\+Shader@{load\+Shader}}
\index{load\+Shader@{load\+Shader}!A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L@{A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L}}
\subsubsection[{load\+Shader}]{\setlength{\rightskip}{0pt plus 5cm}G\+L\+S\+L\+::\+String\+List A\+C\+G\+D\+L\+L\+E\+X\+P\+O\+R\+T A\+C\+G\+::\+Scene\+Graph\+::\+G\+L\+S\+L\+::load\+Shader (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{filename, }
\item[{const G\+L\+S\+L\+::\+String\+List $\ast$}]{macros = {\ttfamily 0}, }
\item[{bool}]{append\+New\+Line\+Char = {\ttfamily true}, }
\item[{G\+L\+S\+L\+::\+String\+List $\ast$}]{out\+Includes = {\ttfamily 0}}
\end{DoxyParamCaption}
)}}\label{a03348_a51439a11f60cdfb2ec82e37307829d43}


Loads the shader source. 

The shader is assumed to be placed in ../shader relative to the executable'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 '~\newline
' \\
\hline
{\em out\+Includes} & \mbox{[}out\mbox{]} additional files that were loaded to resolve \#include directives. \\
\hline
\end{DoxyParams}


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

