Using only C (not C ++) for OpenGL?

I want to know if it is possible to use OpenGL in C without even scratching C ++, tutorials or basic source codes are welcome!

And if possible, how deep would my C skills have been to understand and use it? Currently, I am still mainly involved, and I like to do this by biting off more than I can chew.

+6
source share
1 answer

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.

+12
source

Source: https://habr.com/ru/post/958218/


All Articles