Sign in to follow this  
CustomDrive

DevIL (OpenIL) ilutGLLoadImage() Problem [FIXED]

Recommended Posts

is there some type of limitation to the image that ilutGLLoadImage() can load? since no matter how hard I try, it keeps returning a 0. My code:
GLuint	texture[1];

int InitIL()
{
	ilInit();
	iluInit();
	ilutRenderer(ILUT_OPENGL);
	texture[0] = ilutGLLoadImage("lol.bmp");
	return TRUE;
}

int InitGL(GLvoid)										
{
	glEnable(GL_TEXTURE_2D);							
	glShadeModel(GL_SMOOTH);							
	glClearColor(0.0f, 0.0f, 0.0f, 0.5f);				
	glClearDepth(1.0f);									
	glEnable(GL_DEPTH_TEST);							
	glDepthFunc(GL_LEQUAL);								
	glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);	
	return TRUE;										
}

void main(int argc, char **argv) {
	InitGL();
	InitIL();
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
	glutInitWindowPosition(100,100);
	glutInitWindowSize(320,320);
	glutCreateWindow("3D Tech- GLUT Tutorial");
	glutDisplayFunc(renderScene);
	glutIdleFunc(renderScene);
	glEnable(GL_DEPTH_TEST);
	glutMainLoop();
}


btw, ilLoadImage() had no problem loading the image, but when I try ilutGLBindTexImage(), it still returns a 0.. anyone know what the problem is? EDIT: Nevermind, problem solved [Edited by - CustomDrive on May 10, 2008 8:51:15 AM]

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