I have tried setting the clear color to fully opaque using glClearColor(), however unfortunately that had no effect on the problem. Thanks for the suggestion though Here's my understanding of the problem so far
(and keep in mind I'm new to OpenGL):
The screen alpha channel is set to opaque when the fully opaque background is drawn (the first layer of textured quads that are drawn). When a translucent pixel is drawn over that (the problem doesn't occur with fully transparent pixels, only the translucent ones) it causes the alpha channel to fall from being fully opaque to being translucent. Then the window manager (I'm running with Gnome 3) sees these translucent pixels on the resulting screen image and respects them, causing the window to be transparent and show the windows behind it.
I think the reason the opaque background is turning translucent has to do with how the alpha blending is occurring. I am using the settings GL_SRC_APLHA for source and GL_ONE_MINUS_SRC_ALPHA for destination.
Referring to the OpenGL documentation at https://www.opengl.org/sdk/docs/man/html/glBlendFunc.xhtml
, this means that the resulting pixel value after blending a translucent graphic onto an opaque one has for its alpha value (using floats between 0 and 1):
(1 - sourceAlpha) * destAlpha + sourceAlpha * sourceAlpha
Which by the math means that blending a translucent graphic onto an opaque graphic will never produce an opaque result. Either I am misunderstanding the math behind this blend mode and the problem is elsewhere, or this is indeed how this blending mode works, in which case the question is a matter of which blend mode I should be using instead to avoid this problem.
Hopefully this more detailed information can spark some ideas of what's going wrong or what I'm misunderstanding about the OpenGL system. Once again, any help is appreciated.