Just noticed this thread, and although it's been technically "solved" I thought I'd share my preferred method for using Lazarus with OpenGL on Windows without having to care about specific OpenGL versions, which I think is about as simple as it gets:
1) Drop a TOpenGLControl on your form.
2) Do
not include any of the FPC OpenGL headers in your uses section (as in
no "gl" or "glext" or "glu" or otherwise)
3) Instead, download the latest revision of dglOpenGL.pas from their github repository and
do include that in your uses section.
4) Put the following two lines of code in FormShow (specifically FormShow, and
not FormCreate):
InitOpenGL;
ReadExtensions;
5) That's it. Those two lines will initialize the pointers for each and every single OpenGL function that your GPU supports, from version 1.0 all the way up to version 4.5. You can now use TOpenGLControl as you normally would, and call whichever functions you want from whatever versions of OpenGL you want, in any combination. (Of course, you should generally avoid using deprecated 1.0-era functionality, and REALLY avoid mixing it with non-deprecated functionality if you use it at all, but the point is that it's up to you to decide whether you're going to use modern OpenGL or not.)
To be clear: OpenGL is just a giant collection of functions and procedures contained in one or more dynamic libraries. There is nothing in the API itself that actually checks or cares about what version any given method was introduced in. All that matters is that you have a valid context created and a valid pointer initialized in the relevant library to each method that you intend on using. When someone refers to a "versioned" context, it just means that they intentionally
didn't load any functionality that was marked deprecated in the official specification for that version of the API.
Hopefully someone out there finds all that helpful!
Edit: I should also note that dglOpenGL is cross-platform and includes the full suite of Linux and Mac-specific OpenGL API features, so this way of initialization should technically work on those platforms as well. (I believe the recent versions of Mac OSX might have some kind of operating-system-level version restrictions in place though, but don't quote me on that.)