PDA

View Full Version : Movable and Immovable objects problem !



Ehsan Nekooee
08-17-2009, 05:48 AM
Hi people

I want to design two objects on the screen, one of them is fixed and the other one is moving using for example with glRotate and all of them are in a single function.
How can I do it?
just need the logic( Algorithm ) behind it, I think I can do the codeing. Maybe I have to use glPush/PopMatrix(). But how?

Any clues would be appreciated.

P.S: I use visual c++ (Console Environment)

usr666
08-17-2009, 12:52 PM
try something like this:

- draw static geometry
- push matrix
- set transformation for moving object
- draw moving geometry
- pop matrix

i assume that you set initial modelview and projection matrices in some init function

Ehsan Nekooee
08-17-2009, 01:24 PM
thanx mate
It helped