• Advertisement
Sign in to follow this  

DevIL (OpenIL) ilutGLLoadImage() Problem [FIXED]

This topic is 3579 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Sign in to follow this  

  • Advertisement