I have been trying to look online for this and, so far, I haven't found anything useful. I would like to add a .bmp image to an OpenGL window. The lines here (GL_LINES), are irrelevant, something else to put with the image.
I’m fairly new to C++. I would appreciate it if anybody could help with anything.
1 2 3 4 5 6 7 8 9 10 11 12
void myDisplay(void)
{
glClear(GL_COLOR_BUFFER_BIT); // clear the screen
glBegin(GL_LINE_LOOP);
glVertex2i(318,0);
glVertex2i(318,250);
glVertex2i(322,250);
glVertex2i(322,0);
glEnd();
//I want to add "Tiger (left)_.bmp" here
glFlush(); // send all output to display
}
I wrote simple BMP and TGA readers for use with OpenGL a while ago.
They aren't large, but they exceed the post limit here. If you want them, PM me and let me know where I can email them to you.