X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=init.cpp;h=37e9d70f974ec160c7bd7b2f169767cdcf17b263;hp=554aa240574a665b005a7fde6a215b729e5a382b;hb=0cdd6e9e30a807056699ed9b3fa023a23ce83af9;hpb=5dfd8dfbd444210f9c9e3a0baf5c82b49e76e7ff diff --git a/init.cpp b/init.cpp index 554aa24..37e9d70 100644 --- a/init.cpp +++ b/init.cpp @@ -38,7 +38,7 @@ void measure_texel_subpixel_precision() check_error(); glBindTexture(GL_TEXTURE_2D, dst_texnum); check_error(); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, width, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F, width, 1, 0, GL_RGBA, GL_FLOAT, NULL); check_error(); glGenFramebuffers(1, &fbo); @@ -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();