\hypertarget{classACG_1_1ShaderCache}{}\section{A\+CG\+:\+:Shader\+Cache Class Reference}
\label{classACG_1_1ShaderCache}\index{A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}}


Cache for shaders.  




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

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structACG_1_1ShaderCache_1_1CacheEntry}{Cache\+Entry}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1ShaderCache_aadce86f7ac2ec6b5349dde376016aea2}\label{classACG_1_1ShaderCache_aadce86f7ac2ec6b5349dde376016aea2}} 
virtual \hyperlink{classACG_1_1ShaderCache_aadce86f7ac2ec6b5349dde376016aea2}{$\sim$\+Shader\+Cache} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
\hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$ \hyperlink{classACG_1_1ShaderCache_af7e74e2c97dcea1fb3c482ea5d8560d0}{get\+Program} (const \hyperlink{classACG_1_1ShaderGenDesc}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const std\+::vector$<$ unsigned int $>$ \&\+\_\+mods)
\begin{DoxyCompactList}\small\item\em Query a dynamically generated program from cache. \end{DoxyCompactList}\item 
\hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$ \hyperlink{classACG_1_1ShaderCache_a7223713ed9b347138be08c3a60ae3328}{get\+Program} (const \hyperlink{classACG_1_1ShaderGenDesc}{Shader\+Gen\+Desc} $\ast$\+\_\+desc, const std\+::vector$<$ unsigned int $>$ $\ast$\+\_\+mods)
\begin{DoxyCompactList}\small\item\em Query a dynamically generated program from cache. \end{DoxyCompactList}\item 
\hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$ \hyperlink{classACG_1_1ShaderCache_a01c8eebff8445ebb64a3f071cd9d1eb9}{get\+Program} (const \hyperlink{classACG_1_1ShaderGenDesc}{Shader\+Gen\+Desc} $\ast$\+\_\+desc)
\begin{DoxyCompactList}\small\item\em Query a dynamically generated program from cache. \end{DoxyCompactList}\item 
\hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$ \hyperlink{classACG_1_1ShaderCache_a6dcc5a54720597b04d3e70f384011e64}{get\+Program} (const char $\ast$\+\_\+vertex\+Shader\+File, const char $\ast$\+\_\+tess\+Control\+Shader\+File, const char $\ast$\+\_\+tess\+Eval\+Shader\+File, const char $\ast$\+\_\+geometry\+Shader\+File, const char $\ast$\+\_\+fragment\+Shader\+File, Q\+String\+List $\ast$\+\_\+macros=0, bool \+\_\+verbose=true)
\begin{DoxyCompactList}\small\item\em Query a static shader program from cache. \end{DoxyCompactList}\item 
\hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$ \hyperlink{classACG_1_1ShaderCache_af916c8cac769d1ead7422a96117f6ded}{get\+Program} (const char $\ast$\+\_\+vertex\+Shader\+File, const char $\ast$\+\_\+fragment\+Shader\+File, Q\+String\+List $\ast$\+\_\+macros=0, bool \+\_\+verbose=true)
\begin{DoxyCompactList}\small\item\em Query a static shader program from cache. \end{DoxyCompactList}\item 
\hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$ \hyperlink{classACG_1_1ShaderCache_ad8324e15ad222ec4e417d13903872b7e}{get\+Compute\+Program} (const char $\ast$\+\_\+compute\+Shader\+File, Q\+String\+List $\ast$\+\_\+macros=0, bool \+\_\+verbose=true)
\begin{DoxyCompactList}\small\item\em Query a static compute shader program from cache. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ShaderCache_a4e5cc32f58b8c07a0e637533525f1173}\label{classACG_1_1ShaderCache_a4e5cc32f58b8c07a0e637533525f1173}} 
void \hyperlink{classACG_1_1ShaderCache_a4e5cc32f58b8c07a0e637533525f1173}{clear\+Cache} ()
\begin{DoxyCompactList}\small\item\em Delete all cached shaders. \end{DoxyCompactList}\item 
void \hyperlink{classACG_1_1ShaderCache_a64ef92586f1ffc80555369b9108607e0}{set\+Time\+Check} (bool \+\_\+on)
\begin{DoxyCompactList}\small\item\em enable or disable checking of the time step of each file \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ShaderCache_ad476efb8d4296dfe60a7d7bce2b1a0b1}\label{classACG_1_1ShaderCache_ad476efb8d4296dfe60a7d7bce2b1a0b1}} 
bool {\bfseries get\+Time\+Check} ()
\item 
\mbox{\Hypertarget{classACG_1_1ShaderCache_aff4fb57be798f3a5317a79d52355b32c}\label{classACG_1_1ShaderCache_aff4fb57be798f3a5317a79d52355b32c}} 
void \hyperlink{classACG_1_1ShaderCache_aff4fb57be798f3a5317a79d52355b32c}{set\+Debug\+Output\+Dir} (const char $\ast$\+\_\+output\+Dir)
\begin{DoxyCompactList}\small\item\em Enable debug output of generated shaders to specified directory. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \hyperlink{classACG_1_1ShaderCache}{Shader\+Cache} $\ast$ \hyperlink{classACG_1_1ShaderCache_a25db1fcdf5081ab345e27732e0d07d56}{get\+Instance} ()
\begin{DoxyCompactList}\small\item\em Return instance of the \hyperlink{classACG_1_1ShaderCache}{Shader\+Cache} singleton. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1ShaderCache_a6d2a936b05ff02eea6042f3bfab1e497}\label{classACG_1_1ShaderCache_a6d2a936b05ff02eea6042f3bfab1e497}} 
typedef std\+::list$<$ std\+::pair$<$ \hyperlink{structACG_1_1ShaderCache_1_1CacheEntry}{Cache\+Entry}, \hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$ $>$ $>$ {\bfseries Cache\+List}
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1ShaderCache_af4e77facba083689e9bb1f3d3af7a122}\label{classACG_1_1ShaderCache_af4e77facba083689e9bb1f3d3af7a122}} 
bool \hyperlink{classACG_1_1ShaderCache_af4e77facba083689e9bb1f3d3af7a122}{compare\+Time\+Stamp} (const \hyperlink{structACG_1_1ShaderCache_1_1CacheEntry}{Cache\+Entry} $\ast$\+\_\+a, const \hyperlink{structACG_1_1ShaderCache_1_1CacheEntry}{Cache\+Entry} $\ast$\+\_\+b)
\begin{DoxyCompactList}\small\item\em Returns true, if the shaders have the timestamp. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ShaderCache_adbca08ba5b298d47e55c5bd946a858a5}\label{classACG_1_1ShaderCache_adbca08ba5b298d47e55c5bd946a858a5}} 
int \hyperlink{classACG_1_1ShaderCache_adbca08ba5b298d47e55c5bd946a858a5}{compare\+Shader\+Gen\+Descs} (const \hyperlink{structACG_1_1ShaderCache_1_1CacheEntry}{Cache\+Entry} $\ast$\+\_\+a, const \hyperlink{structACG_1_1ShaderCache_1_1CacheEntry}{Cache\+Entry} $\ast$\+\_\+b)
\begin{DoxyCompactList}\small\item\em Returns true, if the shaders are not equal. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1ShaderCache_a1bd3368572b93b0756a4dcd19b039ae1}\label{classACG_1_1ShaderCache_a1bd3368572b93b0756a4dcd19b039ae1}} 
Cache\+List \hyperlink{classACG_1_1ShaderCache_a1bd3368572b93b0756a4dcd19b039ae1}{cache\+\_\+}
\begin{DoxyCompactList}\small\item\em cache containing dynamic shaders from \hyperlink{classACG_1_1ShaderProgGenerator}{Shader\+Prog\+Generator} \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ShaderCache_a9008513f4740ecc3a423f872da4345f6}\label{classACG_1_1ShaderCache_a9008513f4740ecc3a423f872da4345f6}} 
Cache\+List \hyperlink{classACG_1_1ShaderCache_a9008513f4740ecc3a423f872da4345f6}{cache\+Static\+\_\+}
\begin{DoxyCompactList}\small\item\em cache containing static shaders loaded from files (separate from dynamic cache to reduce access time) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ShaderCache_a37db4ba59c4ba61a2b782f3f2a198cdc}\label{classACG_1_1ShaderCache_a37db4ba59c4ba61a2b782f3f2a198cdc}} 
Cache\+List \hyperlink{classACG_1_1ShaderCache_a37db4ba59c4ba61a2b782f3f2a198cdc}{cache\+Compute\+Shaders\+\_\+}
\begin{DoxyCompactList}\small\item\em cache for static compute shaders \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ShaderCache_ac6101e10d95ec057c3bfd6e16897ce87}\label{classACG_1_1ShaderCache_ac6101e10d95ec057c3bfd6e16897ce87}} 
bool {\bfseries time\+Check\+\_\+}
\item 
\mbox{\Hypertarget{classACG_1_1ShaderCache_a95dafcd8cca7b2f5802e1326c2f25e19}\label{classACG_1_1ShaderCache_a95dafcd8cca7b2f5802e1326c2f25e19}} 
Q\+String \hyperlink{classACG_1_1ShaderCache_a95dafcd8cca7b2f5802e1326c2f25e19}{dbg\+Output\+Dir\+\_\+}
\begin{DoxyCompactList}\small\item\em output directory for shaders in dynamic cache \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Cache for shaders. 

This class provides a cache for shaders. You can query a \hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} via get\+Program by specifying a \hyperlink{classACG_1_1ShaderGenDesc}{Shader\+Gen\+Desc}. If the program has already been compiled, it is returned from the cache. Otherwise it will be compiled and linked, added to the cache and returned. This ensures, that the shader is not compiled and linked every time, it is used.

\begin{DoxyNote}{Note}
This class is a singleton 
\end{DoxyNote}


Definition at line 73 of file Shader\+Cache.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{classACG_1_1ShaderCache_ad8324e15ad222ec4e417d13903872b7e}\label{classACG_1_1ShaderCache_ad8324e15ad222ec4e417d13903872b7e}} 
\index{A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}!get\+Compute\+Program@{get\+Compute\+Program}}
\index{get\+Compute\+Program@{get\+Compute\+Program}!A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}}
\subsubsection{\texorpdfstring{get\+Compute\+Program()}{getComputeProgram()}}
{\footnotesize\ttfamily \hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$ A\+C\+G\+::\+Shader\+Cache\+::get\+Compute\+Program (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+compute\+Shader\+File,  }\item[{Q\+String\+List $\ast$}]{\+\_\+macros = {\ttfamily 0},  }\item[{bool}]{\+\_\+verbose = {\ttfamily true} }\end{DoxyParamCaption})}



Query a static compute shader program from cache. 

Can be used to load a shader and have external changes automatically applied by the timestamp watchdog. However, the program should be queried every time before using the program as it may have been deleted and recompiled in the meantime.


\begin{DoxyParams}{Parameters}
{\em \+\_\+compute\+Shader\+File} & relative (from shader directory) or absolute filename of vertex shader \\
\hline
{\em \+\_\+macros} & optional list of glsl preprocessor macros, which are added directly after the \#version directive (example\+: \char`\"{}\#define U\+S\+E\+\_\+\+M\+E\+T\+H\+O\+D 1\char`\"{}, \char`\"{}\#define M\+E\+T\+H\+O\+D\+\_\+\+P\+A\+R\+A\+M 0\char`\"{}...) \\
\hline
{\em \+\_\+verbose} & log or suppress error output \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The program (Either from cache or newly compiled and linked) 
\end{DoxyReturn}


Definition at line 441 of file Shader\+Cache.\+cc.

\mbox{\Hypertarget{classACG_1_1ShaderCache_a25db1fcdf5081ab345e27732e0d07d56}\label{classACG_1_1ShaderCache_a25db1fcdf5081ab345e27732e0d07d56}} 
\index{A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}!get\+Instance@{get\+Instance}}
\index{get\+Instance@{get\+Instance}!A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}}
\subsubsection{\texorpdfstring{get\+Instance()}{getInstance()}}
{\footnotesize\ttfamily \hyperlink{classACG_1_1ShaderCache}{Shader\+Cache} $\ast$ A\+C\+G\+::\+Shader\+Cache\+::get\+Instance (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Return instance of the \hyperlink{classACG_1_1ShaderCache}{Shader\+Cache} singleton. 

\begin{DoxyReturn}{Returns}
Instance 
\end{DoxyReturn}


Definition at line 84 of file Shader\+Cache.\+cc.

\mbox{\Hypertarget{classACG_1_1ShaderCache_af7e74e2c97dcea1fb3c482ea5d8560d0}\label{classACG_1_1ShaderCache_af7e74e2c97dcea1fb3c482ea5d8560d0}} 
\index{A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}!get\+Program@{get\+Program}}
\index{get\+Program@{get\+Program}!A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}}
\subsubsection{\texorpdfstring{get\+Program()}{getProgram()}\hspace{0.1cm}{\footnotesize\ttfamily [1/5]}}
{\footnotesize\ttfamily \hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$ A\+C\+G\+::\+Shader\+Cache\+::get\+Program (\begin{DoxyParamCaption}\item[{const \hyperlink{classACG_1_1ShaderGenDesc}{Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc,  }\item[{const std\+::vector$<$ unsigned int $>$ \&}]{\+\_\+mods }\end{DoxyParamCaption})}



Query a dynamically generated program from cache. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+desc} & Shader description \\
\hline
{\em \+\_\+mods} & Combination of active shader modifier ids \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The program (Either from cache or newly compiled and linked) 
\end{DoxyReturn}


Definition at line 102 of file Shader\+Cache.\+cc.

\mbox{\Hypertarget{classACG_1_1ShaderCache_a7223713ed9b347138be08c3a60ae3328}\label{classACG_1_1ShaderCache_a7223713ed9b347138be08c3a60ae3328}} 
\index{A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}!get\+Program@{get\+Program}}
\index{get\+Program@{get\+Program}!A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}}
\subsubsection{\texorpdfstring{get\+Program()}{getProgram()}\hspace{0.1cm}{\footnotesize\ttfamily [2/5]}}
{\footnotesize\ttfamily \hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program}$\ast$ A\+C\+G\+::\+Shader\+Cache\+::get\+Program (\begin{DoxyParamCaption}\item[{const \hyperlink{classACG_1_1ShaderGenDesc}{Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc,  }\item[{const std\+::vector$<$ unsigned int $>$ $\ast$}]{\+\_\+mods }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Query a dynamically generated program from cache. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+desc} & Shader description \\
\hline
{\em \+\_\+mods} & Combination of active shader modifier ids \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The program (Either from cache or newly compiled and linked) 
\end{DoxyReturn}


Definition at line 101 of file Shader\+Cache.\+hh.

\mbox{\Hypertarget{classACG_1_1ShaderCache_a01c8eebff8445ebb64a3f071cd9d1eb9}\label{classACG_1_1ShaderCache_a01c8eebff8445ebb64a3f071cd9d1eb9}} 
\index{A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}!get\+Program@{get\+Program}}
\index{get\+Program@{get\+Program}!A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}}
\subsubsection{\texorpdfstring{get\+Program()}{getProgram()}\hspace{0.1cm}{\footnotesize\ttfamily [3/5]}}
{\footnotesize\ttfamily \hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$ A\+C\+G\+::\+Shader\+Cache\+::get\+Program (\begin{DoxyParamCaption}\item[{const \hyperlink{classACG_1_1ShaderGenDesc}{Shader\+Gen\+Desc} $\ast$}]{\+\_\+desc }\end{DoxyParamCaption})}



Query a dynamically generated program from cache. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+desc} & Shader description \\
\hline
{\em \+\_\+mods} & Combination of active shader modifier ids \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The program (Either from cache or newly compiled and linked) 
\end{DoxyReturn}


Definition at line 91 of file Shader\+Cache.\+cc.

\mbox{\Hypertarget{classACG_1_1ShaderCache_a6dcc5a54720597b04d3e70f384011e64}\label{classACG_1_1ShaderCache_a6dcc5a54720597b04d3e70f384011e64}} 
\index{A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}!get\+Program@{get\+Program}}
\index{get\+Program@{get\+Program}!A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}}
\subsubsection{\texorpdfstring{get\+Program()}{getProgram()}\hspace{0.1cm}{\footnotesize\ttfamily [4/5]}}
{\footnotesize\ttfamily \hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$ A\+C\+G\+::\+Shader\+Cache\+::get\+Program (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+vertex\+Shader\+File,  }\item[{const char $\ast$}]{\+\_\+tess\+Control\+Shader\+File,  }\item[{const char $\ast$}]{\+\_\+tess\+Eval\+Shader\+File,  }\item[{const char $\ast$}]{\+\_\+geometry\+Shader\+File,  }\item[{const char $\ast$}]{\+\_\+fragment\+Shader\+File,  }\item[{Q\+String\+List $\ast$}]{\+\_\+macros = {\ttfamily 0},  }\item[{bool}]{\+\_\+verbose = {\ttfamily true} }\end{DoxyParamCaption})}



Query a static shader program from cache. 

Can be used to load a shader and have external changes automatically applied by the timestamp watchdog. However, the program should be queried every time before using the program as it may have been deleted and recompiled in the meantime.


\begin{DoxyParams}{Parameters}
{\em \+\_\+vertex\+Shader\+File} & relative (from shader directory) or absolute filename of vertex shader \\
\hline
{\em \+\_\+tess\+Control\+Shader\+File} & relative (from shader directory) or absolute filename of tessellation control shader, null accepted \\
\hline
{\em \+\_\+tess\+Eval\+Shader\+File} & relative (from shader directory) or absolute filename of tessellation eval shader, null accepted \\
\hline
{\em \+\_\+geometry\+Shader\+File} & relative (from shader directory) or absolute filename of geometry shader, null accepted \\
\hline
{\em \+\_\+fragment\+Shader\+File} & relative (from shader directory) or absolute filename of fragment shader \\
\hline
{\em \+\_\+macros} & optional list of glsl preprocessor macros, which are added directly after the \#version directive (example\+: \char`\"{}\#define U\+S\+E\+\_\+\+M\+E\+T\+H\+O\+D 1\char`\"{}, \char`\"{}\#define M\+E\+T\+H\+O\+D\+\_\+\+P\+A\+R\+A\+M 0\char`\"{}...) \\
\hline
{\em \+\_\+verbose} & log or suppress error output \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The program (Either from cache or newly compiled and linked) 
\end{DoxyReturn}


Definition at line 282 of file Shader\+Cache.\+cc.

\mbox{\Hypertarget{classACG_1_1ShaderCache_af916c8cac769d1ead7422a96117f6ded}\label{classACG_1_1ShaderCache_af916c8cac769d1ead7422a96117f6ded}} 
\index{A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}!get\+Program@{get\+Program}}
\index{get\+Program@{get\+Program}!A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}}
\subsubsection{\texorpdfstring{get\+Program()}{getProgram()}\hspace{0.1cm}{\footnotesize\ttfamily [5/5]}}
{\footnotesize\ttfamily \hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$ A\+C\+G\+::\+Shader\+Cache\+::get\+Program (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+vertex\+Shader\+File,  }\item[{const char $\ast$}]{\+\_\+fragment\+Shader\+File,  }\item[{Q\+String\+List $\ast$}]{\+\_\+macros = {\ttfamily 0},  }\item[{bool}]{\+\_\+verbose = {\ttfamily true} }\end{DoxyParamCaption})}



Query a static shader program from cache. 

Can be used to load a shader and have external changes automatically applied by the timestamp watchdog. However, the program should be queried every time before using the program as it may have been deleted and recompiled in the meantime.


\begin{DoxyParams}{Parameters}
{\em \+\_\+vertex\+Shader\+File} & relative (from shader directory) or absolute filename of vertex shader \\
\hline
{\em \+\_\+fragment\+Shader\+File} & relative (from shader directory) or absolute filename of fragment shader \\
\hline
{\em \+\_\+macros} & optional list of glsl preprocessor macros, which are added directly after the \#version directive (example\+: \char`\"{}\#define U\+S\+E\+\_\+\+M\+E\+T\+H\+O\+D 1\char`\"{}, \char`\"{}\#define M\+E\+T\+H\+O\+D\+\_\+\+P\+A\+R\+A\+M 0\char`\"{}...) \\
\hline
{\em \+\_\+verbose} & log or suppress error output \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The program (Either from cache or newly compiled and linked) 
\end{DoxyReturn}


Definition at line 436 of file Shader\+Cache.\+cc.

\mbox{\Hypertarget{classACG_1_1ShaderCache_a64ef92586f1ffc80555369b9108607e0}\label{classACG_1_1ShaderCache_a64ef92586f1ffc80555369b9108607e0}} 
\index{A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}!set\+Time\+Check@{set\+Time\+Check}}
\index{set\+Time\+Check@{set\+Time\+Check}!A\+C\+G\+::\+Shader\+Cache@{A\+C\+G\+::\+Shader\+Cache}}
\subsubsection{\texorpdfstring{set\+Time\+Check()}{setTimeCheck()}}
{\footnotesize\ttfamily void A\+C\+G\+::\+Shader\+Cache\+::set\+Time\+Check (\begin{DoxyParamCaption}\item[{bool}]{\+\_\+on }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



enable or disable checking of the time step of each file 



Definition at line 171 of file Shader\+Cache.\+hh.



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