The view matrix and the projection matrix are separate, but they are used in combination in the renderer. The view matrix is your camera matrix, that defines your view point and orientation on the world. The projection matrix defines the way the view is rendered, either through perspective projection, or through orthographic projection.
Here is a simple tutorial to display a texture on the screen using view and projection matrices in OpenGL.
Get allegro ready to draw to the backbuffer :
Setup a camera on the world at (0,0,1500) looking at (0,0,0) with the up vector (0,1,0) :
gluLookAt(0,0,1500 , 0,0,0 , 0,1,0);
Now setup our perspective. We can use glFrustum, gluPerspective, or glOrtho to setup a perspective or orthographic projection respectively.
Setup a perspective projection with a field of view equivalent to half our screen size at a distance of 500 along the negative z-axis. The left and right and top and bottom parameters of glFrustum define the size of the near clipping plane (the top of the frustum). We are setting up our perspective so that the screen will be full size at a distance of 1000 from the camera which is at 500.
Drawing 3D textures is mostly the same as drawing 3D vertices. The only difference is that you attach a texture coordinate to a vertex by using glBindTexture and glTexCoord after creating a bitmap and getting its opengl texture id from allegro.
Load a texture.
Draw a simple texture to fill our virtual screen.
glFrontFace(GL_CW);// Define winding order as clockwise
glBindTexture(GL_TEXTURE_2D , texture_id);
glTexCoord2f(1.0 , 0.0);glVertex3f(SCREEN_W/2 , SCREEN_H/2 , 500);// upper right vertex
glTexCoord2f(1.0 , 1.0);glVertex3f(SCREEN_W/2 , -SCREEN_H/2 , 500);// lower right vertex
glTexCoord2f(0.0 , 1.0);glVertex3f(-SCREEN_W/2 , -SCREEN_H/2 , 500);// lower left vertex
glTexCoord2f(0.0 , 0.0);glVertex3f(-SCREEN_W/2 , SCREEN_H/2 , 500);// upper left vertex
And tell allegro to display everything :
This is untested, but it should work, or at least give you an idea what you need to do to render a 3D texture.
You can also use allegro's primitives to render textures as well, but you still need to setup your view and projection matrices.
You can also use allegro's transforms to build a camera transform or a perspective transform and then use them as well.