2
\$\begingroup\$

So, since I’ve been working a lot with LWJGL recently, I’ve come to learn that Android has native OpenGL support. So, what does this mean for me? Is OpenGL handled the same way it is in LWJGL? What’re the larger differences between the two?

\$\endgroup\$
3
\$\begingroup\$

Because OpenGL is a completely separate entity, most of the stuff is the same, but there are some differences.

There are no separate classes for different version (like GL20, GL11, etc.), everything is in the same package.

As with LWJGL, you'll need to use buffers to put data into VBOs, but you can also pass these to the draw methods without creating any type of storage for them (like the above mentioned VBOs), but this is a "hey, you can do this" type of difference, and because it's very slow, you shouldn't rely on it.

Creating the context is probably the biggest difference. You can't use GLFW. Instead you'll need to fiddle a bit with the built in GLSurfaceView.

All in all, the differences aren't huge and usually only apply to the way you call the methods, the order of things you need to do is largely the same, so you'll get familiar with it pretty quickly by just reading a tutorial on it.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.