Learning OpenGL : (4) What's OpenGL

1. What is OpenGL
OpenGL is strictly defined as a software interface to graphics hardware.

 

 

2. Two Forms
OpenGl exists in two forms.
A software driver and a graphics card in your PC together make up an OpenGL implementation.

 

 

3. Extension Mechanism
Two ways:
1) Vendors can add new functions to the OpenGL API that developers can use.
2) New tokens or enumerants can be added that will be recognized by existing OpenGL functions.
Vendors supply header files for developers. And vendors must register their extensions with the OpenGL Working Group, thus keeping one vendor from using a value used by someone else. There is a standard header file glext.h that includes these extensions.

 

 

4. Gone are the days when games would be recompiled for a specific graphics card.
1) Ask OpenGL how many extensions are supported by the current implementation.
Eg:

 

2) You can get the name of specific extension by calling glGetStringi. You could loop all extensions.
Eg:

 

 

5. gltools.h
A shortcut toolkit function is included in the GLTools library.
Eg:
int gltIsExtSupported(const char * extension);

 

 

6. Whose Extension
Prefix  Vendor
SGI_  Silicon Graphics
ATI_  ATI
AMD_  AMD
NV_   NVIDIA
IBM_  IBM
WGL_  Microsoft
EXT_  Cross-Vendor (widely supported)
ARB_  ARB (will be core OpenGL specification)

 

 

7. Licensing & Conformance
1) Vendor liscense OpenGL from The Khronos Group.
2) Vendor create its implementation.
3) Vendor's implementation must pass the OpenGL conformance test.
4) Software developers don't need to license OpenGL.

 

 

8. Advantage - Extension Mechanism

9. Deprecated functionality
No functionality was ever removed OpenGL. The OpenGL API has become somewhat antiquated.
Many vendors sought to reduce the size of the OpenGL API.So ARB decided that some of legacy OpenGL API would be jettisoned from OpenGL 3.0. but ...

 

 

10. OpenGL 3.0
If relegating OpenGL 2.1 drivers to legacy status, those drivers would quickly become a low priority for vendors. Software developers would be forced to abandon millions of dollars worth fo investment in OpenGL.
So, in OpenGL 3.0, no functionality was removed. It served as notices to software vendors.

 

 

11. OpenGL 3.1
All deprecated functionality was remove from the core OpenGL specification.
A new OpenGL extension GL_ARB_compatibility was introduced.
A hardware vendor could produce an OpenGL 3.1 driver and at least optionally not include any deprecated functionality.
But NVIDIA publicly stated that it will never remove any old functionality. So...

 

 

12. OpenGL 3.2
OpenGL3.2 divided OpenGL into a core profile and a compatibility profile.
Core profile implementations contain none of the older deprcated functionality.
The compatibility profile is also very useful, and likely to be around for a long time.

 

 

13. Nothing But the Core
You must write a shader to do anything.

 

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值