   Question about texture display
  Hi, I meet a problem in rendering a textured train.When I use material I can get the image like the left image.But when I change to use a texture the image is right image.http://vrlab.whu.edu.cn/doc/question.jpgI use one light in my scene, set the Ambient=0.1, Diffuse=0.2, Specular=0.1For Texture paraglTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);glEnable(GL_LIGHTING)I modeled the train by 3DMax, and render it right in Max, using 3ds to export to my application!When I change to GL_MODULATE, but it seems look like the material effect, and the background is dim。For clearly, I give the opengl codes here:glPushAttrib(GL_LIGHTING_BIT | GL_ENABLE_BIT | GL_TEXTURE_BIT | GL_HINT_BIT);glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);glEnable(GL_LIGHTING);glDisable(GL_NORMALIZE);glShadeModel(GL_SMOOTH);glDepthFunc(GL_LEQUAL);glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);glBind(GL_TEXTURE_2D,iTexID);glBegin(GL_TRIANGLE_STRIP);for(j = 0; j < wptPoint; j++){glTexCoord2fv((float*)&pSupScene->m_pTexCoord[*((WORD*)&pSupScene->m_pPoly3Mat.pMemBlock[iOffset + iTexSize])]);glNormal3fv((float*)&pSupScene->m_pNormals[*((WORD*)&pSupScene->m_pPoly3Mat.pMemBlock[iOffset + iNormalSize])]);glVertex3fv((float*)&pSupScene->m_pVertices[*((WORD*)&pSupScene->m_pPoly3Mat.pMemBlock[iOffset])]);iOffset += iVertexSize;}glEnd();All of these included in a display list[Edited by - bopi on June 17, 2009 9:36:45 AM]
  Not sure what you mean. The background is dim? It looks black to me. What's the problem?   