一起来学OpenGL-2.Getting started-1.OpenGL

OpenGL

英文:https://learnopengl.com/Getting-started/OpenGL
中文:https://learnopengl-cn.github.io/01%20Getting%20started/01%20OpenGL/

OpenGL一般被认为是 一个API,但OpenGL本身并不是API,OpenGL本身并不是一个API,它仅仅是一个由Khronos组织制定并维护的规范(Specification)。教程的规OpenGL版本是OpenGL3,.3。

Core-profile vs Immediate mode

Immediate mode:
  1. fixed function pipeline
  2. 绘制图形方便,容易理解
  3. 灵活性低,效率低
  4. 在3.2版本之前 ,3.2版本之后废弃这种渲染模式,
Core-profile:

When using OpenGL’s core-profile, OpenGL forces us to use modern practices. Whenever we try to use one of OpenGL’s deprecated functions, OpenGL raises an error and stops drawing. The advantage of learning the modern approach is that it is very flexible and efficient, but unfortunately is also more difficult to learn. The immediate mode abstracted quite a lot from the actual operations OpenGL performed and while it was easy to learn, it was hard to grasp how OpenGL actually operates. The modern approach requires the developer to truly understand OpenGL and graphics programming and while it is a bit difficult, it allows for much more flexibility, more efficiency and most importantly a much better understanding of graphics programming.

Extensions
State machine

OpenGL是一个大的状态机,一系列的变量描述OpenGL应该如何运行。OpenGL的状态通常被称为Context。

Objects

OpenGL库是用C语言写的,同时也支持多种语言的派生,但其内核仍是一个C库。由于C的一些语言结构不易被翻译到其它的高级语言,因此OpenGL开发的时候引入了一些抽象层。“对象(Object)”就是其中一个。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值