using System.Runtime.CompilerServices;
namespace BansheeEngine
{
///
/// Contains various builtin resources that are always available.
///
public static class Builtin
{
///
/// Types of builtin meshes that are always available in the engine.
///
private enum BuiltinMesh // Note: Must match C++ enum BuiltinMesh
{
Box, Sphere, Cone, Quad, Disc
}
///
/// Returns a pure white texture.
///
public static SpriteTexture WhiteTexture
{
get { return Internal_GetWhiteTexture(); }
}
///
/// Returns the default shader to be used with renderables.
///
public static Shader DiffuseShader
{
get { return Internal_GetDiffuseShader(); }
}
///
/// Returns a axis aligned box of unit size.
///
public static Mesh Box
{
get { return Internal_GetMesh(BuiltinMesh.Box); }
}
///
/// Returns a unit sphere mesh.
///
public static Mesh Sphere
{
get { return Internal_GetMesh(BuiltinMesh.Sphere); }
}
///
/// Returns a cone mesh.
///
public static Mesh Cone
{
get { return Internal_GetMesh(BuiltinMesh.Cone); }
}
///
/// Returns a quad mesh with unit size edges.
///
public static Mesh Quad
{
get { return Internal_GetMesh(BuiltinMesh.Quad); }
}
///
/// Returns a disc mesh with unit radius.
///
public static Mesh Disc
{
get { return Internal_GetMesh(BuiltinMesh.Disc); }
}
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern SpriteTexture Internal_GetWhiteTexture();
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern Shader Internal_GetDiffuseShader();
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern Mesh Internal_GetMesh(BuiltinMesh mesh);
}
}