Opengl
- OpenGL should support all platforms - in this regard, there is nothing close to C - thanks to this, almost all devices can use the same API
- OpenGL should support all languages - there is also nothing close to C in this regard - thanks to this, every language that supports C library calls (and almost all) can use OpenGL
- OpenGL is an API, not an engine - it is designed to provide a low-level interface for a graphic headset, but high enough to be an abstraction for different hardware - C is very much lower than C ++, OOP is not low.
- OpenGL is the basis for development, not a complete solution - there is no one and true way to write graphic code, and OpenGL should not force us to anything - being OOP, it will force us to "colution
- OpenGL is not tied to any particular programming paradigm, so we can port OpenGL to a functional, logical or OOP language - or use it procedurally
- OpenGL is efficiency - and you cannot get better performance than direct function calls. OOP is as effective as it is for a specific task.
In general - OpenGL is designed to allow us to have all the freedom and not make any choices for us. And by freedom, I mean freedom to choose a platform, language, programming paradigm, engine design, methodology and level of effectiveness versus readability.
And for that I praise OpenGL, and for that I hate Direct X.
Amen.
Sidenote:. Everyone is teaching Object Orientated programming because it is the easiest to understand. This is not the only true paradigm. There is functional programming, logical programming, contract programming, and even an object-oriented way of writing in C. There is no truth in computer science. Regarding design patterns, I could name a few that are used in the OpenGL architecture. Bad style? I saw beautiful C programs that had aaaallall global functions ...
source share