Skip to main content
gamedev.net
🔒 Locked

glu mip maps

Started by mooserman352 2 replies 700+ views
Original Post
mooserman352
mooserman352
I'm trying to build mip maps using gluBuild2DMipmaps, but it's not working. I get an error Mip invalid enumerant, and I have absolutely no idea what that means. Anyone have any clue?
mooserman352
mooserman352
Here is the code:

	texture * tex1;	tex1 = loadBMP("tile.bmp");	glBindTexture(GL_TEXTURE_2D, 1);	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);	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);	glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);	gluBuild2DMipmaps(GL_TEXTURE_2D,3,tex1->size,tex1->size,GL_RGB,GL_UNSIGNED_BYTE,tex1->pixels);	//glTexImage2D (GL_TEXTURE_2D, 0, 3, tex1->size, tex1->size, 0, GL_RGB, GL_UNSIGNED_BYTE, tex1->pixels);	delete []tex1->pixels;	delete tex1;


Thanks!
James Trotter
James Trotter
Your gluBuild2DMipmaps call is in order. Make certain that it's not any of the other code generating the error.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.