Culling, rendering improvements and optimizations, block removing test.

This commit is contained in:
2025-09-02 22:43:35 +02:00
parent a9cab195b6
commit 00713db79e
16 changed files with 390 additions and 210 deletions

View File

@@ -67,6 +67,17 @@ namespace Voxel
GL.UniformMatrix4(location, false, ref matrix);
}
public void SetInt(string name, int value)
{
int location = GL.GetUniformLocation(_handle, name);
if (location == -1)
{
Console.WriteLine($"Uniform '{name}' not found in shader.");
return;
}
GL.Uniform1(location, value);
}
public void Use()
{
GL.UseProgram(_handle);