Learning OpenGL: (4) What's OpenGL

Source: Internet
Author: User
Tags deprecated

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 mechanic
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 has des these extensions.

 

 

4. Gone are the days when games wocould be recompiled for a specific graphics card.
1) Ask OpenGL how many extensions are supported by the current implementation.
Eg:
Glint nnumextensions; <br/> glgetintegerv (gl_num_extensions, & nnumextensions );

 

2) You can get the name of specific extension by calling glgetstringi. You coshould loop all extensions.
Eg:
Glint nnum; <br/> glgetintegerv (gl_num_extensions, & nnum); </P> <p> for (glint I = 0; I <nnum; ++ I) <br/> {<br/> If (strcmp ("wgl_ext_swap_control", (const char *) glgetstringi (gl_extensions, I) = 0) <br/>{< br/> wglswapintervalext = (pfnwglswapintervalextproc) wglgetprocaddress ("wglswapintervalext"); <br/> If (wglswapintervalext! = NULL) <br/> wglswapintervalext (1); <br/>}< br/>}

 

 

5. gltools. h
A shortcut toolkit function is wrongly ded 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 mechanic

9. deprecated functionality
No functionality was ever removed OpenGL. the OpenGL API has become somewhat antiquated.
Using vendors sought to reduce the size of the OpenGL API. So ARB decided that some of the legacy OpenGL API wocould be jettisoned from OpenGL 3.0....

 

 

10. OpenGL 3.0
If relegating OpenGL 2.1 drivers to legacy status, those drivers wocould quickly become a low priority for vendors. Software Developers wocould 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 cocould 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.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.