1 / 24

GLUT and GLVU

GLUT and GLVU. Andy Wilson September 22, 1999. Introduction GLUT GLVU Where to learn more Questions and Answers. Outline. So you want to use OpenGL? Low-level commands Manage rendering state Render primitives The windowing system is in your way No “world management” available.

zareh
Download Presentation

GLUT and GLVU

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GLUT and GLVU Andy Wilson September 22, 1999

  2. Introduction GLUT GLVU Where to learn more Questions and Answers Outline

  3. So you want to use OpenGL? Low-level commands Manage rendering state Render primitives The windowing system is in your way No “world management” available Introduction: Motivation

  4. GLUT: simple interface to window system User functions handle window events mouse, keyboard, resize, expose… Simple pop-up menus A few simple shapes (sphere, cone, teapot) No concept of world or camera management You reinvent the wheel a lot. Introduction: GLUT

  5. GLVU: object and camera management Several different model formats Renderable objects Easily extensible Several modules available or under development - IBR, tracking, large models, LOD... Introduction: GLVU

  6. Introduction GLUT GLVU Where to learn more Questions and Answers Outline

  7. GLUT: System Overview User Callbacks (Display, Idle, Keyboard, Mouse, Resize, …) GLUT Window System Events (Mouse, Keyboard, Window Expose/Hide/Resize/Destroy)

  8. Initialization and window/menu setup Interface callbacks Handle mouse, keyboard input Display function Draw world (including camera management) Idle function Runs when no events pending GLUT: Program Structure

  9. Keyboard Key press, key release, window location Mouse Enter/leave window, button down/up, drag Menu Item select GLUT: Interface Callbacks

  10. Responsible for entire display process Clear buffers Set up camera, GL matrix stacks Draw objects (including multipass rendering) Swap front/back buffer Good place to put per-frame world updates physics, collision, trackers GLUT: Display Callback

  11. Invoked when events not being received from window system Typical uses: request redraw (continuous update) update simulation clock No guarantee on when it’ll be called! GLUT: Idle Callback

  12. World and model management Load and place and render models yourself Camera management Manage GL projection stack yourself Motion control Arcball? Drive? Strafe? Look around? Multipipe anything What GLUT Doesn’t Do

  13. Introduction GLUT GLVU Where to learn more Questions and Answers Outline

  14. Object management Several polygonal file formats supported Objects can render themselves Camera and simple navigation Walk, translate, examine, look around Easily extensible Sits on top of GLUT GLVU: Overview

  15. GLVU: System Diagram User Input Handlers GLVU Model Formats GLVU Input Handlers User Idle Func User Display Func GLUT

  16. Everything is object-oriented C++ Components all inherit from base classes Camera, Object Default GLUT keyboard and mouse handlers provided User typically extends rather than replaces GLVU divided into Core and Modules GLVU: System Architecture

  17. Just like writing a GLUT program, except… Load models by instantiating objects Call Display() methods instead of rendering by hand Motion handlers already provided GLVU: Writing a Program

  18. Perspective Camera VRML, BFF, OBJ, TRI, WFF model formats Bounding boxes PPM images (for texture maps) Vector, Matrix math library Walk, Examine, Look, Translate movement modes GLVU Core

  19. IBR far-field representations Textured depth mesh, environment-mapped cubes, layered depth images, … Light Cameras (place lights by moving viewpoint) Large Model utilities (cells, memory management) See Bill Baxter (baxter@cs) for latest list and owners GLVU Modules

  20. New model formats Just write a loader and a display method Image-based rendering Most work goes into display method Almost anything can be cast as an Object Can always override default GLVU input handlers Trackers, button boxes, joysticks... Extending GLVU

  21. Many available; choose your favorite TCL/Tk http://dev.scriptics.com GLUI http://www.cs.unc.edu/~rademach/glui FLTK http://www.fltk.org User Interface Toolkits

  22. Introduction GLUT GLVU Where to learn more Questions and Answers Outline

  23. Read the example code! GLUT http://reality.sgi.com/mjk_asd/glut3/glut3.html GLVU Bill Baxter (baxter@cs) can tell you how to get the source Where to Learn More

  24. Introduction GLUT GLVU Where to learn more Questions and Answers Outline

More Related