how to render a cuboids in horizontal rotate 90 degree to vertical cuboids

I am beginner. I am currently having problem with how to render a cuboids in horizontal (at the right of x-axis) and rotate 90 degree to the left, a cuboids will be in vertical (parallel with y-axis). I am using OpenGL with Visual C++. Pls help.

Hi,
You need to use glTranslate() and glRotate() inorder to move and rotate. I think you need

glRotate3f(., ., .);
glTranslate3f(-5, _.-, .);

Hope that helps a bit

thanks for helping me. but i don’t want cuboid to rotate 360-degree. I just want to rotate till 90-degree.
anyway to do it?

You should have a look at the arguments of glRotate3f().
I sugeest you should see some examples and get some tutorials, as I did ; I am also a beginner.

Originally posted by caroline:
thanks for helping me. but i don’t want cuboid to rotate 360-degree. I just want to rotate till 90-degree.
anyway to do it?