Pardon how hideous it is, lacking any form of error checking and all. I'm just trying to figure out how Allegro and OpenGL work together. I'm sure a few of those calls aren't even necessary, but I've been trying everything to get something other than a blank, black screen.

However, now my program aborts with "cube: failed to create display". It seems that Allegro can't set the z-depth. I don't think it's anything wrong with my hardware/drivers, though, since GlxGears runs perfectly and I'm pretty sure that it uses a z-buffer, too.

I'm pretty sure z buffer sizes are limited to 16, 24 or 32 bits, since it's bits per element, it might have been better if they'd specified how many bytes per element, not bits.

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

Played around with it a bit more. The display creates now, but all I see is grey (I set the clear color just to make sure that the OpenGL calls were working).

This code is essentially a GLUT equivalent that I'm basing this off of, and it works perfectly. It seems to be a problem with Allegro, or at least a difference in what can be assumed from each library:

I did it! All I had to do was add "glMatrixMode (GL_PROJECTION)", which apparently GLUT automatically does and Allegro does not. It's kind of an odd difference, but I have a cube and that's satisfying!!

Just wondering, might it be useful to include something like this in Allegro? I can clean this example up a bit...the resulting cube is pretty cool. It also takes advantage of ALLEGRO_TIMER, which is nice.

I think that under the Allegro.cc terms you guys now own that code or something. I don't exactly know how that provision works, I still own the Copyright, don't I? Anyway, for the wonders of legal clarity, I hereby give the Allegro developers permission to redistribute that code under any license they want, with or without modification. I PROVIDE NOT WARRANTY AT ALL.

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”