There is no multiplatform solution like that. In Lazarus for Windows you can use Form1.Handle as the context, and pass it to the Windows OpenGL functions like wglCreateContext and wglMakeCurrent. In Lazarus for Linux you can't use that technique. You might try to use the XWindows OpenGL functions, but connecting them with a Lazarus form is undocumented or currently impossible. For example, how to get a PDisplay and a GLXDrawable from a Lazarus form or panel in Linux? No one here knows or is willing to say.
OpenGL is one area which is currently sorely lacking in Lazarus. We would like a simple, multiplatform OpenGL component. Something that we can stick on a window or a panel and start drawing opengl commands to it. Lots of hobbyists use Lazarus because Delphi is too expensive and Kylix is crap. Hobbyists love OpenGL. It seems logical to include a multiplatform, OpenGL component.
Note: Yes, I know it's easy to use SDL or GLUT to create OpenGL projects in Lazarus. But that's not using the power of Lazarus ... I can do the same in FPC. And SDL and GLUT are generally full-screen or full-window projects. What if I want to draw some OpenGL on part of a window, like on a panel, and have controls surrounding this panel which manipulate the 3D scene? Can't do it in Lazarus for Linux.