Original Post
Hey everyone,
I have a routine to draw a cylinder and I have environment mapping turned on by the following:bool emap = true;
The very ends of my cylinder are drawn with trianges. Each triagnle starts at (0,0,0) or (height, 0, 0) depending on which end cap i am drawing.
When I do regular texturing everything works fine, but when i do environment map texturing, as above, one triangle of the capped ends will show some random portion of the environment mapped image. I am drawing all of my triangles in the correct order and this is really frustrating me . . .does anyone have any ideas. If clarification is needed please feel free to ask.
Matt
if(emap) {
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
}
}
|