Our great sponsors
-
LearnOpenGL
Code repository of all OpenGL chapters from the book and its accompanying website https://learnopengl.com
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I have done the tutorials on Learn OpenGL (https://learnopengl.com) through the lighting section and I feel that the program is getting long. I have done some digging and people say the it is a bad idea to try and abstract OpenGL into classes. So, I want information on how I should format my code so that it is easy to use and build on. Encase this is useful, I want in the future to be able to make simple 2D and 3D games as well as be able to use OpenGL for other random projects of mine. Information would be helpful. Sorry if someone has asked this question before, I don't know how to search subreddits.
I can recommend https://github.com/glium/glium as a good, safe abstraction. There was a time when I wanted to learn shaders and write complex pipelines with several stages, this library allowed me to learn about the important objects and their responsibilities without having to program the very verbose chunks of code to initialize. I learned the following: