Texture glutSolidcube

Hi all,

For a specific project I just need to appy an img texture to one side of a glutSolidcube.

Here’s a picture of the project design : http://164-prod.com/bbuild/img/dump2.jpg

Since I’m really beginner with OpenGL and C++, I just as wondernig if there is an easy way to do that.

I watched a lot of different tutorials and I feel lost with adapting the OF texture library with that.

Is there anything to do with glBindTexture();?
How could I convert a texture loaded with ofTexture to a type “GLuint” ?

Thanks for your help

I finally found a cheap lo-fi way to do that, just putting a texture just in front of the cube.

Im sure that’s not the right way to do it, so If you have any suggestion I would be much appreciated.

( thanks to Todd Vanderlin for his of3D class )

  
 ofSet3DMode(0);  
	ofLightsOn();  
	ofInitLights();  
	  
	int valy = 500;  
	  
	glRotatef(mouseX,1,0,0);  
	  
	glPushMatrix();  
	glTranslatef(500,valy,0);  
        glutSolidCube(500);  
	glPopMatrix();  
	ofLightsOff();  
	glPushMatrix();  
	glTranslatef(250,-250+valy,250);  
	texColor.draw(0,0,500,500);  
	glPopMatrix();