Ejemplo n.º 1
0
 /// <summary>
 /// Determines whether a format is compressed.
 /// Compressed formats should use GL.CompressedTexImage instead of GL.TexImage.
 /// </summary>
 /// <param name="format">The image format for the Image data</param>
 /// <returns>True if the format is compressed</returns>
 public static bool IsCompressed(PixelInternalFormat format)
 {
     // All the enum value names should follow this convention.
     return(format.ToString().ToLower().Contains("compressed"));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Determines if <paramref name="format"/> is a valid format for a
        /// <see cref="DepthTexture"/>.
        /// </summary>
        /// <param name="format">The image format for the texture data</param>
        /// <returns>True if the format is a valid depth texture format</returns>
        public static bool IsDepthFormat(PixelInternalFormat format)
        {
            string formatName = format.ToString().ToLower();

            return(formatName.Contains("depthcomponent"));
        }