Fix issues with the nehe06 sample
This commit is contained in:
parent
566fc8134d
commit
9ba82d4bfc
|
@ -8,14 +8,19 @@
|
|||
#include "GL/glext.h"
|
||||
#include "GL/glkos.h"
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#define IMAGE_FILENAME "/rd/NeHe.bmp"
|
||||
extern uint8_t romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
#else
|
||||
#define IMAGE_FILENAME "samples/nehe06/romdisk/NeHe.bmp"
|
||||
#endif
|
||||
|
||||
/* floats for x rotation, y rotation, z rotation */
|
||||
float xrot, yrot, zrot;
|
||||
|
||||
/* storage for one texture */
|
||||
int texture[1];
|
||||
GLuint texture[1];
|
||||
|
||||
/* Image type - contains height, width, and data */
|
||||
struct Image {
|
||||
|
@ -93,7 +98,7 @@ int ImageLoad(char *filename, Image *image) {
|
|||
}
|
||||
|
||||
if ((i = fread(image->data, size, 1, file)) != 1) {
|
||||
printf(stderr, "Error reading image data from %s.\n", filename);
|
||||
fprintf(stderr, "Error reading image data from %s.\n", filename);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -119,7 +124,7 @@ void LoadGLTextures() {
|
|||
exit(0);
|
||||
}
|
||||
|
||||
if (!ImageLoad("/rd/NeHe.bmp", image1)) {
|
||||
if (!ImageLoad(IMAGE_FILENAME, image1)) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user