Thanks for looking at this guys. Nothing seems to work so I just chopped out everything unnecessary so I can post the code in its entirety. This renders a quad with a blue/white gradient without any texturing on a winXP box with GeForce 4 ti 128.
#pragma comment( linker, “/subsystem:"windows" /entry:"mainCRTStartup"” )
#include <gl\glut.h>
#include <stdio.h>
#undef SCREEN_WIDTH
#define SCREEN_WIDTH 800
#define SCREEN_HEIGHT 600
static GLubyte interfaceBMP[256][256][3];
static GLuint menus;
void renderScene(void)
{
glClear(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, menus);
glBegin(GL_QUADS);
glColor3f(0,0,1);
glTexCoord2f(0,0); glVertex3f(-3, 3,-6);
glTexCoord2f(1,0); glVertex3f( 3, 3,-6);
glColor3f(1,1,1);
glTexCoord2f(1,1); glVertex3f( 3,-3,-6);
glTexCoord2f(0,1); glVertex3f(-3,-3,-6);
glEnd();
glDisable(GL_TEXTURE_2D);
glutSwapBuffers();
glutPostRedisplay();
}
void importInterfaceBMP( char filename )
{
FILE *fin;
fin = fopen(filename,“rb”);
int x, y;
for(x = 0; x < 54; x++) fgetc( fin );
for(y = 0; y < 256; y++) {
for(x = 0; x < 256; x++) {
interfaceBMP[y][2] = fgetc( fin );
interfaceBMP[y][1] = fgetc( fin );
interfaceBMP[y][0] = fgetc( fin );
}
}
fclose( fin );
}
void initTextures(void) {
importInterfaceBMP(“textures/interface.bmp”);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glGenTextures(1, &menus);
glTexImage2D(GL_TEXTURE_2D, 0, 3, 256,
256, 0, GL_RGB, GL_UNSIGNED_BYTE, interfaceBMP);
}
int main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowPosition(100,100);
glutInitWindowSize(SCREEN_WIDTH,SCREEN_HEIGHT);
glutCreateWindow(“mein window”);
glutDisplayFunc(renderScene);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-4,4,-3,3,4,400);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glEnable(GL_DEPTH_TEST);
initTextures();
glutMainLoop();
return(0);
}