OpenGL
OpenGL
Rif1. Definition
一个图形相关项目,需要调用到手机/电脑中的显卡时。我们需要在应用层面对GPU行为作出调用,基本就是一个显卡的API。
其本身只是一个规范,其本身并不是一个库,它只是规定了哪些函数应该拥有,以及我们该用什么参数去调用它。
Who to achieve this specifit/OpenGL ?
你的GPU生成厂商会负责实现,也就是GPU驱动。而这些驱动很大概率上,是不会开源的。
2. Features
- 跨平台
- 原生的API(Direct 3D X11;Matal)对自家的GPU支持肯定更好,但是OpenGL的广泛性肯定更好
[!Note] Shader-着色器
Some scripts that transform code from CPU into GPU , in order to make it perform better
3. How to know the version of the OpenGL in you machine
1 | std::cout << glGetString(GL_VERSION) << std::endl; |
This line will print out the version of the OpenGL that your driver uses.
In my thinkbook,it is
