Author Topic: Graphic Issues  (Read 1858 times)

0 Members and 1 Guest are viewing this topic.

Offline Stormkeeper

  • Interviewer Extraordinaire
  • 211
  • Boomz!
No, not with FSO.  :P

Actually, I'm trying to create a skybox, and I'm getting instead of a beautiful textured cube, I have 3 textured sides, two grey-ish sides, and one totally missing. The missing one I can prolly solve easily, but the two grey ones (which I've determined to be the rear and bottom sides), I have no idea.

Code for top surface
void Skybox::DrawRear(GLuint texRear)
{
   glBindTexture(GL_TEXTURE_2D, texRear);
   
   glBegin(GL_QUADS);
   
   glTexCoord2f(0, 0);
   glVertex3f( -35.0f, -35.0f,  35.0f );

   glTexCoord2f(1, 0);
   glVertex3f(  35.0f, -35.0f,  35.0f );

   glTexCoord2f(1, 1);
   glVertex3f(  35.0f,  35.0f,  35.0f );

   glTexCoord2f(0, 1);
   glVertex3f( -35.0f,  35.0f,  35.0f );

    glEnd();
}

Code for bottom surface:
void Skybox::DrawBottom(GLuint texBottom)
{
    glBindTexture(GL_TEXTURE_2D, texBottom);
    glBegin(GL_QUADS);

        glTexCoord2f(0, 0);
      glVertex3f( -35.0f, -35.0f, -35.0f );

        glTexCoord2f(0, 1);
      glVertex3f( -35.0f, -35.0f,  35.0f );

        glTexCoord2f(1, 1);
      glVertex3f(  35.0f, -35.0f,  35.0f );

        glTexCoord2f(1, 0);

      glVertex3f(  35.0f, -35.0f, -35.0f );
    glEnd();
}

Texture binding and loading is called in another section of the code, using a LoadTGA function, which takes in the file name and texture id. Any help would be greatly appreciated.
Ancient-Shivan War|Interview Board

Member of the Scooby Doo Fanclub. And we're not talking a cartoon dog here people!!

 

Offline blackhole

  • Still not over the rainbow
  • 29
  • Destiny can suck it
    • Black Sphere Studios
Maybe post your other graphics functions as reference?