Disappearing sides

Recently finished making a cube rotate using functions I wrote myself to calculate MVP matrices and such.

The cube appears and rotates, but seems to be partially transparent despite me telling it not to be, and sides disappear as they come to the front.

I expect it to look like this.

Code: http://pastebin.com/AuDVuUy5 (in a paste bin for brevity)
Shader files: http://pastebin.com/WFKdQY2x

Really sorry for the enormous code dump, but I’ve absolutely no idea whereabouts this error is coming from :frowning: .
I can clarify on any of the allegro calls that aren’t obvious.

Not having looked at your code, but could it be that you hit the near cut-off of the frustum?

Don’t think so, firstly it’s sides disappearing, not chunks of cube, secondly I’ve tried pushing the cube a long way back in the frustrum and the problem persists.
Thanks anyway :slight_smile:

Problem solved, complete brain failure, nothing to do with OpenGL. Had failed to tell Allegro that I wanted an OpenGL context with a depth buffer.
Thanks for the help anyway.