GuiTeK GuiTeK - 7 days ago 6
Android Question

Why does glDeleteTextures() have three parameters in OpenGL ES 2.0?

I'm wondering why the function

GLES20.glDeleteTextures()
has three parameters in OpenGL ES 2.0 whereas the "standard"
glDeleteTextures()
only has two parameters.

Even in the documentation, there are only two parameters.

However, in my program and many forums, the function takes a third parameter (always a
0
from what I've seen).

So, what is this third parameter?

EDIT: other functions have this "problem".
glGetIntegerv()
also takes a seemingly-useless third parameter (still an
int
) in OpenGL ES 2.0.

Answer

This has noting to do with ES 2.0 compared to other OpenGL versions.

The reference documentation shows the C/C++ OpenGL bindings.

What you're using when you call GLES20.glDeleteTextures() are the Java bindings defined for Android. They obviously need to look different because they are for a different programming language. The Java bindings are also not standardized, so they are defined in a way that makes sense to the people responsible for Android.

Comments