OpenGL 中的一些概念对比
OpenGL (可能也有其它与 OpenGL 有关的)中的有些概念很相似,有些标准里也没有给出一个明确的定义,有些如果仅从字面意思理解很容易混淆,这里将平时自己查询的资料及自己的理解整理到一起,以备不时之需。
Clip vs Cull
- Clip 是一个做加减法 的过程,就是它会将处在 clip-space 边界的图元分成多个图元,新生成的在 clip-space 之外的图元就丢弃掉了
- Cull 是一个做纯减法 的过程,它不会生成任何新的图元,只会丢弃图元
glFrustum
vs glm::perspective
1 | glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); |
这两组参数之间可以转换,首先 zNear
, zFar
是一样的,不需要转换,剩下就是 left, right, bottom, top
和 fovy, aspect
的关系了。首先 left, right
和 bottom, top
分别是以原点对称的
Tessellation vs Bézier
Feature | Tessellation (OpenGL) | Bézier Curves/Surfaces |
---|---|---|
Definition | A technique that subdivides geometry into smaller pieces. | A mathematical way to define smooth curves/surfaces. |
Input | Low-poly mesh, patches | Control points defining the shape |
Output | Subdivided triangles | Interpolated curve/surface points |
Hardware Acceleration | Uses GPU tessellation shaders | Requires CPU or GPU evaluation |
Level of Detail | Dynamically adjustable | Fixed resolution unless re-evaluated |
Use Case | Real-time rendering, adaptive detail | CAD, animation, precision modeling |