---
name: "ex3d"
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/ex3d/3alleg4"
---

# ex3d(3alleg4)

3d 'bouncy cubes' demo. Allegro game programming library.

## NAME

ex3d - 3d 'bouncy cubes' demo. Allegro game programming library.

## SYNOPSIS

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

**Example ex3d**

## DESCRIPTION

This program demonstrates how to use the 3d matrix functions. It isn't a very elegant or efficient piece of code, but it does show the stuff in action. It is left to the reader as an exercise to design a proper model structure and rendering pipeline: after all, the best way to do that sort of stuff varies hugely from one game to another.

The example first shows a screen resolution selection dialog. Then, a number of bouncing 3d cubes are animated. Pressing a key modifies the rendering of the cubes, which can be wireframe, the more complex transparent perspective correct texture mapped version, and many other.

## SEE ALSO

**BITMAP**(3alleg4), **COLOR\_MAP**(3alleg4), **END\_OF\_MAIN**(3alleg4), **MATRIX**(3alleg4), **PALETTE**(3alleg4), **POLYTYPE\_ATEX**(3alleg4), **POLYTYPE\_ATEX\_LIT**(3alleg4), **POLYTYPE\_ATEX\_MASK**(3alleg4), **POLYTYPE\_ATEX\_MASK\_LIT**(3alleg4), **POLYTYPE\_ATEX\_MASK\_TRANS**(3alleg4), **POLYTYPE\_ATEX\_TRANS**(3alleg4), **POLYTYPE\_FLAT**(3alleg4), **POLYTYPE\_GCOL**(3alleg4), **POLYTYPE\_GRGB**(3alleg4), **POLYTYPE\_PTEX**(3alleg4), **POLYTYPE\_PTEX\_LIT**(3alleg4), **POLYTYPE\_PTEX\_MASK**(3alleg4), **POLYTYPE\_PTEX\_MASK\_LIT**(3alleg4), **POLYTYPE\_PTEX\_MASK\_TRANS**(3alleg4), **POLYTYPE\_PTEX\_TRANS**(3alleg4), **RGB**(3alleg4), **RGB\_MAP**(3alleg4), **SCREEN\_H**(3alleg4), **SCREEN\_W**(3alleg4), **V3D**(3alleg4), **allegro\_error**(3alleg4), **allegro\_exit**(3alleg4), **allegro\_init**(3alleg4), **allegro\_message**(3alleg4), **apply\_matrix**(3alleg4), **bitmap\_color\_depth**(3alleg4), **bitmap\_mask\_color**(3alleg4), **blit**(3alleg4), **clear\_bitmap**(3alleg4), **clear\_to\_color**(3alleg4), **color\_map**(3alleg4), **create\_bitmap**(3alleg4), **create\_light\_table**(3alleg4), **create\_rgb\_table**(3alleg4), **create\_trans\_table**(3alleg4), **desktop\_palette**(3alleg4), **destroy\_bitmap**(3alleg4), **fixed**(3alleg4), **fixtoi**(3alleg4), **font**(3alleg4), **get\_transformation\_matrix**(3alleg4), **gfx\_mode\_select\_ex**(3alleg4), **install\_keyboard**(3alleg4), **install\_mouse**(3alleg4), **install\_timer**(3alleg4), **itofix**(3alleg4), **key**(3alleg4), **keypressed**(3alleg4), **line**(3alleg4), **palette\_color**(3alleg4), **persp\_project**(3alleg4), **polygon\_z\_normal**(3alleg4), **quad3d**(3alleg4), **readkey**(3alleg4), **rect**(3alleg4), **retrace\_count**(3alleg4), **rgb\_map**(3alleg4), **screen**(3alleg4), **set\_color\_depth**(3alleg4), **set\_gfx\_mode**(3alleg4), **set\_palette**(3alleg4), **set\_projection\_viewport**(3alleg4), **set\_trans\_blender**(3alleg4), **textout\_ex**(3alleg4), **textprintf\_ex**(3alleg4), **vsync**(3alleg4)
