OpenGL is a C library, not a C ++.
The only reason why almost all programs use C ++ for OpenGL is the higher and simpler level that manages it through some shells, libraries, or frameworks. It is just more comfortable.
Here are a few examples that were distributed with OpenGL "Redbook" (version 2.0).
However, these examples use OpenGL in the old style (rendering via functions), which is deprecated, you should always use shaders and buffers. Although I think that for a start this may help.
Here at StackOverflow , we also discussed where to find new OpenGL examples.
source share