Download: Примеры

Страницы: << 1 2 3 4 5 >>
Null An example of using null bitmaps to place the rasterpos at positions that may be clipped.
Points Lines This example illustrates the commands covered in the tutorial section Changing the State.
Polygons This program illustrates the use of the depth buffer and depth testing.
Primitives This example illustrates the different results of each of the primitive types applied to the same set of verticies. Notice that the order in which the verticies are declared is very important. Also notice that some primitives, when given an incorrect number of verticies, will ignore any extra verticies. For example, GL_TRIANGLES only draws the triangle corresponding to verticies 1, 2, and 3. Verticies 4 and 5 are ignored.
Qix An example of a 'qix'-like line demo, but without the traditional erase lines, and with anti-aliased lines. Screen-saver mode also available (#define SCREEN_SAVER_MODE when compiling).
Rainbow Demonstration of palette animation in color index mode. Press 'h' for a help menu, middle button spins.
Rotate An example of rotating a bitmap (w/o OpenGL's help). I wrote this for my little brother John.
Scene This program demonstrates the use of the GL lighting model. Objects are drawn using a grey material characteristic. A single light source illuminates the objects.
Select This is an illustration of the selection mode and name stack, which detects whether objects which collide with a viewing volume. First, four triangles and a rectangular box representing a viewing volume are drawn (drawScene routine). The green triangle and yellow triangles appear to lie within the viewing volume, but the red triangle appears to lie outside it. Then the selection mode is entered (selectObjects routine). Drawing to the screen ceases. To see if any collisions occur, the four triangles are called. In this example, the green triangle causes one hit with the name 1, and the yellow triangles cause one hit with the name 3.
Sgiflag This program displays a waving flag with an SGI logo trimmed out of it. The flag is a single nurbs surface (bicubic, bezier). It "waves" by making it control point oscillate on a sine wave. The logo is cut from the flag using a combination of piecewise-linear and bezier trim curves.
Страницы: << 1 2 3 4 5 >>