Glitchy Render using Rust SFML

I wrote an implementation for the Voxel Space algorithm described here.
If you look at this screen shot of my app running, there are a whole bunch of glitchy horizontal lines that aren't supposed to be there.

You may take a look at the screen recording at the GitHub repository as well.

My program assigns points to the vertical lines like so:

fn draw_vline(vertices: &mut VertexArray, x: f32, y_top: f32, y_bottom: f32, color: Vec<u8>) {
    vertices.append(&Vertex::new(
        Vector2f::new(x, y_top), //x co-ordinates of this point and the next are the same
        Color::rgb(color[0], color[1], color[2]),
        Vector2f::new(0., 0.), //Disregard this (texture coordinates)
    ));
    vertices.append(&Vertex::new(
        Vector2f::new(x, y_bottom),
        Color::rgb(color[0], color[1], color[2]),
        Vector2f::new(0., 0.),
    ));
}

Clearly, the x co-ordinates of each pair of points added to the array of points comprising the vertical lines is same.

It would then be logical to assume that the horizontal lines in the program are nothing to do with my code, but some bug within rust-sfml, SFML or my graphics. My question is, does this make sense, and what steps should I take to resolve this issue, which is, apparently, not due to my own broken code?

GitHub repository if you'd like to look at the whole code base: https://github.com/actuday6418/roxel

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.