Original Post
Greetings,
I''m having an exceptionally bad time geting texture loading to work with Game Tutorial #4.
I know the texture loading worka, as I tried the code previously, but I can''t for the life of me get textures to load on my own models. I see the model, but it''s grey.
The texture is 512*512, a BMP, and GL_TEXTURE_2D is enabled. What could I be doing wrong?
In GameInit:
TankSkin.LoadBMP("Models/tank1/camo.bmp", GL_LINEAR, GL_LINEAR);
Tank.Load("Models/tank1/tank.md2");
In GameMain:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Clear screen and depth buffer
glLoadIdentity(); //Reset the current modelview matrix
glTranslatef(0.0f, 0.0f, -15.0f);
glColor4f(0.5f, 0.5f, 0.5f, 1.0f);
glScalef(0.2f, 0.2f, 0.2f);
glEnable(GL_TEXTURE_2D);
glPolygonMode(GL_FRONT, GL_FILL);
glPolygonMode(GL_BACK, GL_FILL);
glBindTexture(GL_TEXTURE_2D, TankSkin.ID);
hobgoblin.Animate(Tank.stateStart, Tank.stateEnd, 0.05f);