endercontext, that allows for setting the desired OpenGL version and (if applicable) wether to create a forward compatible context (see OpenGL man pages on what that means) :
    <pre id="code">
procedure MyGLInit;
begin
  InitOpenGL; // Don't forget, or first gl-Call will result in an access violation!
  MyDC := GetDC(...);
  MyRC := CreateRenderingContext(...);
  RC := CreateRenderingContextVersion(DC, [opDoubleBuffered], 4, 2, True, 32, 24, 8, 0, 0, 0); // Creates an OpenGL 4.2 forward-compatible 