2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-04-03 11:09:40 -04:00

84 lines
1.3 KiB
C#

using System.Runtime.InteropServices;
namespace Raylib_cs;
/// <summary>
/// Shader location index
/// </summary>
public enum ShaderLocationIndex
{
VertexPosition = 0,
VertexTexcoord01,
VertexTexcoord02,
VertexNormal,
VertexTangent,
VertexColor,
MatrixMvp,
MatrixView,
MatrixProjection,
MatrixModel,
MatrixNormal,
VectorView,
ColorDiffuse,
ColorSpecular,
ColorAmbient,
MapAlbedo,
MapMetalness,
MapNormal,
MapRoughness,
MapOcclusion,
MapEmission,
MapHeight,
MapCubemap,
MapIrradiance,
MapPrefilter,
MapBrdf,
MapDiffuse = MapAlbedo,
MapSpecular = MapMetalness,
}
/// <summary>
/// Shader attribute data types
/// </summary>
public enum ShaderAttributeDataType
{
Float = 0,
Vec2,
Vec3,
Vec4
}
/// <summary>
/// Shader uniform data type
/// </summary>
public enum ShaderUniformDataType
{
Float = 0,
Vec2,
Vec3,
Vec4,
Int,
IVec2,
IVec3,
IVec4,
Sampler2D
}
/// <summary>
/// Shader type (generic)
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public unsafe partial struct Shader
{
/// <summary>
/// Shader program id
/// </summary>
public uint Id;
/// <summary>
/// Shader locations array (MAX_SHADER_LOCATIONS, int *)
/// </summary>
public int* Locs;
}