why does the program doesn't show anything on OS X

when i try the first example on OpenGL programming guide(8th edition),the window shows up with a black background but without two triangle,when i try the second example on OpenGL SuperBible 6th Edition,the window show up but doesn’t display anything,i can’t figure out why.


to check for glErrors is always a good pratice to find the lines that cause your trouble !
but you may try to change the clear color ans see if it has affect …
this is at least a hint that the opebgl context is fine …