PDA

View Full Version : How to control multiple objects seperately



zampara
10-24-2001, 04:21 AM
Hello everyone. I am a newbie in this subject and I would like to know if anyone outhere can help me on this:
I have 2 2D objects in my application and I would like to move them seperately on the x-y axis with the glTranslatef funciton because I am using GLUT with Borland Builder(I also want to find out how to choose them with the mouse if thats not too hard).
Also is there any url can download that superbible or do I have to buy it?

Thanks in advance for all you guys...

Gavin
10-24-2001, 07:04 AM
glPushMatrix();
glTranslatef(x, y, z); // item 1
glPopMatrix();

glPushMatrix();
glTranslatef(x, y, z); // item 2
glPopMatrix();

or whatever.

you can create a selection buffer, there are many posts on this here, I assume there is a tut for it at gamedev.

tata