---
name: "exzbuf"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://carta.tech/man/exzbuf"
---

# exzbuf(3alleg)

Z-buffered polygons demo. Allegro game programming library.

## NAME

exzbuf - Z-buffered polygons demo. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**Example exzbuf**

## DESCRIPTION

This program demonstrates how to use Z-buffered polygons and floating point 3D math routines. It also provides a simple way to compute fps (frames per second) using a timer. After selecting a screen resolution through the standard GUI dialog, the example shows two 3D cubes rotating and intersecting each other. Rather than having full polygons incorrectly overlap other polygons due to per-polygon sorting, each pixel is drawn at the correct depth.

## SEE ALSO

[**BITMAP**(3alleg)](/man/BITMAP/3alleg.md), [**END\_OF\_FUNCTION**(3alleg)](/man/END_OF_FUNCTION/3alleg.md), [**END\_OF\_MAIN**(3alleg)](/man/END_OF_MAIN/3alleg.md), [**LOCK\_FUNCTION**(3alleg)](/man/LOCK_FUNCTION/3alleg.md), [**LOCK\_VARIABLE**(3alleg)](/man/LOCK_VARIABLE/3alleg.md), [**MATRIX\_f**(3alleg)](/man/MATRIX_f/3alleg.md), [**PALETTE**(3alleg)](/man/PALETTE/3alleg.md), [**POLYTYPE\_GCOL**(3alleg)](/man/POLYTYPE_GCOL/3alleg.md), [**SCREEN\_H**(3alleg)](/man/SCREEN_H/3alleg.md), [**SCREEN\_W**(3alleg)](/man/SCREEN_W/3alleg.md), [**V3D\_f**(3alleg)](/man/V3D_f/3alleg.md), [**ZBUFFER**(3alleg)](/man/ZBUFFER/3alleg.md), [**allegro\_error**(3alleg)](/man/allegro_error/3alleg.md), [**allegro\_exit**(3alleg)](/man/allegro_exit/3alleg.md), [**allegro\_init**(3alleg)](/man/allegro_init/3alleg.md), [**allegro\_message**(3alleg)](/man/allegro_message/3alleg.md), [**apply\_matrix\_f**(3alleg)](/man/apply_matrix_f/3alleg.md), [**bitmap\_color\_depth**(3alleg)](/man/bitmap_color_depth/3alleg.md), [**blit**(3alleg)](/man/blit/3alleg.md), [**clear\_bitmap**(3alleg)](/man/clear_bitmap/3alleg.md), [**clear\_zbuffer**(3alleg)](/man/clear_zbuffer/3alleg.md), [**create\_bitmap**(3alleg)](/man/create_bitmap/3alleg.md), [**create\_zbuffer**(3alleg)](/man/create_zbuffer/3alleg.md), [**desktop\_palette**(3alleg)](/man/desktop_palette/3alleg.md), [**destroy\_bitmap**(3alleg)](/man/destroy_bitmap/3alleg.md), [**destroy\_zbuffer**(3alleg)](/man/destroy_zbuffer/3alleg.md), [**font**(3alleg)](/man/font/3alleg.md), [**get\_transformation\_matrix\_f**(3alleg)](/man/get_transformation_matrix_f/3alleg.md), [**gfx\_mode\_select\_ex**(3alleg)](/man/gfx_mode_select_ex/3alleg.md), [**install\_int**(3alleg)](/man/install_int/3alleg.md), [**install\_keyboard**(3alleg)](/man/install_keyboard/3alleg.md), [**install\_mouse**(3alleg)](/man/install_mouse/3alleg.md), [**install\_timer**(3alleg)](/man/install_timer/3alleg.md), [**keypressed**(3alleg)](/man/keypressed/3alleg.md), [**palette\_color**(3alleg)](/man/palette_color/3alleg.md), [**persp\_project\_f**(3alleg)](/man/persp_project_f/3alleg.md), [**polygon\_z\_normal\_f**(3alleg)](/man/polygon_z_normal_f/3alleg.md), [**quad3d\_f**(3alleg)](/man/quad3d_f/3alleg.md), [**readkey**(3alleg)](/man/readkey/3alleg.md), [**screen**(3alleg)](/man/screen/3alleg.md), [**set\_color\_depth**(3alleg)](/man/set_color_depth/3alleg.md), [**set\_gfx\_mode**(3alleg)](/man/set_gfx_mode/3alleg.md), [**set\_palette**(3alleg)](/man/set_palette/3alleg.md), [**set\_palette\_range**(3alleg)](/man/set_palette_range/3alleg.md), [**set\_projection\_viewport**(3alleg)](/man/set_projection_viewport/3alleg.md), [**set\_zbuffer**(3alleg)](/man/set_zbuffer/3alleg.md), [**textprintf\_ex**(3alleg)](/man/textprintf_ex/3alleg.md), [**vsync**(3alleg)](/man/vsync/3alleg.md)
