2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-04-05 11:19:39 -04:00
raylib-cs/Raylib-cs/types/Material.cs
Chris Dill 23ed54cc24
BREAKING: Update names of methods, variables, and other elements (#181)
Breaking change to update naming across Raylib-cs to make it more consistent with C# naming conventions.

---------

Co-authored-by: MrScautHD <65916181+MrScautHD@users.noreply.github.com>
2023-08-14 21:33:48 +01:00

92 lines
2.0 KiB
C#

using System.Runtime.InteropServices;
namespace Raylib_cs
{
/// <summary>
/// Material map index
/// </summary>
public enum MaterialMapIndex
{
/// <summary>
/// NOTE: Same as MATERIAL_MAP_DIFFUSE
/// </summary>
MATERIAL_MAP_ALBEDO = 0,
/// <summary>
/// NOTE: Same as MATERIAL_MAP_SPECULAR
/// </summary>
MATERIAL_MAP_METALNESS,
MATERIAL_MAP_NORMAL,
MATERIAL_MAP_ROUGHNESS,
MATERIAL_MAP_OCCLUSION,
MATERIAL_MAP_EMISSION,
MATERIAL_MAP_HEIGHT,
/// <summary>
/// NOTE: Uses GL_TEXTURE_CUBE_MAP
/// </summary>
MATERIAL_MAP_CUBEMAP,
/// <summary>
/// NOTE: Uses GL_TEXTURE_CUBE_MAP
/// </summary>
MATERIAL_MAP_IRRADIANCE,
/// <summary>
/// NOTE: Uses GL_TEXTURE_CUBE_MAP
/// </summary>
MATERIAL_MAP_PREFILTER,
MATERIAL_MAP_BRDF,
MATERIAL_MAP_DIFFUSE = MATERIAL_MAP_ALBEDO,
MATERIAL_MAP_SPECULAR = MATERIAL_MAP_METALNESS,
}
/// <summary>
/// Material texture map
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public partial struct MaterialMap
{
/// <summary>
/// Material map texture
/// </summary>
public Texture2D Texture;
/// <summary>
/// Material map color
/// </summary>
public Color Color;
/// <summary>
/// Material map value
/// </summary>
public float Value;
}
/// <summary>
/// Material type (generic)
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Material
{
/// <summary>
/// Material shader
/// </summary>
public Shader Shader;
//TODO: convert
/// <summary>
/// Material maps
/// </summary>
public MaterialMap* Maps;
/// <summary>
/// Material generic parameters (if required)
/// </summary>
public fixed float Param[4];
}
}