Axiom.RenderSystems.OpenGLES.GLESPixelUtil.GetGLInternalFormat C# (CSharp) Method

GetGLInternalFormat() public static method

Takes the Axiom pixel format and returns the type that must be provided to GL as internal format. 0 if no match exists.
public static GetGLInternalFormat ( PixelFormat fmt, bool hwGamma ) : OpenTK.Graphics.ES11.All
fmt PixelFormat
hwGamma bool
return OpenTK.Graphics.ES11.All
		public static GLES.All GetGLInternalFormat( PixelFormat fmt, bool hwGamma )
		{
			switch ( fmt )
			{
				case PixelFormat.L8:
					return GLES.All.Luminance;
				case PixelFormat.A8:
					return GLES.All.Alpha;
				case PixelFormat.BYTE_LA:
					return GLES.All.LuminanceAlpha;
				case PixelFormat.R8G8B8:
				case PixelFormat.B8G8R8:
				case PixelFormat.X8B8G8R8:
				case PixelFormat.X8R8G8B8:
				case PixelFormat.A8R8G8B8:
				case PixelFormat.A8B8G8R8:
				case PixelFormat.B8G8R8A8:
					{
						if ( !hwGamma )
						{
							return GLES.All.Rgba;
						}
					}
					return 0;
				case PixelFormat.A4L4:
				case PixelFormat.L16:
				case PixelFormat.A4R4G4B4:
				case PixelFormat.R3G3B2:
				case PixelFormat.A1R5G5B5:
				case PixelFormat.R5G6B5:
				case PixelFormat.B5G6R5:
				case PixelFormat.A2R10G10B10:
				case PixelFormat.A2B10G10R10:
				case PixelFormat.FLOAT16_R:
				case PixelFormat.FLOAT16_RGB:
				case PixelFormat.FLOAT16_GR:
				case PixelFormat.FLOAT16_RGBA:
				case PixelFormat.FLOAT32_R:
				case PixelFormat.FLOAT32_GR:
				case PixelFormat.FLOAT32_RGB:
				case PixelFormat.FLOAT32_RGBA:
				case PixelFormat.SHORT_RGBA:
				case PixelFormat.SHORT_RGB:
				case PixelFormat.SHORT_GR:
				case PixelFormat.DXT1:
				case PixelFormat.DXT3:
				case PixelFormat.DXT5:
				default:
					return 0;
			}
		}