Sign in to follow this  
MrBob

auxDIBImageLoad problem

Recommended Posts

MrBob    143
I have been walking though the tutorials on NeHe's website. I keep getting this error when i try and compile my code. 'auxDIBImageLoadW' : cannot convert parameter 1 from 'char *' to 'LPCWSTR' the biggest difference is that i am using glut to handle my windows instead of coding them myself. would that be causing my problems?
AUX_RGBImageRec* LoadBMP(char *Filename)
{
	FILE *File=NULL;	
	File=fopen(Filename,"r");				
	fclose(File);
	return auxDIBImageLoad(Filename); <-error on this line				
}

void LoadGLTextures()
{
	AUX_RGBImageRec *TextureImage[1];				
	TextureImage[0]=LoadBMP("img1.bmp");
	glGenTextures(1, &texture[0]);
	glBindTexture(GL_TEXTURE_2D, texture[0]);
	glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX,    TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);
	glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
	glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);	
	
	free(TextureImage[0]->data);				
	free(TextureImage[0]);		
}

Share this post


Link to post
Share on other sites
V-man    813
You have unicode support enabled
Maybe auxDIBImageLoadA would force it to use ASCII
Also, someone should update these Nehe tutorials already. Get rid of that old junk known as GLaux

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this