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


{\ttfamily \#include $<$A\+C\+G/\+G\+L/\+Screen\+Quad.\+hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01135_af74ba7fd111b15d3544346dd9a0b7371}{\hyperlink{a01135_af74ba7fd111b15d3544346dd9a0b7371}{$\sim$\+Screen\+Quad} ()}\label{a01135_af74ba7fd111b15d3544346dd9a0b7371}

\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static void \hyperlink{a01135_a2deea2d329efedb39a3972721564bf20}{draw} (\hyperlink{a01020}{G\+L\+S\+L\+::\+Program} $\ast$\+\_\+prog=0)
\begin{DoxyCompactList}\small\item\em Draw the screen quad. \end{DoxyCompactList}\item 
static void \hyperlink{a01135_a2db7429eb8ff86c6598d0b6a477c3081}{draw\+Instanced} (int \+\_\+count, \hyperlink{a01020}{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{a01135_ab663135be43264406f907f49a976855d}{draw\+Texture2\+D} (G\+Luint \+\_\+texture, const \hyperlink{a03336_a8b858737aebd55e312149cf208a0b3f3}{Vec2f} \&\+\_\+offset=\hyperlink{a03336_a8b858737aebd55e312149cf208a0b3f3}{Vec2f}(0.\+0f, 0.\+0f), const Vec2f \&\+\_\+size=\+Vec2f(1.\+0f, 1.\+0f))
\begin{DoxyCompactList}\small\item\em Draw a 2\+D texture to screen. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01135_ab9752580e12d9c92801956bf84018694}{\hyperlink{a01135_ab9752580e12d9c92801956bf84018694}{Screen\+Quad} ()}\label{a01135_ab9752580e12d9c92801956bf84018694}

\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\hypertarget{a01135_a31457b307417364245f65a8caa71dc1f}{void \hyperlink{a01135_a31457b307417364245f65a8caa71dc1f}{init} ()}\label{a01135_a31457b307417364245f65a8caa71dc1f}

\begin{DoxyCompactList}\small\item\em Initialize vbo and format. \end{DoxyCompactList}\item 
\hypertarget{a01135_a0c5b541aaf5f0bed3768461c14b8af98}{void \hyperlink{a01135_a0c5b541aaf5f0bed3768461c14b8af98}{int\+Draw} (\hyperlink{a01020}{G\+L\+S\+L\+::\+Program} $\ast$\+\_\+prog, int \+\_\+num\+Instances=0)}\label{a01135_a0c5b541aaf5f0bed3768461c14b8af98}

\begin{DoxyCompactList}\small\item\em Internal draw function. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01135_a19936d6c575f2d08ff6f33e2cdf7ef4b}{static \hyperlink{a01135}{Screen\+Quad} \& \hyperlink{a01135_a19936d6c575f2d08ff6f33e2cdf7ef4b}{instance} ()}\label{a01135_a19936d6c575f2d08ff6f33e2cdf7ef4b}

\begin{DoxyCompactList}\small\item\em Get singleton instance. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01135_ae27b9195c5f3157b54ecd17a3704be7b}{G\+Luint \hyperlink{a01135_ae27b9195c5f3157b54ecd17a3704be7b}{vbo\+\_\+}}\label{a01135_ae27b9195c5f3157b54ecd17a3704be7b}

\begin{DoxyCompactList}\small\item\em vbo containing the quad in projected coordinates \end{DoxyCompactList}\item 
\hypertarget{a01135_a74998334aeb0fcaf091ac67fd52f6bf1}{\hyperlink{a01417}{Vertex\+Declaration} $\ast$ \hyperlink{a01135_a74998334aeb0fcaf091ac67fd52f6bf1}{decl\+\_\+}}\label{a01135_a74998334aeb0fcaf091ac67fd52f6bf1}

\begin{DoxyCompactList}\small\item\em vertex format of screen quad (float2 pos) \end{DoxyCompactList}\item 
\hypertarget{a01135_a91b333b48488dace025fc5b2668263f9}{\hyperlink{a01020}{G\+L\+S\+L\+::\+Program} $\ast$ \hyperlink{a01135_a91b333b48488dace025fc5b2668263f9}{tex\+Draw\+Prog\+\_\+}}\label{a01135_a91b333b48488dace025fc5b2668263f9}

\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 81 of file Screen\+Quad.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a01135_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[{draw}]{\setlength{\rightskip}{0pt plus 5cm}void A\+C\+G\+::\+Screen\+Quad\+::draw (
\begin{DoxyParamCaption}
\item[{{\bf G\+L\+S\+L\+::\+Program} $\ast$}]{\+\_\+prog = {\ttfamily 0}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{a01135_a2deea2d329efedb39a3972721564bf20}


Draw the screen quad. 

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


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

\hypertarget{a01135_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[{draw\+Instanced}]{\setlength{\rightskip}{0pt plus 5cm}void A\+C\+G\+::\+Screen\+Quad\+::draw\+Instanced (
\begin{DoxyParamCaption}
\item[{int}]{\+\_\+count, }
\item[{{\bf G\+L\+S\+L\+::\+Program} $\ast$}]{\+\_\+prog = {\ttfamily 0}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{a01135_a2db7429eb8ff86c6598d0b6a477c3081}


Draw the screen quad with instancing. 

Can be used for render to 2\+D-\/array / 3\+D 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{a03358}{G\+L\+S\+L} shader to bind attribute id's if needed. Pass null-\/pointer for fixed function rendering \\
\hline
\end{DoxyParams}


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

\hypertarget{a01135_ab663135be43264406f907f49a976855d}{\index{A\+C\+G\+::\+Screen\+Quad@{A\+C\+G\+::\+Screen\+Quad}!draw\+Texture2\+D@{draw\+Texture2\+D}}
\index{draw\+Texture2\+D@{draw\+Texture2\+D}!A\+C\+G\+::\+Screen\+Quad@{A\+C\+G\+::\+Screen\+Quad}}
\subsubsection[{draw\+Texture2\+D}]{\setlength{\rightskip}{0pt plus 5cm}void A\+C\+G\+::\+Screen\+Quad\+::draw\+Texture2\+D (
\begin{DoxyParamCaption}
\item[{G\+Luint}]{\+\_\+texture, }
\item[{const {\bf Vec2f} \&}]{\+\_\+offset = {\ttfamily {\bf Vec2f}(0.0f,~0.0f)}, }
\item[{const {\bf Vec2f} \&}]{\+\_\+size = {\ttfamily {\bf Vec2f}(1.0f,~1.0f)}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{a01135_ab663135be43264406f907f49a976855d}


Draw a 2\+D texture to screen. 

Useful for debugging, copying a texture..


\begin{DoxyParams}{Parameters}
{\em \+\_\+texture} & \hyperlink{a01282}{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 206 of file Screen\+Quad.\+cc.



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