- GLuint tex0 = load_texture("test1499.pgm", WIDTH, HEIGHT);
- GLuint tex1 = load_texture("test1500.pgm", WIDTH, HEIGHT);
+ unsigned width1, height1, width2, height2;
+ GLuint tex0 = load_texture("test1499.png", &width1, &height1);
+ GLuint tex1 = load_texture("test1500.png", &width2, &height2);
+
+ if (width1 != width2 || height1 != height2) {
+ fprintf(stderr, "Image dimensions don't match (%dx%d versus %dx%d)\n",
+ width1, height1, width2, height2);
+ exit(1);
+ }