public static void DrawBox(ref OpenTK.Vector3 bbMin, ref OpenTK.Vector3 bbMax, ref OpenTK.Matrix4 trans, OpenTK.Graphics.Color4 color) { using (debugProgram.Using("object_matrix", trans)) using (Box box = new Box(bbMin, bbMax)) { GL.VertexAttrib3(1, new[] { 1f, 1f, 1f }); box.Render(new[] { debugProgram }); } }
public override void DrawBox(ref OpenTK.Vector3 bbMin, ref OpenTK.Vector3 bbMax, ref OpenTK.Matrix4 trans, OpenTK.Graphics.Color4 color) { using (debugProgram.Use()) using (Box box = new Box(bbMin, bbMax)) { debugProgram.UniformBuffer[UniformBuffer.Uniform.WorldMatrix] = trans; GL.VertexAttrib3(1, new[] { 1f, 1f, 1f }); box.Render(new[] { debugProgram }); } }
public override void DrawBox(ref OpenTK.Vector3 bbMin, ref OpenTK.Vector3 bbMax, ref OpenTK.Matrix4 trans, OpenTK.Graphics.Color4 color) { using (debugProgram.Use()) using (Box box = new Box(bbMin, bbMax)) { debugProgram[Uniforms.WorldMatrix] = trans; GL.VertexAttrib3(1, new[] { 1f, 1f, 1f }); box.Render(new[] { debugProgram }); } }
public override void DrawBox(ref OpenTK.Vector3 bbMin, ref OpenTK.Vector3 bbMax, OpenTK.Graphics.Color4 color) { using (debugProgram.Use()) { debugProgram["object_matrix"] = OpenTK.Matrix4.Identity; using (Box box = new Box(bbMin, bbMax)) { box.Render(new[] { debugProgram }); } } }
public override void DrawBox(ref OpenTK.Vector3 bbMin, ref OpenTK.Vector3 bbMax, OpenTK.Graphics.Color4 color) { using (debugProgram.Use()) { debugProgram[Uniforms.WorldMatrix] = OpenTK.Matrix4.Identity; using (Box box = new Box(bbMin, bbMax)) { box.Render(new[] { debugProgram }); } } }