Presentation is loading. Please wait.

Presentation is loading. Please wait.

School of Computer Science University of Seoul. 1. Interaction 2. Input Devices 3. Clients and Servers 4. Display Lists 5. Programming Event-Driven Input.

Similar presentations


Presentation on theme: "School of Computer Science University of Seoul. 1. Interaction 2. Input Devices 3. Clients and Servers 4. Display Lists 5. Programming Event-Driven Input."— Presentation transcript:

1 School of Computer Science University of Seoul

2 1. Interaction 2. Input Devices 3. Clients and Servers 4. Display Lists 5. Programming Event-Driven Input 6. Menus 7. Picking 8. A Simple Paint Program 9. Building Interactive Models 10. Animating Interactive Programs 11. Design of Interactive Programs 12. Logic Operations

3

4 Developed by Ivan Sutherland as part of his Ph.D thesis at MIT (1963).Ivan Sutherland Received the Turing Award in 1988. Ancestor of…  CAD  GUI  OOP  HCI Adopted lightpen as input devicelightpen DemoDemo on YouTube

5

6 Keyboard Mouse, trackball, touchpad, pointing stick Data tablet Lightpen Joystick Spaceball Data glove Haptic device Wiimote

7 String  Keyboard Locator  Mouse Pick  OpenGL “selection” Choice  Discrete  Widgets (menu) Valuators  Analog  Widgets (slidebar) Stroke  Mouse motion

8 Measure & trigger Input modes  Request mode  Sample mode  Event mode  Event queue  Callback

9 Again, no user interface features in OpenGL. UI should be implemented using other libraries, such as GLUT. GLUT supports (http://www.opengl.org/resources/libraries/glut)http://www.opengl.org/resources/libraries/glut  Multiple windows for OpenGL rendering  Callback driven event processing  Sophisticated input devices  An ‘idle’ routine and timers  A simple, cascading pop-up menu facility  Utility routines to generate various solid and wire frame objects  Support for bitmap and stroke fonts  Miscellaneous window management functions

10

11

12 Groups multiple instructions into one to reduce the traffic between client & server. Memory required on server side. Useful for text rendering. Care needed not to mess up the states. (transformation, projection, attributes, etc.)  Can be saved/restored by push/pop. Deprecated in OpenGL 3.0  Complex geometry can be stored in VBO (vertex buffer object).

13

14 Notable GLUT events (http://www.opengl.org/resources/libraries/glut/s pec3/node45.html)http://www.opengl.org/resources/libraries/glut/s pec3/node45.html  glutDisplayFunc  glutReshapeFunc  glutKeyboardFunc  glutMouseFunc  glutMotionFunc  glutSpecialFunc  glutIdleFunc  glutPostRedisplay  glutTimeFunc

15

16 Supported by GLUT Hierarchical menu supported

17

18 Can be implemented using selection mode (GL_SELECT)  Deprecated in OpenGL 3.0 Can be implemented using occlusion query (http://www.opengl.org/registry/specs/AR B/occlusion_query.txt)http://www.opengl.org/registry/specs/AR B/occlusion_query.txt

19 Selection  By adjusting the clipping region and viewport Using bounding boxes  AABB (Axis-aligned bounding box) Back buffer + glReadPixels()

20

21

22 Instancing  To keep the objects in the scene  Using structures or classes Display list  For efficient rendering  No edition allowed

23

24 To avoid flickering during animation Created using GLUT_DOUBLE in glutInitDisplayMode() Front/back buffers keep being switched using glutSwapBuffers() When to change the parameters?  Idle event callback  Timer event callback

25

26

27 Logic operations can be applied to each pixel (source and destination) XOR for erasable objects


Download ppt "School of Computer Science University of Seoul. 1. Interaction 2. Input Devices 3. Clients and Servers 4. Display Lists 5. Programming Event-Driven Input."

Similar presentations


Ads by Google