source: GTP/trunk/App/Demos/Vis/Teapots/Readme.txt @ 643

Revision 643, 4.0 KB checked in by mattausch, 19 years ago (diff)

made demo running

RevLine 
[10]1HARDWARE OCCLUSION QUERIES MADE USEFUL
2======================================
3
4This programn is a demonstration of the Coherent Hierarchical Culling algorithm
5described in the chapter "Hardware Occlusion Queries Made Useful" of the book GPU
6Gems II. Additional information and sample images are available at
7
8http://www.cg.tuwien.ac.at/research/vr/chcull/
9
10Updates to this demo can can be found on the same webpage.
11
12Copyright and Disclaimer:
13
14This code is copyright Vienna University of Technology, 2004.
15
16
17Please feel FREE to COPY and USE the code to include it in your own work,
18provided you include this copyright notice.
19This program is distributed in the hope that it will be useful,
20but WITHOUT ANY WARRANTY; without even the implied warranty of
21MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22
23Author of this demo:
24
25Oliver Mattausch (matt@cg.tuwien.ac.at)
26
27Authors of the book chapter:
28
29Michael Wimmer (wimmer@cg.tuwien.ac.at)
30Jiri Bittner (bittner@cg.tuwien.ac.at)
31
32Date: December 18, 2004
33
34----------
35Input
36----------
37
38Help for keybord and mouse is available with F1.
39
40You can switch between the different occlusion modes described in the book chapter using the
41SPACE key (view-frustum culling, hierarchical stop and wait, coherent hierarchical culling).
42
43A visualization of the culling algorithm from can be shown by pressing '1' on the keyboard. Note that the
44classification of nodes usually changes in consecutive frames, so that the hierarchy seems to oscillate.
45This is expected, since the classification of previously visible interior nodes is based on the classification
46of their children, which might be more accurate (leading to the interior node to become occluded) than the
47query for the node itself.
48
49----------
50The scene
51----------
52
53The scene used in this program consists of basic objects randomly placed in a box. The extent of the box and the
54number and size of objects can be changed (see F1).
55
56The hierarchical structure is a kd-tree with objects intersecting a split plane placed into multiple leaf nodes.
57
58By playing with the parameters and moving around, the user can explore situtations where occlusion culling is extremly
59useful, and where it is not (because the objects are too sparse or there is too much to see from this viewpoint).
60
61The hierarchical coherent culling algorithm is compared to simple view-frustum culling and the hierarchical stop and wait
62algorithm (which also uses hardware occlusion queries, but in a less sophisticated way).
63
64----------
65Installation
66----------
67
68A binary for Win32 is included.
69
70The program should compile under Windows and Linux, a CMAKE makefile for multi-platform
71compilation is included (see www.cmake.org for details).
72
73For Linux, you need to have a working GLUT and GLEW installation.
74
75----------
76Structure
77----------
78
79This demo is written in C++ and partly C and uses OpenGL.
80It has few external needs like limits.h, stdlib.h, math.h, string.h, stdio.h, or time.h.
81We also make heavy use of stl classes, like priority_queue.
82
83The program expects the GL_ARB_occlusion_query extension.
84
85The program and especially the mathematical routines are not designed for speed or
86efficiency, but for simplicity and clarity.
87
88RenderTraverser.cpp: implements the core algorithm described in the paper
89
90occquery.cpp: contains the OpenGl setup code, glut stuff, and sets up of the scene hierarchy
91HierarchyNode.cpp: contains a kd-tree hierarchy implementation, which can be traversed by the culling algorithm
92Geometry.cpp: represents simple drawable geometry, so that we have something to cull for the algorithm
93
94Timers.cpp: contains exact timer functions in order to accurately measure the frame render time
95stdafx.cpp: source file that includes just the standard includes
96glInterface.h: includes gl, glut and glew headers
97DataTypes.c: defines basic geometric datatypes
98MathStuff.c: declares some handy mathematical routines
99teapot.h: contains the teapot geometry
100
101If you find any problem with the code or have any comments, we would like to hear from you!
Note: See TracBrowser for help on using the repository browser.