Presentation is loading. Please wait.

Presentation is loading. Please wait.

Glut Coordinate System Used in keyboard and mouse callbacks x y w h [window]

Similar presentations


Presentation on theme: "Glut Coordinate System Used in keyboard and mouse callbacks x y w h [window]"— Presentation transcript:

1 Glut Coordinate System Used in keyboard and mouse callbacks x y w h [window]

2 Fall 2013 revised2 Recall OpenGL Rendering Pipeline stages of vertex transformation

3 OpenGL NDC (normalized device coordinate) x y z [-1,1] 2 × [0,1] depth range Near (0) Far (1) Note: this is a left-hand coordinate system!

4 Fall 2013 revised4 Recall OpenGL Rendering Pipeline stages of vertex transformation

5 OpenGL Window Coordinates x y z [0,1] 2 Near (0) Far (1)

6 Use Mouse to Pick 2D World x y xminxmax (mx, my) (x, y) w x Keep all terms positive in the formula

7 Use Mouse to Pick 2D World x y ymin ymax (mx, my) (x, y) h Length ratio: take positive values y

8 Summary


Download ppt "Glut Coordinate System Used in keyboard and mouse callbacks x y w h [window]"

Similar presentations


Ads by Google