scene init works wrong

glClear(0.2, 0.2, 0.2) and glEnable(GL_DEPTH_TEST) works wrong.
Problem is when I try to init the scene with glClear(0.2, 0.2, 0.2) one time it works right, i.e I see gray backcolor, another time backcolor is black and the objects shown are transparent. Its not right. Any suggestions?

glClear() is not used that way. To set the clear color, use glClearColor(red, green, blue, alpha) and to actually clear the screen, use glClear(GL_COLOR_BUFFER_BIT) or if you have depth testing enabled, glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT).

Thanks a lot. I think I have find out the problem. I set enabled blending mode, so I saw transparent objects and black screen. When blending is disabled all work right.

Unfortunately the problem returned. I think it is related with blending, but I don’t know how. In my code no blending is used.

Could you post your code, or put it on http://codepad.org/ if it’s too long? Then I might be able to see what the problem is.