\hypertarget{classACG_1_1ScreenQuad}{}\section{A\+CG\+:\+:Screen\+Quad Class Reference}
\label{classACG_1_1ScreenQuad}\index{A\+C\+G\+::\+Screen\+Quad@{A\+C\+G\+::\+Screen\+Quad}}


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

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1ScreenQuad_af74ba7fd111b15d3544346dd9a0b7371}\label{classACG_1_1ScreenQuad_af74ba7fd111b15d3544346dd9a0b7371}} 
\hyperlink{classACG_1_1ScreenQuad_af74ba7fd111b15d3544346dd9a0b7371}{$\sim$\+Screen\+Quad} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static void \hyperlink{classACG_1_1ScreenQuad_a2deea2d329efedb39a3972721564bf20}{draw} (\hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$\+\_\+prog=0)
\begin{DoxyCompactList}\small\item\em Draw the screen quad. \end{DoxyCompactList}\item 
static void \hyperlink{classACG_1_1ScreenQuad_a2db7429eb8ff86c6598d0b6a477c3081}{draw\+Instanced} (int \+\_\+count, \hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$\+\_\+prog=0)
\begin{DoxyCompactList}\small\item\em Draw the screen quad with instancing. \end{DoxyCompactList}\item 
static void \hyperlink{classACG_1_1ScreenQuad_ab663135be43264406f907f49a976855d}{draw\+Texture2D} (G\+Luint \+\_\+texture, const \hyperlink{namespaceACG_a8b858737aebd55e312149cf208a0b3f3}{Vec2f} \&\+\_\+offset=\hyperlink{namespaceACG_a8b858737aebd55e312149cf208a0b3f3}{Vec2f}(0.\+0f, 0.\+0f), const Vec2f \&\+\_\+size=\+Vec2f(1.\+0f, 1.\+0f))
\begin{DoxyCompactList}\small\item\em Draw a 2D texture to screen. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1ScreenQuad_ab9752580e12d9c92801956bf84018694}\label{classACG_1_1ScreenQuad_ab9752580e12d9c92801956bf84018694}} 
\hyperlink{classACG_1_1ScreenQuad_ab9752580e12d9c92801956bf84018694}{Screen\+Quad} ()
\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ScreenQuad_a31457b307417364245f65a8caa71dc1f}\label{classACG_1_1ScreenQuad_a31457b307417364245f65a8caa71dc1f}} 
void \hyperlink{classACG_1_1ScreenQuad_a31457b307417364245f65a8caa71dc1f}{init} ()
\begin{DoxyCompactList}\small\item\em Initialize vbo and format. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ScreenQuad_a0c5b541aaf5f0bed3768461c14b8af98}\label{classACG_1_1ScreenQuad_a0c5b541aaf5f0bed3768461c14b8af98}} 
void \hyperlink{classACG_1_1ScreenQuad_a0c5b541aaf5f0bed3768461c14b8af98}{int\+Draw} (\hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$\+\_\+prog, int \+\_\+num\+Instances=0)
\begin{DoxyCompactList}\small\item\em Internal draw function. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1ScreenQuad_a19936d6c575f2d08ff6f33e2cdf7ef4b}\label{classACG_1_1ScreenQuad_a19936d6c575f2d08ff6f33e2cdf7ef4b}} 
static \hyperlink{classACG_1_1ScreenQuad}{Screen\+Quad} \& \hyperlink{classACG_1_1ScreenQuad_a19936d6c575f2d08ff6f33e2cdf7ef4b}{instance} ()
\begin{DoxyCompactList}\small\item\em Get singleton instance. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1ScreenQuad_ae27b9195c5f3157b54ecd17a3704be7b}\label{classACG_1_1ScreenQuad_ae27b9195c5f3157b54ecd17a3704be7b}} 
G\+Luint \hyperlink{classACG_1_1ScreenQuad_ae27b9195c5f3157b54ecd17a3704be7b}{vbo\+\_\+}
\begin{DoxyCompactList}\small\item\em vbo containing the quad in projected coordinates \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ScreenQuad_a74998334aeb0fcaf091ac67fd52f6bf1}\label{classACG_1_1ScreenQuad_a74998334aeb0fcaf091ac67fd52f6bf1}} 
\hyperlink{classACG_1_1VertexDeclaration}{Vertex\+Declaration} $\ast$ \hyperlink{classACG_1_1ScreenQuad_a74998334aeb0fcaf091ac67fd52f6bf1}{decl\+\_\+}
\begin{DoxyCompactList}\small\item\em vertex format of screen quad (float2 pos) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classACG_1_1ScreenQuad_a91b333b48488dace025fc5b2668263f9}\label{classACG_1_1ScreenQuad_a91b333b48488dace025fc5b2668263f9}} 
\hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$ \hyperlink{classACG_1_1ScreenQuad_a91b333b48488dace025fc5b2668263f9}{tex\+Draw\+Prog\+\_\+}
\begin{DoxyCompactList}\small\item\em Simple texture drawing shader. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This class provides a simple method to draw a screen-\/aligned quad. 

Definition at line 72 of file Screen\+Quad.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{classACG_1_1ScreenQuad_a2deea2d329efedb39a3972721564bf20}\label{classACG_1_1ScreenQuad_a2deea2d329efedb39a3972721564bf20}} 
\index{A\+C\+G\+::\+Screen\+Quad@{A\+C\+G\+::\+Screen\+Quad}!draw@{draw}}
\index{draw@{draw}!A\+C\+G\+::\+Screen\+Quad@{A\+C\+G\+::\+Screen\+Quad}}
\subsubsection{\texorpdfstring{draw()}{draw()}}
{\footnotesize\ttfamily void A\+C\+G\+::\+Screen\+Quad\+::draw (\begin{DoxyParamCaption}\item[{\hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$}]{\+\_\+prog = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Draw the screen quad. 

The quad is in projected space with coordinates in \mbox{[}-\/1, 1\mbox{]}. 
\begin{DoxyParams}{Parameters}
{\em \+\_\+prog} & \hyperlink{namespaceGLSL}{G\+L\+SL} shader to bind attribute id\textquotesingle{}s if needed. Pass null-\/pointer for fixed function rendering \\
\hline
\end{DoxyParams}


Definition at line 138 of file Screen\+Quad.\+cc.

\mbox{\Hypertarget{classACG_1_1ScreenQuad_a2db7429eb8ff86c6598d0b6a477c3081}\label{classACG_1_1ScreenQuad_a2db7429eb8ff86c6598d0b6a477c3081}} 
\index{A\+C\+G\+::\+Screen\+Quad@{A\+C\+G\+::\+Screen\+Quad}!draw\+Instanced@{draw\+Instanced}}
\index{draw\+Instanced@{draw\+Instanced}!A\+C\+G\+::\+Screen\+Quad@{A\+C\+G\+::\+Screen\+Quad}}
\subsubsection{\texorpdfstring{draw\+Instanced()}{drawInstanced()}}
{\footnotesize\ttfamily void A\+C\+G\+::\+Screen\+Quad\+::draw\+Instanced (\begin{DoxyParamCaption}\item[{int}]{\+\_\+count,  }\item[{\hyperlink{classGLSL_1_1Program}{G\+L\+S\+L\+::\+Program} $\ast$}]{\+\_\+prog = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Draw the screen quad with instancing. 

Can be used for render to 2\+D-\/array / 3D volume The quad is in projected space with coordinates in \mbox{[}-\/1, 1\mbox{]}. 
\begin{DoxyParams}{Parameters}
{\em \+\_\+count} & number of instances \\
\hline
{\em \+\_\+prog} & \hyperlink{namespaceGLSL}{G\+L\+SL} shader to bind attribute id\textquotesingle{}s if needed. Pass null-\/pointer for fixed function rendering \\
\hline
\end{DoxyParams}


Definition at line 150 of file Screen\+Quad.\+cc.

\mbox{\Hypertarget{classACG_1_1ScreenQuad_ab663135be43264406f907f49a976855d}\label{classACG_1_1ScreenQuad_ab663135be43264406f907f49a976855d}} 
\index{A\+C\+G\+::\+Screen\+Quad@{A\+C\+G\+::\+Screen\+Quad}!draw\+Texture2D@{draw\+Texture2D}}
\index{draw\+Texture2D@{draw\+Texture2D}!A\+C\+G\+::\+Screen\+Quad@{A\+C\+G\+::\+Screen\+Quad}}
\subsubsection{\texorpdfstring{draw\+Texture2\+D()}{drawTexture2D()}}
{\footnotesize\ttfamily void A\+C\+G\+::\+Screen\+Quad\+::draw\+Texture2D (\begin{DoxyParamCaption}\item[{G\+Luint}]{\+\_\+texture,  }\item[{const \hyperlink{namespaceACG_a8b858737aebd55e312149cf208a0b3f3}{Vec2f} \&}]{\+\_\+offset = {\ttfamily \hyperlink{namespaceACG_a8b858737aebd55e312149cf208a0b3f3}{Vec2f}(0.0f,~0.0f)},  }\item[{const \hyperlink{namespaceACG_a8b858737aebd55e312149cf208a0b3f3}{Vec2f} \&}]{\+\_\+size = {\ttfamily \hyperlink{namespaceACG_a8b858737aebd55e312149cf208a0b3f3}{Vec2f}(1.0f,~1.0f)} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Draw a 2D texture to screen. 

Useful for debugging, copying a texture..


\begin{DoxyParams}{Parameters}
{\em \+\_\+texture} & \hyperlink{classACG_1_1Texture}{Texture} that should be bound when drawing the quad \\
\hline
{\em \+\_\+offset} & Offset passed to the uniform called offset in the shader \\
\hline
{\em \+\_\+size} & Size passed to the uniform called size in the shader \\
\hline
\end{DoxyParams}


Definition at line 197 of file Screen\+Quad.\+cc.



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