Download presentation
Presentation is loading. Please wait.
Published byLizbeth Taylor Modified over 9 years ago
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
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
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
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).
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
16
Supported by GLUT Hierarchical menu supported
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()
22
Instancing To keep the objects in the scene Using structures or classes Display list For efficient rendering No edition allowed
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
27
Logic operations can be applied to each pixel (source and destination) XOR for erasable objects
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.