mapping a sphere in opengl? (code included)

Started by
-1 comments, last by mbenic 24 years, 1 month ago
Sorry to bother with this again, but I''m trying to texture map a sphere with the following code, does anyone have any suggestions as to why my objects just show up white (GL is managing to load the textures, as I don''t get the glu warning dialog) //Loading map = auxDIBImageLoadA(fileName); if (!map) { cout<<"Warning:Texture Not Found : "<<fileName<<endl; return; } // Create Linear Filtered Texture glGenTextures(1, &(*mapHandle)); glBindTexture(GL_TEXTURE_2D, *mapHandle); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST); cout << "Loaded Texture "<<" from file : "<<fileName<<endl; //Mapping glEnable (GL_TEXTURE_2D); glBindTexture (GL_TEXTURE_2D, *mapHandle); GLUquadricObj* q = gluNewQuadric ( ); gluQuadricDrawStyle (q, GLU_FILL ); gluQuadricNormals (q, GLU_SMOOTH ); gluQuadricTexture (q, GL_TRUE ); gluSphere (q, radius/RADIUSSCALE, 20, 20); gluDeleteQuadric (q); glDisable (GL_TEXTURE_2D ); Thanks --- Matt Benic "Ummm, you mean this aint bubba's-house-of-hillbilly?"

This topic is closed to new replies.

Advertisement