\hypertarget{_raspi_tex_util_8c}{}\section{/\+Volumes/\+W\+O\+R\+K\+\_\+\+I\+N\+\_\+\+P\+R\+O\+G\+R\+E\+S\+S/\+R\+A\+S\+P\+B\+E\+R\+R\+Y\+\_\+\+P\+I/github/userland/host\+\_\+applications/linux/apps/raspicam/\+Raspi\+Tex\+Util.c File Reference}
\label{_raspi_tex_util_8c}\index{/\+Volumes/\+W\+O\+R\+K\+\_\+\+I\+N\+\_\+\+P\+R\+O\+G\+R\+E\+S\+S/\+R\+A\+S\+P\+B\+E\+R\+R\+Y\+\_\+\+P\+I/github/userland/host\+\_\+applications/linux/apps/raspicam/\+Raspi\+Tex\+Util.\+c@{/\+Volumes/\+W\+O\+R\+K\+\_\+\+I\+N\+\_\+\+P\+R\+O\+G\+R\+E\+S\+S/\+R\+A\+S\+P\+B\+E\+R\+R\+Y\+\_\+\+P\+I/github/userland/host\+\_\+applications/linux/apps/raspicam/\+Raspi\+Tex\+Util.\+c}}
{\ttfamily \#include \char`\"{}Raspi\+Tex\+Util.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}Raspi\+Tex.\+h\char`\"{}}\\*
{\ttfamily \#include $<$bcm\+\_\+host.\+h$>$}\\*
{\ttfamily \#include $<$G\+L\+E\+S2/gl2.\+h$>$}\\*
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{_raspi_tex_util_8c_ac74b848b6d25c779e49de068115445a8}{raspitexutil\+\_\+gl\+\_\+term} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$raspitex\+\_\+state)
\item 
int \hyperlink{_raspi_tex_util_8c_a83ebdff01840a358614b0059134944ee}{raspitexutil\+\_\+create\+\_\+native\+\_\+window} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$raspitex\+\_\+state)
\item 
void \hyperlink{_raspi_tex_util_8c_ae17d616ba64f87fedf5aba3775ae7338}{raspitexutil\+\_\+destroy\+\_\+native\+\_\+window} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$raspitex\+\_\+state)
\item 
\hypertarget{_raspi_tex_util_8c_aae03c1f0587e4d4879167f48a93f125d}{}int {\bfseries raspitexutil\+\_\+create\+\_\+textures} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$raspitex\+\_\+state)\label{_raspi_tex_util_8c_aae03c1f0587e4d4879167f48a93f125d}

\item 
int \hyperlink{_raspi_tex_util_8c_ac2e8cb03517bad386fb173fe1b1767db}{raspitexutil\+\_\+gl\+\_\+init\+\_\+1\+\_\+0} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$raspitex\+\_\+state)
\item 
int \hyperlink{_raspi_tex_util_8c_af18e6bea91bd0c283b5d4882451884d8}{raspitexutil\+\_\+gl\+\_\+init\+\_\+2\+\_\+0} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$raspitex\+\_\+state)
\item 
int \hyperlink{_raspi_tex_util_8c_a64c6b9ea636347053d054456abaafc5b}{raspitexutil\+\_\+do\+\_\+update\+\_\+texture} (E\+G\+L\+Display display, E\+G\+Lenum target, E\+G\+L\+Client\+Buffer mm\+\_\+buf, G\+Luint $\ast$texture, E\+G\+L\+Image\+K\+H\+R $\ast$egl\+\_\+image)
\item 
int \hyperlink{_raspi_tex_util_8c_a39fcb6ebfd3a71926d905bfd134fffa5}{raspitexutil\+\_\+update\+\_\+texture} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$raspitex\+\_\+state, E\+G\+L\+Client\+Buffer mm\+\_\+buf)
\item 
int \hyperlink{_raspi_tex_util_8c_acdf4345e32cafd4c9474bf380fa826f6}{raspitexutil\+\_\+update\+\_\+y\+\_\+texture} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$raspitex\+\_\+state, E\+G\+L\+Client\+Buffer mm\+\_\+buf)
\item 
int \hyperlink{_raspi_tex_util_8c_a4822632ed2e5422d5ddd9c16ac8304c9}{raspitexutil\+\_\+update\+\_\+u\+\_\+texture} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$raspitex\+\_\+state, E\+G\+L\+Client\+Buffer mm\+\_\+buf)
\item 
int \hyperlink{_raspi_tex_util_8c_acaba01ee40726873ae9f2627f81faa65}{raspitexutil\+\_\+update\+\_\+v\+\_\+texture} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$raspitex\+\_\+state, E\+G\+L\+Client\+Buffer mm\+\_\+buf)
\item 
int \hyperlink{_raspi_tex_util_8c_a7497467d48f8f13300285bc80f265480}{raspitexutil\+\_\+update\+\_\+model} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$raspitex\+\_\+state)
\item 
int \hyperlink{_raspi_tex_util_8c_a019e683b003d11e2aa51728396d22d20}{raspitexutil\+\_\+redraw} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$raspitex\+\_\+state)
\item 
void \hyperlink{_raspi_tex_util_8c_a4f4c0c629e832ca7194215e303e8d943}{raspitexutil\+\_\+close} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$raspitex\+\_\+state)
\item 
void \hyperlink{_raspi_tex_util_8c_aa1f3e8d0bb11b2f01ea0a439e4172525}{raspitexutil\+\_\+brga\+\_\+to\+\_\+rgba} (uint8\+\_\+t $\ast$buffer, size\+\_\+t size)
\item 
int \hyperlink{_raspi_tex_util_8c_a47086da51eef44cb4c4ac3b4132d25b5}{raspitexutil\+\_\+capture\+\_\+bgra} (\hyperlink{struct_r_a_s_p_i_t_e_x___s_t_a_t_e}{R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$state, uint8\+\_\+t $\ast$$\ast$buffer, size\+\_\+t $\ast$buffer\+\_\+size)
\item 
int \hyperlink{_raspi_tex_util_8c_a3b52ccc120c20cefdfe79b57c621deba}{raspitexutil\+\_\+build\+\_\+shader\+\_\+program} (\hyperlink{struct_r_a_s_p_i_t_e_x_u_t_i_l___s_h_a_d_e_r___p_r_o_g_r_a_m___t}{R\+A\+S\+P\+I\+T\+E\+X\+U\+T\+I\+L\+\_\+\+S\+H\+A\+D\+E\+R\+\_\+\+P\+R\+O\+G\+R\+A\+M\+\_\+\+T} $\ast$p)
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{_raspi_tex_util_8c_abcc55ea989f2a74a08d85de7fdaecc61}{}V\+C\+O\+S\+\_\+\+L\+O\+G\+\_\+\+C\+A\+T\+\_\+\+T {\bfseries raspitex\+\_\+log\+\_\+category}\label{_raspi_tex_util_8c_abcc55ea989f2a74a08d85de7fdaecc61}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Provides default implementations for the raspitex\+\_\+scene\+\_\+ops functions and general utility functions. 

\subsection{Function Documentation}
\hypertarget{_raspi_tex_util_8c_aa1f3e8d0bb11b2f01ea0a439e4172525}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+brga\+\_\+to\+\_\+rgba@{raspitexutil\+\_\+brga\+\_\+to\+\_\+rgba}}
\index{raspitexutil\+\_\+brga\+\_\+to\+\_\+rgba@{raspitexutil\+\_\+brga\+\_\+to\+\_\+rgba}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+brga\+\_\+to\+\_\+rgba}]{\setlength{\rightskip}{0pt plus 5cm}void raspitexutil\+\_\+brga\+\_\+to\+\_\+rgba (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{buffer, }
\item[{size\+\_\+t}]{size}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_aa1f3e8d0bb11b2f01ea0a439e4172525}
Performs an in-\/place byte swap from B\+G\+R\+A to R\+G\+B\+A. 
\begin{DoxyParams}{Parameters}
{\em buffer} & The buffer to modify. \\
\hline
{\em size} & Size of the buffer in bytes. \\
\hline
\end{DoxyParams}
\hypertarget{_raspi_tex_util_8c_a3b52ccc120c20cefdfe79b57c621deba}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+build\+\_\+shader\+\_\+program@{raspitexutil\+\_\+build\+\_\+shader\+\_\+program}}
\index{raspitexutil\+\_\+build\+\_\+shader\+\_\+program@{raspitexutil\+\_\+build\+\_\+shader\+\_\+program}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+build\+\_\+shader\+\_\+program}]{\setlength{\rightskip}{0pt plus 5cm}int raspitexutil\+\_\+build\+\_\+shader\+\_\+program (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+U\+T\+I\+L\+\_\+\+S\+H\+A\+D\+E\+R\+\_\+\+P\+R\+O\+G\+R\+A\+M\+\_\+\+T} $\ast$}]{p}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_a3b52ccc120c20cefdfe79b57c621deba}
Takes a description of shader program, compiles it and gets the locations of uniforms and attributes.


\begin{DoxyParams}{Parameters}
{\em p} & The shader program state. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero if successful. 
\end{DoxyReturn}
\hypertarget{_raspi_tex_util_8c_a47086da51eef44cb4c4ac3b4132d25b5}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+capture\+\_\+bgra@{raspitexutil\+\_\+capture\+\_\+bgra}}
\index{raspitexutil\+\_\+capture\+\_\+bgra@{raspitexutil\+\_\+capture\+\_\+bgra}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+capture\+\_\+bgra}]{\setlength{\rightskip}{0pt plus 5cm}int raspitexutil\+\_\+capture\+\_\+bgra (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$}]{state, }
\item[{uint8\+\_\+t $\ast$$\ast$}]{buffer, }
\item[{size\+\_\+t $\ast$}]{buffer\+\_\+size}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_a47086da51eef44cb4c4ac3b4132d25b5}
Uses gl\+Read\+Pixels to grab the current frame-\/buffer contents and returns the result in a newly allocate buffer along with the its size. Data is returned in B\+G\+R\+A format for T\+G\+A output. P\+P\+M output doesn\textquotesingle{}t require the channel order swap but would require a vflip. The T\+G\+A format also supports alpha. The byte swap is not done in this function to avoid blocking the G\+L rendering thread. 
\begin{DoxyParams}{Parameters}
{\em state} & Pointer to the G\+L preview state. \\
\hline
{\em buffer} & Address of pointer to set to pointer to new buffer. \\
\hline
{\em buffer\+\_\+size} & The size of the new buffer in bytes (out param) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero if successful. 
\end{DoxyReturn}
\hypertarget{_raspi_tex_util_8c_a4f4c0c629e832ca7194215e303e8d943}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+close@{raspitexutil\+\_\+close}}
\index{raspitexutil\+\_\+close@{raspitexutil\+\_\+close}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+close}]{\setlength{\rightskip}{0pt plus 5cm}void raspitexutil\+\_\+close (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$}]{raspitex\+\_\+state}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_a4f4c0c629e832ca7194215e303e8d943}
Default is a no-\/op 
\begin{DoxyParams}{Parameters}
{\em raspitex\+\_\+state} & A pointer to the G\+L preview state. \\
\hline
\end{DoxyParams}
\hypertarget{_raspi_tex_util_8c_a83ebdff01840a358614b0059134944ee}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+create\+\_\+native\+\_\+window@{raspitexutil\+\_\+create\+\_\+native\+\_\+window}}
\index{raspitexutil\+\_\+create\+\_\+native\+\_\+window@{raspitexutil\+\_\+create\+\_\+native\+\_\+window}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+create\+\_\+native\+\_\+window}]{\setlength{\rightskip}{0pt plus 5cm}int raspitexutil\+\_\+create\+\_\+native\+\_\+window (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$}]{raspitex\+\_\+state}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_a83ebdff01840a358614b0059134944ee}
Creates a native window for the G\+L surface using dispmanx 
\begin{DoxyParams}{Parameters}
{\em raspitex\+\_\+state} & A pointer to the G\+L preview state. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero if successful, otherwise, -\/1 is returned. 
\end{DoxyReturn}
\hypertarget{_raspi_tex_util_8c_ae17d616ba64f87fedf5aba3775ae7338}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+destroy\+\_\+native\+\_\+window@{raspitexutil\+\_\+destroy\+\_\+native\+\_\+window}}
\index{raspitexutil\+\_\+destroy\+\_\+native\+\_\+window@{raspitexutil\+\_\+destroy\+\_\+native\+\_\+window}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+destroy\+\_\+native\+\_\+window}]{\setlength{\rightskip}{0pt plus 5cm}void raspitexutil\+\_\+destroy\+\_\+native\+\_\+window (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$}]{raspitex\+\_\+state}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_ae17d616ba64f87fedf5aba3775ae7338}
Destroys the pools of buffers used by the G\+L renderer. 
\begin{DoxyParams}{Parameters}
{\em raspitex\+\_\+state} & A pointer to the G\+L preview state. \\
\hline
\end{DoxyParams}
\hypertarget{_raspi_tex_util_8c_a64c6b9ea636347053d054456abaafc5b}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+do\+\_\+update\+\_\+texture@{raspitexutil\+\_\+do\+\_\+update\+\_\+texture}}
\index{raspitexutil\+\_\+do\+\_\+update\+\_\+texture@{raspitexutil\+\_\+do\+\_\+update\+\_\+texture}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+do\+\_\+update\+\_\+texture}]{\setlength{\rightskip}{0pt plus 5cm}int raspitexutil\+\_\+do\+\_\+update\+\_\+texture (
\begin{DoxyParamCaption}
\item[{E\+G\+L\+Display}]{display, }
\item[{E\+G\+Lenum}]{target, }
\item[{E\+G\+L\+Client\+Buffer}]{mm\+\_\+buf, }
\item[{G\+Luint $\ast$}]{texture, }
\item[{E\+G\+L\+Image\+K\+H\+R $\ast$}]{egl\+\_\+image}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_a64c6b9ea636347053d054456abaafc5b}
Advances the texture and E\+G\+L image to the next M\+M\+A\+L buffer.


\begin{DoxyParams}{Parameters}
{\em display} & The E\+G\+L display. \\
\hline
{\em target} & The E\+G\+L image target e.\+g. E\+G\+L\+\_\+\+I\+M\+A\+G\+E\+\_\+\+B\+R\+C\+M\+\_\+\+M\+U\+L\+T\+I\+M\+E\+D\+I\+A \\
\hline
{\em mm\+\_\+buf} & The E\+G\+L client buffer (mmal opaque buffer) that is used to create the E\+G\+L Image for the preview texture. \\
\hline
{\em egl\+\_\+image} & Pointer to the E\+G\+L image to update with mm\+\_\+buf. \\
\hline
{\em texture} & Pointer to the texture to update from E\+G\+L image. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero if successful. 
\end{DoxyReturn}
\hypertarget{_raspi_tex_util_8c_ac2e8cb03517bad386fb173fe1b1767db}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+gl\+\_\+init\+\_\+1\+\_\+0@{raspitexutil\+\_\+gl\+\_\+init\+\_\+1\+\_\+0}}
\index{raspitexutil\+\_\+gl\+\_\+init\+\_\+1\+\_\+0@{raspitexutil\+\_\+gl\+\_\+init\+\_\+1\+\_\+0}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+gl\+\_\+init\+\_\+1\+\_\+0}]{\setlength{\rightskip}{0pt plus 5cm}int raspitexutil\+\_\+gl\+\_\+init\+\_\+1\+\_\+0 (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$}]{raspitex\+\_\+state}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_ac2e8cb03517bad386fb173fe1b1767db}
Creates an Open\+G\+L E\+S 1.\+X context. 
\begin{DoxyParams}{Parameters}
{\em raspitex\+\_\+state} & A pointer to the G\+L preview state. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero if successful. 
\end{DoxyReturn}
\hypertarget{_raspi_tex_util_8c_af18e6bea91bd0c283b5d4882451884d8}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+gl\+\_\+init\+\_\+2\+\_\+0@{raspitexutil\+\_\+gl\+\_\+init\+\_\+2\+\_\+0}}
\index{raspitexutil\+\_\+gl\+\_\+init\+\_\+2\+\_\+0@{raspitexutil\+\_\+gl\+\_\+init\+\_\+2\+\_\+0}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+gl\+\_\+init\+\_\+2\+\_\+0}]{\setlength{\rightskip}{0pt plus 5cm}int raspitexutil\+\_\+gl\+\_\+init\+\_\+2\+\_\+0 (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$}]{raspitex\+\_\+state}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_af18e6bea91bd0c283b5d4882451884d8}
Creates an Open\+G\+L E\+S 2.\+X context. 
\begin{DoxyParams}{Parameters}
{\em raspitex\+\_\+state} & A pointer to the G\+L preview state. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero if successful. 
\end{DoxyReturn}
\hypertarget{_raspi_tex_util_8c_ac74b848b6d25c779e49de068115445a8}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+gl\+\_\+term@{raspitexutil\+\_\+gl\+\_\+term}}
\index{raspitexutil\+\_\+gl\+\_\+term@{raspitexutil\+\_\+gl\+\_\+term}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+gl\+\_\+term}]{\setlength{\rightskip}{0pt plus 5cm}void raspitexutil\+\_\+gl\+\_\+term (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$}]{raspitex\+\_\+state}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_ac74b848b6d25c779e49de068115445a8}
Deletes textures and E\+G\+L surfaces and context. 
\begin{DoxyParams}{Parameters}
{\em raspitex\+\_\+state} & Pointer to the Raspi \\
\hline
\end{DoxyParams}
\hypertarget{_raspi_tex_util_8c_a019e683b003d11e2aa51728396d22d20}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+redraw@{raspitexutil\+\_\+redraw}}
\index{raspitexutil\+\_\+redraw@{raspitexutil\+\_\+redraw}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+redraw}]{\setlength{\rightskip}{0pt plus 5cm}int raspitexutil\+\_\+redraw (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$}]{raspitex\+\_\+state}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_a019e683b003d11e2aa51728396d22d20}
Default is a no-\/op 
\begin{DoxyParams}{Parameters}
{\em raspitex\+\_\+state} & A pointer to the G\+L preview state. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero. 
\end{DoxyReturn}
\hypertarget{_raspi_tex_util_8c_a7497467d48f8f13300285bc80f265480}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+update\+\_\+model@{raspitexutil\+\_\+update\+\_\+model}}
\index{raspitexutil\+\_\+update\+\_\+model@{raspitexutil\+\_\+update\+\_\+model}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+update\+\_\+model}]{\setlength{\rightskip}{0pt plus 5cm}int raspitexutil\+\_\+update\+\_\+model (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$}]{raspitex\+\_\+state}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_a7497467d48f8f13300285bc80f265480}
Default is a no-\/op 
\begin{DoxyParams}{Parameters}
{\em raspitex\+\_\+state} & A pointer to the G\+L preview state. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero. 
\end{DoxyReturn}
\hypertarget{_raspi_tex_util_8c_a39fcb6ebfd3a71926d905bfd134fffa5}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+update\+\_\+texture@{raspitexutil\+\_\+update\+\_\+texture}}
\index{raspitexutil\+\_\+update\+\_\+texture@{raspitexutil\+\_\+update\+\_\+texture}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+update\+\_\+texture}]{\setlength{\rightskip}{0pt plus 5cm}int raspitexutil\+\_\+update\+\_\+texture (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$}]{raspitex\+\_\+state, }
\item[{E\+G\+L\+Client\+Buffer}]{mm\+\_\+buf}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_a39fcb6ebfd3a71926d905bfd134fffa5}
Updates the R\+G\+B\+X texture to the specified M\+M\+A\+L buffer. 
\begin{DoxyParams}{Parameters}
{\em raspitex\+\_\+state} & A pointer to the G\+L preview state. \\
\hline
{\em mm\+\_\+buf} & The M\+M\+A\+L buffer. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero if successful. 
\end{DoxyReturn}
\hypertarget{_raspi_tex_util_8c_a4822632ed2e5422d5ddd9c16ac8304c9}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+update\+\_\+u\+\_\+texture@{raspitexutil\+\_\+update\+\_\+u\+\_\+texture}}
\index{raspitexutil\+\_\+update\+\_\+u\+\_\+texture@{raspitexutil\+\_\+update\+\_\+u\+\_\+texture}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+update\+\_\+u\+\_\+texture}]{\setlength{\rightskip}{0pt plus 5cm}int raspitexutil\+\_\+update\+\_\+u\+\_\+texture (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$}]{raspitex\+\_\+state, }
\item[{E\+G\+L\+Client\+Buffer}]{mm\+\_\+buf}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_a4822632ed2e5422d5ddd9c16ac8304c9}
Updates the U plane texture to the specified M\+M\+A\+L buffer. 
\begin{DoxyParams}{Parameters}
{\em raspitex\+\_\+state} & A pointer to the G\+L preview state. \\
\hline
{\em mm\+\_\+buf} & The M\+M\+A\+L buffer. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero if successful. 
\end{DoxyReturn}
\hypertarget{_raspi_tex_util_8c_acaba01ee40726873ae9f2627f81faa65}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+update\+\_\+v\+\_\+texture@{raspitexutil\+\_\+update\+\_\+v\+\_\+texture}}
\index{raspitexutil\+\_\+update\+\_\+v\+\_\+texture@{raspitexutil\+\_\+update\+\_\+v\+\_\+texture}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+update\+\_\+v\+\_\+texture}]{\setlength{\rightskip}{0pt plus 5cm}int raspitexutil\+\_\+update\+\_\+v\+\_\+texture (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$}]{raspitex\+\_\+state, }
\item[{E\+G\+L\+Client\+Buffer}]{mm\+\_\+buf}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_acaba01ee40726873ae9f2627f81faa65}
Updates the V plane texture to the specified M\+M\+A\+L buffer. 
\begin{DoxyParams}{Parameters}
{\em raspitex\+\_\+state} & A pointer to the G\+L preview state. \\
\hline
{\em mm\+\_\+buf} & The M\+M\+A\+L buffer. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero if successful. 
\end{DoxyReturn}
\hypertarget{_raspi_tex_util_8c_acdf4345e32cafd4c9474bf380fa826f6}{}\index{Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}!raspitexutil\+\_\+update\+\_\+y\+\_\+texture@{raspitexutil\+\_\+update\+\_\+y\+\_\+texture}}
\index{raspitexutil\+\_\+update\+\_\+y\+\_\+texture@{raspitexutil\+\_\+update\+\_\+y\+\_\+texture}!Raspi\+Tex\+Util.\+c@{Raspi\+Tex\+Util.\+c}}
\subsubsection[{raspitexutil\+\_\+update\+\_\+y\+\_\+texture}]{\setlength{\rightskip}{0pt plus 5cm}int raspitexutil\+\_\+update\+\_\+y\+\_\+texture (
\begin{DoxyParamCaption}
\item[{{\bf R\+A\+S\+P\+I\+T\+E\+X\+\_\+\+S\+T\+A\+T\+E} $\ast$}]{raspitex\+\_\+state, }
\item[{E\+G\+L\+Client\+Buffer}]{mm\+\_\+buf}
\end{DoxyParamCaption}
)}\label{_raspi_tex_util_8c_acdf4345e32cafd4c9474bf380fa826f6}
Updates the Y plane texture to the specified M\+M\+A\+L buffer. 
\begin{DoxyParams}{Parameters}
{\em raspitex\+\_\+state} & A pointer to the G\+L preview state. \\
\hline
{\em mm\+\_\+buf} & The M\+M\+A\+L buffer. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero if successful. 
\end{DoxyReturn}
