You better get dglOpenGl.pas from http://wiki.delphigl.com/index.php/dglOpenGL.pas/en
Or use nxPascal which does lot's of things for you. I don't see any point on reinventing the wheel.
If you want to learn that way then that's another story.