dmantamp

02-24-2004, 07:04 PM

Hi All,

I am a beginner to OpenGL programming. I am stuck with a problem. I will

explain it with a simple example.

I wanted to draw a tilted V using two lines and some rotations. I wanted

to do in the following way.

0) Initial position.

1) Draw line along Y-axis.

2) Rotate it anticlickwise 45.0

3) Come to initial position. Such that transformation done in the step (2) does not

apply next.

4) Now draw one more line along Y-axis.

5) Rotate it clockwise 45.0. Now we should have a shape 'V'

6) Now rotate thsi whole model(, I mean the V shape), 90.0

That is I wanted to apply independent transformations to each object and one more transformation for the entire scene.

I tried to use pusmatrix and popmatrix. But it didn't help. May be I am not

using it in proper way. Can you please let me know how to acheive this.

A pseudo code will be really help ful.

Expecting your help.

Thanks in advance

Deek**** M

I am a beginner to OpenGL programming. I am stuck with a problem. I will

explain it with a simple example.

I wanted to draw a tilted V using two lines and some rotations. I wanted

to do in the following way.

0) Initial position.

1) Draw line along Y-axis.

2) Rotate it anticlickwise 45.0

3) Come to initial position. Such that transformation done in the step (2) does not

apply next.

4) Now draw one more line along Y-axis.

5) Rotate it clockwise 45.0. Now we should have a shape 'V'

6) Now rotate thsi whole model(, I mean the V shape), 90.0

That is I wanted to apply independent transformations to each object and one more transformation for the entire scene.

I tried to use pusmatrix and popmatrix. But it didn't help. May be I am not

using it in proper way. Can you please let me know how to acheive this.

A pseudo code will be really help ful.

Expecting your help.

Thanks in advance

Deek**** M