It looks like you have lighting enabled on the second one,
try with a glShadeModel( GL_FLAT ) before drawing,
It looks like you have lighting enabled on the second one,
try with a glShadeModel( GL_FLAT ) before drawing,
You could try disabling all lighting before drawing the cube:
glDisable(GL_LIGHTING);
This has me stomped. What it looks like is that some vertices have some alpha values that are non-opaque. However the code you posted has all 1. for alpha. So... in order to debug more, did you try to change your clear color to something non-black ? Say green ? From the code, I doubt lighting is turned on, since no normals were specified.
Last comment, offtopic... You should really not use glBegin
/glEnd
(2 function calls per vertex + 2 per primitive is really not a good usage of the recent developments in OpenGL). Try glDrawElements
with QUAD_LIST
, or even better, TRIANGLE_LIST
. You already have the data nicely laid out for that.