rendered paste body#include <GL/glut.h>#include "Image.h"void init(){ glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0, 1.0, 0.0, 1.0); glMatrixMode(GL_MODELVIEW); glViewport(0, 0, 500, 500); glClearColor(1.0, 1.0, 1.0, 1.0); glEnable(GL_DEPTH_TEST); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glColor3f(1.0, 0.0, 0.0);}void display(){ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); Image img; img.loadRAW("/home/michael/a.raw", 300, 300); //img.load("/home/michael/Pictures/flag.tga"); loadTexture(img); glBegin(GL_QUADS); glTexCoord2f(0.0, 0.0); glVertex2f(0.0, 0.0); glTexCoord2f(0.0, 1.0); glVertex2f(0.0, 1.0); glTexCoord2f(1.0, 0.0); glVertex2f(1.0, 0.0); glTexCoord2f(1.0, 1.0); glVertex2f(1.0, 1.0); glEnd(); glFlush();}#include <cstdlib>void keys(unsigned char key, int x, int y){ if (key == ' ') glutPostRedisplay(); else exit(0);}int main(int argc, char **argv){ glutInit(&argc, argv); glutInitWindowPosition(0, 0); glutInitWindowSize(500, 500); glutCreateWindow("Images"); init(); glutDisplayFunc(display); glutKeyboardFunc(keys); glutMainLoop(); return 0;}