gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB, width, height, GL_RGB, GL_UNSIGNED_BYTE, mytextureimage);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameterf(GL_TEXTURE_2D, GL_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);