- glTexCoord2f(1.0f, 1.0f);
- glVertex2f(1.0f, 1.0f);
+ int texcoord_attrib = glGetAttribLocation(glsl_program_num, "texcoord");
+ if (texcoord_attrib != -1) {
+ glEnableVertexAttribArray(texcoord_attrib);
+ check_error();
+ glVertexAttribPointer(texcoord_attrib, 2, GL_FLOAT, GL_FALSE, 0, vertices); // Same as texcoords.
+ check_error();
+ }