Watch
2
0
Fork
You've already forked raylib-cs
0
raylib-cs/Raylib-cs/types/Shader.cs
Dennis Steffen 21d83c60a9
Upgrade Raylib to 6.0 (#337)
* Updated target to Raylib 6 + synced invoke called with the changes in C. [WARNING: Breaking changes!]

* Added severial examples. Corrected towards the correct return type and add utilities to prevent working with pointers

* Additional resources from the Raylib repo.

* Fixed additional pinvokes to match with the new raylib bindings. [Warning breaking changes!]

* Fixing the QOL utils

* Fixing the Mesh struct

* Applying changes after review. Merged resources.LICENSE + raylib-cs.Native.csproj only targets dotnet8

* Updated README to reflect .NET 10 and Raylib 6 compatibility changes.

* Updated shader colors, adjusted car model scale, disabled HDR in SkyboxDemo, and fixed camera mode assignment. Removed unused `Capacity` field in FilePathList struct.

* Improved XML comments for consistency, fixed spacing and formatting across examples, added new resources to `resources.LICENSE`.

* Updated XML comment for `GetDirectoryFileCountEx` to clarify behavior and filtering options.

* Updated and clarified XML comments for methods and parameters, improved naming consistency, and refined shader-related functions. Renamed enums in `Shader.cs` for so it is inline with the upstream.

* Improved XML comments for clarity and consistency in `Model.cs` and `Mesh.cs`, updated method and variable names for better readability, and adjusted logic in span creation methods.

* Corrected XML comment capitalization in `Model.cs`.

---------

Co-authored-by: Meatcorps <info@meatcorps.nl>
2026-05-24 07:21:12 +01:00

91 lines
1.5 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,
VertexBoneIds,
VertexBoneWeights,
MatrixBoneTransforms,
VertexInstanceTransform,
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,
UInt,
UIVec2,
UIVec3,
UIVec4,
Sampler2D
}
/// <summary>
/// Shader type (generic)
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public unsafe struct Shader
{
/// <summary>
/// Shader program id
/// </summary>
public uint Id;
/// <summary>
/// Shader locations array (MAX_SHADER_LOCATIONS, int *)
/// </summary>
public int* Locs;
}