Added IcoSphere for testing. Replaced Vector3D<T> with Vector3 since it is more performant
All checks were successful
Gitea Actions Demo / Scan the project (push) Successful in 21s

This commit is contained in:
2024-02-04 22:53:58 +01:00
parent 0b0d2360d6
commit 3912f2bd9a
7 changed files with 271 additions and 50 deletions

View File

@ -1,6 +1,6 @@
using Silk.NET.Maths;
using Silk.NET.OpenGL;
using Silk.NET.OpenGL;
using System.Numerics;
using Silk.NET.Maths;
namespace Nebulix.Rendering;
@ -35,6 +35,10 @@ public class Shader
_glContext.Uniform1(_glContext.GetUniformLocation(_shaderProgramId, name), value);
}
public void SetVector(string name, Vector3 value)
{
_glContext.Uniform3(_glContext.GetUniformLocation(_shaderProgramId, name), value.X, value.Y, value.Z);
}
public void SetVector(string name, Vector3D<float> value)
{
_glContext.Uniform3(_glContext.GetUniformLocation(_shaderProgramId, name), value.X, value.Y, value.Z);