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

# ex3d(3alleg)

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**(3alleg)](/man/BITMAP/3alleg.md), [**COLOR\_MAP**(3alleg)](/man/COLOR_MAP/3alleg.md), [**END\_OF\_MAIN**(3alleg)](/man/END_OF_MAIN/3alleg.md), [**MATRIX**(3alleg)](/man/MATRIX/3alleg.md), [**PALETTE**(3alleg)](/man/PALETTE/3alleg.md), [**POLYTYPE\_ATEX**(3alleg)](/man/POLYTYPE_ATEX/3alleg.md), [**POLYTYPE\_ATEX\_LIT**(3alleg)](/man/POLYTYPE_ATEX_LIT/3alleg.md), [**POLYTYPE\_ATEX\_MASK**(3alleg)](/man/POLYTYPE_ATEX_MASK/3alleg.md), [**POLYTYPE\_ATEX\_MASK\_LIT**(3alleg)](/man/POLYTYPE_ATEX_MASK_LIT/3alleg.md), [**POLYTYPE\_ATEX\_MASK\_TRANS**(3alleg)](/man/POLYTYPE_ATEX_MASK_TRANS/3alleg.md), [**POLYTYPE\_ATEX\_TRANS**(3alleg)](/man/POLYTYPE_ATEX_TRANS/3alleg.md), [**POLYTYPE\_FLAT**(3alleg)](/man/POLYTYPE_FLAT/3alleg.md), [**POLYTYPE\_GCOL**(3alleg)](/man/POLYTYPE_GCOL/3alleg.md), [**POLYTYPE\_GRGB**(3alleg)](/man/POLYTYPE_GRGB/3alleg.md), [**POLYTYPE\_PTEX**(3alleg)](/man/POLYTYPE_PTEX/3alleg.md), [**POLYTYPE\_PTEX\_LIT**(3alleg)](/man/POLYTYPE_PTEX_LIT/3alleg.md), [**POLYTYPE\_PTEX\_MASK**(3alleg)](/man/POLYTYPE_PTEX_MASK/3alleg.md), [**POLYTYPE\_PTEX\_MASK\_LIT**(3alleg)](/man/POLYTYPE_PTEX_MASK_LIT/3alleg.md), [**POLYTYPE\_PTEX\_MASK\_TRANS**(3alleg)](/man/POLYTYPE_PTEX_MASK_TRANS/3alleg.md), [**POLYTYPE\_PTEX\_TRANS**(3alleg)](/man/POLYTYPE_PTEX_TRANS/3alleg.md), [**RGB**(3alleg)](/man/RGB/3alleg.md), [**RGB\_MAP**(3alleg)](/man/RGB_MAP/3alleg.md), [**SCREEN\_H**(3alleg)](/man/SCREEN_H/3alleg.md), [**SCREEN\_W**(3alleg)](/man/SCREEN_W/3alleg.md), [**V3D**(3alleg)](/man/V3D/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**(3alleg)](/man/apply_matrix/3alleg.md), [**bitmap\_color\_depth**(3alleg)](/man/bitmap_color_depth/3alleg.md), [**bitmap\_mask\_color**(3alleg)](/man/bitmap_mask_color/3alleg.md), [**blit**(3alleg)](/man/blit/3alleg.md), [**clear\_bitmap**(3alleg)](/man/clear_bitmap/3alleg.md), [**clear\_to\_color**(3alleg)](/man/clear_to_color/3alleg.md), [**color\_map**(3alleg)](/man/color_map/3alleg.md), [**create\_bitmap**(3alleg)](/man/create_bitmap/3alleg.md), [**create\_light\_table**(3alleg)](/man/create_light_table/3alleg.md), [**create\_rgb\_table**(3alleg)](/man/create_rgb_table/3alleg.md), [**create\_trans\_table**(3alleg)](/man/create_trans_table/3alleg.md), [**desktop\_palette**(3alleg)](/man/desktop_palette/3alleg.md), [**destroy\_bitmap**(3alleg)](/man/destroy_bitmap/3alleg.md), [**fixed**(3alleg)](/man/fixed/3alleg.md), [**fixtoi**(3alleg)](/man/fixtoi/3alleg.md), [**font**(3alleg)](/man/font/3alleg.md), [**get\_transformation\_matrix**(3alleg)](/man/get_transformation_matrix/3alleg.md), [**gfx\_mode\_select\_ex**(3alleg)](/man/gfx_mode_select_ex/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), [**itofix**(3alleg)](/man/itofix/3alleg.md), [**key**(3alleg)](/man/key/3alleg.md), [**keypressed**(3alleg)](/man/keypressed/3alleg.md), [**line**(3alleg)](/man/line/3alleg.md), [**palette\_color**(3alleg)](/man/palette_color/3alleg.md), [**persp\_project**(3alleg)](/man/persp_project/3alleg.md), [**polygon\_z\_normal**(3alleg)](/man/polygon_z_normal/3alleg.md), [**quad3d**(3alleg)](/man/quad3d/3alleg.md), [**readkey**(3alleg)](/man/readkey/3alleg.md), [**rect**(3alleg)](/man/rect/3alleg.md), [**retrace\_count**(3alleg)](/man/retrace_count/3alleg.md), [**rgb\_map**(3alleg)](/man/rgb_map/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\_projection\_viewport**(3alleg)](/man/set_projection_viewport/3alleg.md), [**set\_trans\_blender**(3alleg)](/man/set_trans_blender/3alleg.md), [**textout\_ex**(3alleg)](/man/textout_ex/3alleg.md), [**textprintf\_ex**(3alleg)](/man/textprintf_ex/3alleg.md), [**vsync**(3alleg)](/man/vsync/3alleg.md)
