This online book will introduce the main concepts required to write a 3D game using the LWJGL 3 library.

LWJGL is a Java library that provides access to native APIs used in the development of graphics (OpenGL), audio (OpenAL) and parallel computing (OpenCL) applications. This library leverages the high performance of native OpenGL applications while using the Java language.

My initial goal was to learn the techniques involved in writing a 3D game using OpenGL. All the information required was there in the internet but it was not organized and sometimes it was very hard to find and even incomplete or misleading.

I started to collect some materials, develop some examples and decided to organize that information in the form of a book.

Table of contents.

You can also check my Vulkan book here.

Previous version

Previous version of the book can still be accessed in Github. Here are the links:

NOTE: The old version of the book was published, originally, using a different URL. That site is now part of what GitBook considers legacy content. Unfortunately, I cannot access that content any more nor even delete it (according to GitBook this is not possible). Therefore, if you are accessing the book through a GitBook URL which starts with: "" you are accessing and out of sync version (not even in sync with previous book legacy version which is still hosted in Github).

Source Code

The source code of the samples of this book is in GitHub.

The source code for the book itself is also published in GitHub.


The book is licensed under Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)

The source code for the book is licensed under Apache v2.0


Comments are welcome

Suggestions and corrections are more than welcome (and if you do like it please rate it with a star). Please send them using the discussion forum and make the corrections you consider in order to improve the book.


Antonio Hernández Bejarano

Special Thanks

To all the readers that have contributed with corrections, improvements and ideas.

Last updated