diff --git a/Camera.cs b/Camera.cs index b6613f4..f1ee3cf 100644 --- a/Camera.cs +++ b/Camera.cs @@ -9,7 +9,8 @@ namespace Voxel public static float Pitch = 0f; public static float Yaw = -90f; public static float FOV = 70f; - public static float Speed = 0.5f; + public static float Speed = 5f; + public static float ShiftSpeed = 20f; public static Matrix4 view => Matrix4.LookAt(Position, Position + Front, Vector3.UnitY); @@ -33,7 +34,7 @@ namespace Voxel float moveSpeed = Speed * time; if (Input.GetKey(OpenTK.Windowing.GraphicsLibraryFramework.Keys.LeftShift)) { - moveSpeed *= 10; + moveSpeed = ShiftSpeed * time; } if (Input.GetKey(OpenTK.Windowing.GraphicsLibraryFramework.Keys.W)) { diff --git a/Triangle.cs b/Triangle.cs deleted file mode 100644 index ab9db2c..0000000 --- a/Triangle.cs +++ /dev/null @@ -1,43 +0,0 @@ -using OpenTK.Graphics.OpenGL4; - -namespace Voxel -{ - - public class Triangle - { - private int _vao; - private Shader _shader; - - public Triangle() - { - string vertexPath = "Shaders/shader.vert"; - string fragmentPath = "Shaders/shader.frag"; - _shader = new Shader(vertexPath, fragmentPath); - - float[] vertices = - { - -0.0f, 0.5f, 0.0f, //top - 0.5f, -0.5f, 0.0f, // bottom right - -0.5f, -0.5f, 0.0f // bottom left - }; - - _vao = GL.GenVertexArray(); - GL.BindVertexArray(_vao); - - int vbo = GL.GenBuffer(); - GL.BindBuffer(BufferTarget.ArrayBuffer, vbo); - GL.BufferData(BufferTarget.ArrayBuffer, vertices.Length * sizeof(float), vertices, BufferUsageHint.StaticDraw); - - GL.VertexAttribPointer(0, 3, VertexAttribPointerType.Float, false, 3 * sizeof(float), 0); - GL.EnableVertexAttribArray(0); - - _shader.Use(); - } - - public void Draw() - { - GL.BindVertexArray(_vao); - GL.DrawArrays(PrimitiveType.Triangles, 0, 3); - } - } -} diff --git a/atlas.png b/atlas.png new file mode 100644 index 0000000..f2d0775 Binary files /dev/null and b/atlas.png differ