This book is aimed at beginners who are discovering OpenGL!

It will assume knowledge of basic C and C++. (If you're rusty on these subjects, consider reading a C++ book first.) If you know nothing about 3D graphics, we'll try to familiarize you along the way. In addition, certain parts of the book will require mathematics. We'll provide basic explanations as much as possible, as well as point you to the appropriate Wikipedia subject pages.

OpenGL 2 is a bit hard at the beginning, because of all the new shaders and buffer object concepts, so we took every possibly measure to start *very* basic, but functional, and add features progressively. Often, we wrote the tutorials as we learned OpenGL, so we believe we saw by ourselves where beginners needed explanations first. As a consequence, there may be better ways than what we documented, in which case feel free to contribute.

We start straight with shaders, and replace all legacy 1.x functions with 2.x replacements (we also have a section on upgrade tips). We stick to OpenGL 2.1 core profile / OpenGL ES 2, which is now widely available in mobile, desktop and web (WebGL) platforms. We also have a section on non-gaming topics such as Scientific visualization.

Since the tutorials are pretty new, this wikibook's contributors keep improving them - if you feel some areas are still obscure, feel free to let a comment, or even contribute your own explanations :)

This wikibook is released under the Creative Commons CC-BY-SA and the GNU Free Documentation License, and the code samples are placed in the public domain, and available from the code repository: https://gitorious.org/wikibooks-opengl

< OpenGL Programming

Browse & download complete code