This article explains some unexpected results and artefacts you can get when rendering stuff, and how to avoid them.
One thing that always should be tried (before trying anything else) is checking for errors with glGetError.
If you use OpenGL in a way that is not covered by the specification, there is no guarantee for any specific result. This can usually be avoided by checking for errors. Note that some implementations are less restrictive than the specification about what is accepted (notably NVIDIA implementations). Things might seem to work fine on some implementations, but they might not work on others.
There might be a bug in the OpenGL implementation. This is however rare. Often people think they have discovered a bug when they in fact haven't. Make sure you follow the specification if you are going to send a bug report to the vendor.
It is (very) unlikely that two OpenGL implementations would have the same bug. If you get the same (unwanted) result on different implementations, it is probably not a bug.
Nothing is rendered at all
This means your window is filled by a single colour (often black). This can have several causes, not limited to those listed:
- Your context isn't initialized correctly
- You call glClear() immediately before swapping buffers
- You don't swap buffers at all
Colours appear wrong
On Microsoft Windows, there is a setting for how many colours the monitor can display. Make sure this is set to display 32-bit colours.