-
Notifications
You must be signed in to change notification settings - Fork 107
GL \ Version and extensions query
Luca Piccioni edited this page Mar 9, 2017
·
3 revisions
Normally, OpenGL applications requires specific minimum OpenGL versions and uses quite a few extensions to achieve better design and performances. However, to get this information, the application is required to create a (temporary) OpenGL context in order to execute the necessary query methods for retrieving the information.
OpenGL.Net retrieves all information automatically, letting the user to execute all methods without worrying about function pointers and context initialization.
If the application shall scale to a certain range of devices, the application shall consider various information to run correctly. Usually, this information comprises:
- OpenGL API version: Gl.CurrentVersion
- OpenGL Shading Language version: Gl.CurrentShadingVersion
- OpenGL hardware and software limits: Gl.CurrentVersion, which fields are defined in Gl.Limits.cs (this source is manually maintained)
- OpenGL driver available extensions: Gl.CurrentExtensions, which fields are defined in Gl.Extensions.cs (this source is automatically aligned to the underlying specification) and in Gl.Extensions.Core.cs (this source is manually maintained; mainly used for treat OpenGL forward compatibility profile features as extensions)
- Hosting platform API version and available extensions.
- Windows platform extensions: Wgl.CurrentExtensions, which fields are defined in Wgl.Extensions.cs
- OpenGL for X extensions: Glx.CurrentExtensions, which fields are defined in Glx.Extensions.cs
- Native (EGL) platform: Egl.CurrentExtensions, which fields are defined in Egl.Extensions.cs