// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
using System;
using System.Collections.Generic;
namespace Microsoft.Xna.Framework.Graphics
{
///
/// Provides information about the capabilities of the
/// current graphics device. A very useful thread for investigating GL extenion names
/// http://stackoverflow.com/questions/3881197/opengl-es-2-0-extensions-on-android-devices
///
internal partial class GraphicsCapabilities
{
internal void Initialize(GraphicsDevice device)
{
PlatformInitialize(device);
}
///
/// Whether the device fully supports non power-of-two textures, including
/// mip maps and wrap modes other than CLAMP_TO_EDGE
///
internal bool SupportsNonPowerOfTwo { get; private set; }
///
/// Whether the device supports anisotropic texture filtering
///
internal bool SupportsTextureFilterAnisotropic { get; private set; }
internal bool SupportsDepth24 { get; private set; }
internal bool SupportsPackedDepthStencil { get; private set; }
internal bool SupportsDepthNonLinear { get; private set; }
///
/// Gets the support for DXT1
///
internal bool SupportsDxt1 { get; private set; }
///
/// Gets the support for S3TC (DXT1, DXT3, DXT5)
///
internal bool SupportsS3tc { get; private set; }
///
/// Gets the support for PVRTC
///
internal bool SupportsPvrtc { get; private set; }
///
/// Gets the support for ETC1
///
internal bool SupportsEtc1 { get; private set; }
///
/// Gets the support for ATITC
///
internal bool SupportsAtitc { get; private set; }
internal bool SupportsTextureMaxLevel { get; private set; }
///
/// True, if sRGB is supported. On Direct3D platforms, this is always true.
/// On OpenGL platforms, it is true if both framebuffer sRGB
/// and texture sRGB are supported.
///
internal bool SupportsSRgb { get; private set; }
internal bool SupportsTextureArrays { get; private set; }
internal bool SupportsDepthClamp { get; private set; }
internal bool SupportsVertexTextures { get; private set; }
///
/// True, if the underlying platform supports floating point textures.
/// For Direct3D platforms this is always true.
/// For OpenGL Desktop platforms it is always true.
/// For OpenGL Mobile platforms it requires `GL_EXT_color_buffer_float`.
/// If the requested format is not supported an NotSupportedException
/// will be thrown.
///
internal bool SupportsFloatTextures { get; private set; }
///
/// True, if the underlying platform supports half floating point textures.
/// For Direct3D platforms this is always true.
/// For OpenGL Desktop platforms it is always true.
/// For OpenGL Mobile platforms it requires `GL_EXT_color_buffer_half_float`.
/// If the requested format is not supported an NotSupportedException
/// will be thrown.
///
internal bool SupportsHalfFloatTextures { get; private set; }
internal bool SupportsNormalized { get; private set; }
///
/// Gets the max texture anisotropy. This value typically lies
/// between 0 and 16, where 0 means anisotropic filtering is not
/// supported.
///
internal int MaxTextureAnisotropy { get; private set; }
// The highest possible MSCount
private const int MultiSampleCountLimit = 32;
private int _maxMultiSampleCount;
internal int MaxMultiSampleCount
{
get { return _maxMultiSampleCount; }
}
internal bool SupportsInstancing { get; private set; }
}
}