-
Selecting which obj to move
I want to have 2 moving objs in the project, but I want to move the one by one, how will I do that???
-
Re: Selecting which obj to move
Are you talking about ie., having the mouse click on one and drag it around, if so use OpenGl Selection in conjuction with the mouse coordinates. http://www.opengl.org/developers/cod...ffer#first_hit
or if your talking about moving them independantly of each other just just gl(Push/Pop)Matrix;
//First object
glPushMatrix();
glRotatef(blah,blah,blah,blah);
glTranslatef(blah,blah,blah);
//Draw stuff here
glPopMatrix();
//second object
glPushMatrix();
glRotatef(blah,blah,blah,blah);
glTranslatef(blah,blah,blah);
//Draw stuff here
glPopMatrix();
and so on....
if these are not what you meant, please explain...
The Chicken Fryer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules