]> git.sesse.net Git - movit/commitdiff
Fix the roundoff test.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 9 Mar 2014 11:29:47 +0000 (12:29 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 9 Mar 2014 11:30:22 +0000 (12:30 +0100)
The wrong texture coordinates snuck in here when changing from fixed function.

init.cpp

index 554aa240574a665b005a7fde6a215b729e5a382b..13a86df236d5ea909dc269c8f8af827e1b7b5a35 100644 (file)
--- a/init.cpp
+++ b/init.cpp
@@ -221,12 +221,6 @@ void measure_roundoff_problems()
                1.0f, 1.0f,
                1.0f, 0.0f
        };
-       float texcoords[] = {
-               0.25f, 0.0f,
-               0.25f, 0.0f,
-               0.75f, 0.0f,
-               0.75f, 0.0f
-       };
 
        GLuint vao;
        glGenVertexArrays(1, &vao);
@@ -235,7 +229,7 @@ void measure_roundoff_problems()
        check_error();
 
        GLuint position_vbo = fill_vertex_attribute(glsl_program_num, "position", 2, GL_FLOAT, sizeof(vertices), vertices);
-       GLuint texcoord_vbo = fill_vertex_attribute(glsl_program_num, "texcoord", 2, GL_FLOAT, sizeof(texcoords), texcoords);
+       GLuint texcoord_vbo = fill_vertex_attribute(glsl_program_num, "texcoord", 2, GL_FLOAT, sizeof(vertices), vertices);  // Same data.
 
        glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
        check_error();