rendering context is created using the command:wglCreateContextAttribsARB(HDC hdc,
HGLRC hShareContext, const
an array of rendering context attribute pairs.
With this, one can select the version of OpenGL. Note however, OpenGL may create any context
that is backwards compatible with the version requested.
requesting a specific version often creates a context with the latest version
- however, this behaviour depends on the vendor.
below creates an core context and makes it current.
attribute WGL_CONTEXT_PROFILE_MASK_ARB is followed by a flag containing either
- WGL_CONTEXT_CORE_PROFILE_BIT_ARB: Creates a core context with
no deprecated functionality available.
It is generally good programming practice to set this flag and essential
for the work we will do in this module.
- WGL_CONTEXT_COMPATIBLITY_PROFILE_BIT_ARB: Creates a compatibility context that
is backwards compatible with all older versions of OpenGL. All deprecrated functions available. This context may run slower due to additional
state and functionality that needs to be tracked.