diff --git a/main.cpp b/main.cpp index 4f50f1e..fbd2a20 100644 --- a/main.cpp +++ b/main.cpp @@ -34,7 +34,7 @@ void loadTexture (GLuint& imageTexture1) cout << "image empty" << endl; } else { cout << "loaded " << image_path << endl; - //flip(image, image, 1); + flip(image, image, 0); #if (CV_VERSION_MAJOR >= 4) cvtColor(image, image, cv::COLOR_BGR2RGB); #else @@ -89,10 +89,10 @@ void display(void) glBindTexture(GL_TEXTURE_2D, imageTexture); glBegin(GL_QUADS); // front face - glTexCoord2f(0.0f, 0.0f); glVertex3f(1.0f, -1.0f, 0.0f); //bottom right - glTexCoord2f(1.0f, 0.0f); glVertex3f(1.0f, 1.0f, 0.0f); //top right - glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 0.0f); //top left - glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, -1.0f, 0.0f); //bottom left + glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 0.0f); //bottom right + glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 0.0f); //top right + glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 0.0f); //top left + glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 0.0f); //bottom left glEnd(); glDisable(GL_TEXTURE_2D); glutSwapBuffers();