How Can I get source code of OpenGL?

I am trying to write operation system. I want to draw something on the screen. So I need opengl source code. Can I get it?

OpenGL is a specification, not an implementation.

The primary open-source implementation is Mesa, whose master source code repository can be found here.

What GClements said. OpenGL is an API defined by a specification. Not an implementation.

On most OSs, OpenGL API support is implemented in your GPU’s graphics driver and provided to you as a library that you link with. Besides that, all you really need is the OpenGL headers. These may be provided by the GPU vendor’s graphics driver, but if not they can be found here:

However, since you’re implementing your own OS, you’re going to have to figure out how you’re going to implement or obtain an OpenGL implementation for the GPU(s) you want/need to support. Mesa3D is probably a good place to start. It’ll at least help you flesh out your requirements.

In addition to the above, the “Open” in “OpenGL” has absolutely nothing to do with the open-source movement; and the term “open-source” didn’t even exist when OpenGL was first specified. It refers to it’s status as an open standard.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.