---
name: "exzbuf"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/exzbuf/3alleg4"
---

# exzbuf(3alleg4)

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**(3alleg4), **END\_OF\_FUNCTION**(3alleg4), **END\_OF\_MAIN**(3alleg4), **LOCK\_FUNCTION**(3alleg4), **LOCK\_VARIABLE**(3alleg4), **MATRIX\_f**(3alleg4), **PALETTE**(3alleg4), **POLYTYPE\_GCOL**(3alleg4), **SCREEN\_H**(3alleg4), **SCREEN\_W**(3alleg4), **V3D\_f**(3alleg4), **ZBUFFER**(3alleg4), **allegro\_error**(3alleg4), **allegro\_exit**(3alleg4), **allegro\_init**(3alleg4), **allegro\_message**(3alleg4), **apply\_matrix\_f**(3alleg4), **bitmap\_color\_depth**(3alleg4), **blit**(3alleg4), **clear\_bitmap**(3alleg4), **clear\_zbuffer**(3alleg4), **create\_bitmap**(3alleg4), **create\_zbuffer**(3alleg4), **desktop\_palette**(3alleg4), **destroy\_bitmap**(3alleg4), **destroy\_zbuffer**(3alleg4), **font**(3alleg4), **get\_transformation\_matrix\_f**(3alleg4), **gfx\_mode\_select\_ex**(3alleg4), **install\_int**(3alleg4), **install\_keyboard**(3alleg4), **install\_mouse**(3alleg4), **install\_timer**(3alleg4), **keypressed**(3alleg4), **palette\_color**(3alleg4), **persp\_project\_f**(3alleg4), **polygon\_z\_normal\_f**(3alleg4), **quad3d\_f**(3alleg4), **readkey**(3alleg4), **screen**(3alleg4), **set\_color\_depth**(3alleg4), **set\_gfx\_mode**(3alleg4), **set\_palette**(3alleg4), **set\_palette\_range**(3alleg4), **set\_projection\_viewport**(3alleg4), **set\_zbuffer**(3alleg4), **textprintf\_ex**(3alleg4), **vsync**(3alleg4)
