\hypertarget{class_ogre_1_1_g_l_e_s2_pixel_util}{}\section{Ogre\+:\+:G\+L\+E\+S2\+Pixel\+Util Class Reference}
\label{class_ogre_1_1_g_l_e_s2_pixel_util}\index{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util@{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util}}


Class to do pixel format mapping between GL and O\+G\+RE.  




{\ttfamily \#include $<$Ogre\+G\+L\+E\+S2\+Pixel\+Format.\+h$>$}

\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} \hyperlink{class_ogre_1_1_g_l_e_s2_pixel_util_a1abd86916990cfffd25b5ce4214a226f}{get\+Closest\+O\+G\+R\+E\+Format} (G\+Lenum fmt)
\begin{DoxyCompactList}\small\item\em Function to get the closest matching O\+G\+RE format to an internal GL format. \end{DoxyCompactList}\item 
static G\+Lenum \hyperlink{class_ogre_1_1_g_l_e_s2_pixel_util_a204cf5cc42d6caadf4998bdf7638bcb8}{get\+G\+L\+Internal\+Format} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} m\+Format, bool hw\+Gamma=false)
\begin{DoxyCompactList}\small\item\em Takes the O\+G\+RE pixel format and returns the type that must be provided to GL as internal format. \end{DoxyCompactList}\item 
static G\+Lenum \hyperlink{class_ogre_1_1_g_l_e_s2_pixel_util_a364f6418df681dade1745f4a3539597d}{get\+G\+L\+Origin\+Data\+Type} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} m\+Format)
\begin{DoxyCompactList}\small\item\em Takes the O\+G\+RE pixel format and returns type that must be provided to GL as data type for reading it into the G\+PU. \end{DoxyCompactList}\item 
static G\+Lenum \hyperlink{class_ogre_1_1_g_l_e_s2_pixel_util_a29ce8044eeb3e96b2b04392484901802}{get\+G\+L\+Origin\+Format} (\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} m\+Format)
\begin{DoxyCompactList}\small\item\em Takes the O\+G\+RE pixel format and returns the appropriate GL one. \end{DoxyCompactList}\item 
static void \hyperlink{class_ogre_1_1_g_l_e_s2_pixel_util_a5ae063ca828f4a333dc496167ca78d0b}{use\+Sized\+Formats} ()
\begin{DoxyCompactList}\small\item\em use sized pixel formats. (to be used with G\+L\+E\+S3) \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Class to do pixel format mapping between GL and O\+G\+RE. 

\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_g_l_e_s2_pixel_util_a5ae063ca828f4a333dc496167ca78d0b}\label{class_ogre_1_1_g_l_e_s2_pixel_util_a5ae063ca828f4a333dc496167ca78d0b}} 
\index{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util@{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util}!use\+Sized\+Formats@{use\+Sized\+Formats}}
\index{use\+Sized\+Formats@{use\+Sized\+Formats}!Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util@{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util}}
\subsubsection{\texorpdfstring{use\+Sized\+Formats()}{useSizedFormats()}}
{\footnotesize\ttfamily static void Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util\+::use\+Sized\+Formats (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



use sized pixel formats. (to be used with G\+L\+E\+S3) 

\mbox{\Hypertarget{class_ogre_1_1_g_l_e_s2_pixel_util_a29ce8044eeb3e96b2b04392484901802}\label{class_ogre_1_1_g_l_e_s2_pixel_util_a29ce8044eeb3e96b2b04392484901802}} 
\index{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util@{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util}!get\+G\+L\+Origin\+Format@{get\+G\+L\+Origin\+Format}}
\index{get\+G\+L\+Origin\+Format@{get\+G\+L\+Origin\+Format}!Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util@{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+G\+L\+Origin\+Format()}{getGLOriginFormat()}}
{\footnotesize\ttfamily static G\+Lenum Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util\+::get\+G\+L\+Origin\+Format (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{m\+Format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Takes the O\+G\+RE pixel format and returns the appropriate GL one. 

\begin{DoxyReturn}{Returns}
a G\+Lenum describing the format, or 0 if there is no exactly matching one (and conversion is needed) 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_g_l_e_s2_pixel_util_a364f6418df681dade1745f4a3539597d}\label{class_ogre_1_1_g_l_e_s2_pixel_util_a364f6418df681dade1745f4a3539597d}} 
\index{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util@{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util}!get\+G\+L\+Origin\+Data\+Type@{get\+G\+L\+Origin\+Data\+Type}}
\index{get\+G\+L\+Origin\+Data\+Type@{get\+G\+L\+Origin\+Data\+Type}!Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util@{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+G\+L\+Origin\+Data\+Type()}{getGLOriginDataType()}}
{\footnotesize\ttfamily static G\+Lenum Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util\+::get\+G\+L\+Origin\+Data\+Type (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{m\+Format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Takes the O\+G\+RE pixel format and returns type that must be provided to GL as data type for reading it into the G\+PU. 

\begin{DoxyReturn}{Returns}
a G\+Lenum describing the data type, or 0 if there is no exactly matching one (and conversion is needed) 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_g_l_e_s2_pixel_util_a204cf5cc42d6caadf4998bdf7638bcb8}\label{class_ogre_1_1_g_l_e_s2_pixel_util_a204cf5cc42d6caadf4998bdf7638bcb8}} 
\index{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util@{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util}!get\+G\+L\+Internal\+Format@{get\+G\+L\+Internal\+Format}}
\index{get\+G\+L\+Internal\+Format@{get\+G\+L\+Internal\+Format}!Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util@{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+G\+L\+Internal\+Format()}{getGLInternalFormat()}}
{\footnotesize\ttfamily static G\+Lenum Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util\+::get\+G\+L\+Internal\+Format (\begin{DoxyParamCaption}\item[{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}}]{m\+Format,  }\item[{bool}]{hw\+Gamma = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Takes the O\+G\+RE pixel format and returns the type that must be provided to GL as internal format. 

G\+L\+\_\+\+N\+O\+NE if no match exists. 
\begin{DoxyParams}{Parameters}
{\em m\+Format} & The pixel format \\
\hline
{\em hw\+Gamma} & Whether a hardware gamma-\/corrected version is requested \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_g_l_e_s2_pixel_util_a1abd86916990cfffd25b5ce4214a226f}\label{class_ogre_1_1_g_l_e_s2_pixel_util_a1abd86916990cfffd25b5ce4214a226f}} 
\index{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util@{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util}!get\+Closest\+O\+G\+R\+E\+Format@{get\+Closest\+O\+G\+R\+E\+Format}}
\index{get\+Closest\+O\+G\+R\+E\+Format@{get\+Closest\+O\+G\+R\+E\+Format}!Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util@{Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util}}
\subsubsection{\texorpdfstring{get\+Closest\+O\+G\+R\+E\+Format()}{getClosestOGREFormat()}}
{\footnotesize\ttfamily static \hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format} Ogre\+::\+G\+L\+E\+S2\+Pixel\+Util\+::get\+Closest\+O\+G\+R\+E\+Format (\begin{DoxyParamCaption}\item[{G\+Lenum}]{fmt }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Function to get the closest matching O\+G\+RE format to an internal GL format. 

To be precise, the format will be chosen that is most efficient to transfer to the card without losing precision. \begin{DoxyRemark}{Remarks}
It is valid for this function to always return P\+F\+\_\+\+A8\+R8\+G8\+B8. 
\end{DoxyRemark}


The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{_ogre_g_l_e_s2_pixel_format_8h}{Ogre\+G\+L\+E\+S2\+Pixel\+Format.\+h}\end{DoxyCompactItemize}
