---
title: "OpenGL"
description: "Learn OpenGL for Android game development using LWJGL.  This guide covers transitioning from C/C++ OpenGL knowledge to Java, focusing on LWJGL as a leaner, efficient binding for OpenGL ES 2.0 on Android,  perfect for porting examples from OpenGL SuperBible.  Start building high-performance 2D and 3D games today!\n"
slug: "OpenGL"
created: 2011-09-25T10:02:00Z
updated: 2011-09-25T10:02:00Z
tags:
  - "opengl"
  - "java"
ai_assisted: false
---

![OpenGL](https://www.opengl.org/archives/resources/features/KilgardTechniques/LensFlare/glflare1.gif "The OpenGL logo")

Since I started coding games for Android, I wanted to learn OpenGL. Besides enabling the development
of 3D games, OpenGL is supposed to give the app a performance boost on 2D games.

Android has OpenGL ES bindings for OpenGL ES 1.0 and OpenGL ES 2.0 (if you are on Android 2.2+).
Since I didn't know much about OpenGL coding, I searched for good books on the subject.

I found [OpenGL SuperBible][1], which covers OpenGL 3.3 Core Profile and a bit about OpenGL ES 2.0
and [OpenGL ES 2.0 Programming][2] Guide which covers OpenGL ES 2.0 in depth.

The downside for both books is that none of them cover Android OpenGL coding and both books have
code examples in C. So, I decided to break my learning curve into a few parts:

1. Review my C/C++ knowledge so I can have a better understanding of the books.
2. Understand OpenGL programming in general (Code and ES) and use this knowledge on Java
Programming
3. Use the OpenGL + Java programming skills on Android.

The starting place for my research was [this page][3] on [opengl.org][4], When checking out
those links, I found out that many of them had not been updated for OpenGL 3.*, or even OpenGL
2.*. Java 3D is more than an OpenGL Binding and is more like a [SceneGraph API][5] filled with lots
of bells and whistles. The real contenders were [JOGL][6] and [LWJGL][7]. So, I researched both
APIs in more depth and found that LWJGL is leaner than JOGL and gives me access to all the methods
I need to implement the code from the OpenGL SuperBible book and would make an easier port to the
Android OpenGL API too, which is nothing more than bindings to the OpenGL ES 2 API.

Of course, nothing comes for free. I have had to (and still am) translate a lot of math code from
the C++ book to Java. My intention is to get some tutorials done and help people who have the same
goals!

Stay tuned for updates soon!

[1]: http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321712617/ref=sr_1_1?ie=UTF8&qid=1316983191&sr=8-1
[2]: http://www.amazon.com/OpenGL-ES-2-0-Programming-Guide/dp/0321502795/ref=sr_1_1?ie=UTF8&qid=1316983205&sr=8-1
[3]: http://www.opengl.org/resources/bindings/
[4]: http://opengl.org/
[5]: http://en.wikipedia.org/wiki/Scene_graph
[6]: http://jogamp.org/jogl/www/
[7]: http://lwjgl.org/