Focus pr on explicit type and util changes
This commit is contained in:
parent
205e602080
commit
be91fe9120
15 changed files with 18 additions and 856 deletions
|
|
@ -87,46 +87,4 @@ public unsafe struct Shader
|
|||
/// Shader locations array (MAX_SHADER_LOCATIONS, int *)
|
||||
/// </summary>
|
||||
public int* Locs;
|
||||
|
||||
public readonly CBool IsValid => Raylib.IsShaderValid(this);
|
||||
|
||||
public static Shader Load(string vsFileName, string fsFileName)
|
||||
{
|
||||
return Raylib.LoadShader(vsFileName, fsFileName);
|
||||
}
|
||||
|
||||
public static Shader LoadFromMemory(string vsCode, string fsCode)
|
||||
{
|
||||
return Raylib.LoadShaderFromMemory(vsCode, fsCode);
|
||||
}
|
||||
|
||||
public void GetLocationAttrib(string attribName)
|
||||
{
|
||||
Raylib.GetShaderLocationAttrib(this, attribName);
|
||||
}
|
||||
|
||||
public void SetValue<T>(int locationIndex, T value, ShaderUniformDataType uniformDataType) where T : unmanaged
|
||||
{
|
||||
Raylib.SetShaderValue(this, locationIndex, &value, uniformDataType);
|
||||
}
|
||||
|
||||
public void SetValues<T>(int locationIndex, T[] values, ShaderUniformDataType uniformDataType) where T : unmanaged
|
||||
{
|
||||
Raylib.SetShaderValueV(this, locationIndex, values, uniformDataType, values.Length);
|
||||
}
|
||||
|
||||
public void SetTexture(int locationIndex, Texture2D texture)
|
||||
{
|
||||
Raylib.SetShaderValueTexture(this, locationIndex, texture);
|
||||
}
|
||||
|
||||
public void SetMatrix(int locationIndex, System.Numerics.Matrix4x4 matrix)
|
||||
{
|
||||
Raylib.SetShaderValueMatrix(this, locationIndex, matrix);
|
||||
}
|
||||
|
||||
public void Unload()
|
||||
{
|
||||
Raylib.UnloadShader(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue