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