\hypertarget{class_ogre_1_1_g_l_pixel_util}{}\doxysection{Ogre\+::G\+L\+Pixel\+Util Class Reference}
\label{class_ogre_1_1_g_l_pixel_util}\index{Ogre::GLPixelUtil@{Ogre::GLPixelUtil}}


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




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

\doxysubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \mbox{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}} \mbox{\hyperlink{class_ogre_1_1_g_l_pixel_util_abb4d47a4316ad51dc8bd05443960c855}{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 \mbox{\hyperlink{class_ogre_1_1_g_l_pixel_util_a8273a228b8c53b37868feaab098b5b77}{get\+G\+L\+Internal\+Format}} (\mbox{\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 \mbox{\hyperlink{class_ogre_1_1_g_l_pixel_util_a26553cf6e78f242618e7355beb15ebf3}{get\+G\+L\+Origin\+Data\+Type}} (\mbox{\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 \mbox{\hyperlink{class_ogre_1_1_g_l_pixel_util_a0da4d9fc4c09291ebef77b8de2f4f8f8}{get\+G\+L\+Origin\+Format}} (\mbox{\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 \mbox{\hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32}} \mbox{\hyperlink{class_ogre_1_1_g_l_pixel_util_a37724b1068663093888c66a7f0c39e83}{optional\+P\+O2}} (\mbox{\hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32}} value)
\begin{DoxyCompactList}\small\item\em Returns next power-\/of-\/two size if required by render system, in case R\+S\+C\+\_\+\+N\+O\+N\+\_\+\+P\+O\+W\+E\+R\+\_\+\+O\+F\+\_\+2\+\_\+\+T\+E\+X\+T\+U\+R\+ES is supported it returns value as-\/is. \end{DoxyCompactList}\end{DoxyCompactItemize}


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

\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_g_l_pixel_util_a0da4d9fc4c09291ebef77b8de2f4f8f8}\label{class_ogre_1_1_g_l_pixel_util_a0da4d9fc4c09291ebef77b8de2f4f8f8}} 
\index{Ogre::GLPixelUtil@{Ogre::GLPixelUtil}!getGLOriginFormat@{getGLOriginFormat}}
\index{getGLOriginFormat@{getGLOriginFormat}!Ogre::GLPixelUtil@{Ogre::GLPixelUtil}}
\doxysubsubsection{\texorpdfstring{getGLOriginFormat()}{getGLOriginFormat()}}
{\footnotesize\ttfamily static G\+Lenum Ogre\+::\+G\+L\+Pixel\+Util\+::get\+G\+L\+Origin\+Format (\begin{DoxyParamCaption}\item[{\mbox{\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_pixel_util_a26553cf6e78f242618e7355beb15ebf3}\label{class_ogre_1_1_g_l_pixel_util_a26553cf6e78f242618e7355beb15ebf3}} 
\index{Ogre::GLPixelUtil@{Ogre::GLPixelUtil}!getGLOriginDataType@{getGLOriginDataType}}
\index{getGLOriginDataType@{getGLOriginDataType}!Ogre::GLPixelUtil@{Ogre::GLPixelUtil}}
\doxysubsubsection{\texorpdfstring{getGLOriginDataType()}{getGLOriginDataType()}}
{\footnotesize\ttfamily static G\+Lenum Ogre\+::\+G\+L\+Pixel\+Util\+::get\+G\+L\+Origin\+Data\+Type (\begin{DoxyParamCaption}\item[{\mbox{\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_pixel_util_a8273a228b8c53b37868feaab098b5b77}\label{class_ogre_1_1_g_l_pixel_util_a8273a228b8c53b37868feaab098b5b77}} 
\index{Ogre::GLPixelUtil@{Ogre::GLPixelUtil}!getGLInternalFormat@{getGLInternalFormat}}
\index{getGLInternalFormat@{getGLInternalFormat}!Ogre::GLPixelUtil@{Ogre::GLPixelUtil}}
\doxysubsubsection{\texorpdfstring{getGLInternalFormat()}{getGLInternalFormat()}}
{\footnotesize\ttfamily static G\+Lenum Ogre\+::\+G\+L\+Pixel\+Util\+::get\+G\+L\+Internal\+Format (\begin{DoxyParamCaption}\item[{\mbox{\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_pixel_util_abb4d47a4316ad51dc8bd05443960c855}\label{class_ogre_1_1_g_l_pixel_util_abb4d47a4316ad51dc8bd05443960c855}} 
\index{Ogre::GLPixelUtil@{Ogre::GLPixelUtil}!getClosestOGREFormat@{getClosestOGREFormat}}
\index{getClosestOGREFormat@{getClosestOGREFormat}!Ogre::GLPixelUtil@{Ogre::GLPixelUtil}}
\doxysubsubsection{\texorpdfstring{getClosestOGREFormat()}{getClosestOGREFormat()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group___image_ga7e0353e7d36d4c2e8468641b7303d39c}{Pixel\+Format}} Ogre\+::\+G\+L\+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}
\mbox{\Hypertarget{class_ogre_1_1_g_l_pixel_util_a37724b1068663093888c66a7f0c39e83}\label{class_ogre_1_1_g_l_pixel_util_a37724b1068663093888c66a7f0c39e83}} 
\index{Ogre::GLPixelUtil@{Ogre::GLPixelUtil}!optionalPO2@{optionalPO2}}
\index{optionalPO2@{optionalPO2}!Ogre::GLPixelUtil@{Ogre::GLPixelUtil}}
\doxysubsubsection{\texorpdfstring{optionalPO2()}{optionalPO2()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32}} Ogre\+::\+G\+L\+Pixel\+Util\+::optional\+P\+O2 (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_adf2a0cf2e77143b5ee1d38a75e289545}{uint32}}}]{value }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Returns next power-\/of-\/two size if required by render system, in case R\+S\+C\+\_\+\+N\+O\+N\+\_\+\+P\+O\+W\+E\+R\+\_\+\+O\+F\+\_\+2\+\_\+\+T\+E\+X\+T\+U\+R\+ES is supported it returns value as-\/is. 



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