Add OpenGL ES 2.0 VBO versions glDrawElements and glVertexAttribPointer.
Change-Id: Id0069535e97fe96eef74e4d0c1d19b010061fe3b
This commit is contained in:
@ -109169,6 +109169,25 @@
|
|||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="type" type="int">
|
<parameter name="type" type="int">
|
||||||
</parameter>
|
</parameter>
|
||||||
|
<parameter name="offset" type="int">
|
||||||
|
</parameter>
|
||||||
|
</method>
|
||||||
|
<method name="glDrawElements"
|
||||||
|
return="void"
|
||||||
|
abstract="false"
|
||||||
|
native="true"
|
||||||
|
synchronized="false"
|
||||||
|
static="true"
|
||||||
|
final="false"
|
||||||
|
deprecated="not deprecated"
|
||||||
|
visibility="public"
|
||||||
|
>
|
||||||
|
<parameter name="mode" type="int">
|
||||||
|
</parameter>
|
||||||
|
<parameter name="count" type="int">
|
||||||
|
</parameter>
|
||||||
|
<parameter name="type" type="int">
|
||||||
|
</parameter>
|
||||||
<parameter name="indices" type="java.nio.Buffer">
|
<parameter name="indices" type="java.nio.Buffer">
|
||||||
</parameter>
|
</parameter>
|
||||||
</method>
|
</method>
|
||||||
@ -111584,6 +111603,29 @@
|
|||||||
<parameter name="values" type="java.nio.FloatBuffer">
|
<parameter name="values" type="java.nio.FloatBuffer">
|
||||||
</parameter>
|
</parameter>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="glVertexAttribPointer"
|
||||||
|
return="void"
|
||||||
|
abstract="false"
|
||||||
|
native="true"
|
||||||
|
synchronized="false"
|
||||||
|
static="true"
|
||||||
|
final="false"
|
||||||
|
deprecated="not deprecated"
|
||||||
|
visibility="public"
|
||||||
|
>
|
||||||
|
<parameter name="indx" type="int">
|
||||||
|
</parameter>
|
||||||
|
<parameter name="size" type="int">
|
||||||
|
</parameter>
|
||||||
|
<parameter name="type" type="int">
|
||||||
|
</parameter>
|
||||||
|
<parameter name="normalized" type="boolean">
|
||||||
|
</parameter>
|
||||||
|
<parameter name="stride" type="int">
|
||||||
|
</parameter>
|
||||||
|
<parameter name="offset" type="int">
|
||||||
|
</parameter>
|
||||||
|
</method>
|
||||||
<method name="glVertexAttribPointer"
|
<method name="glVertexAttribPointer"
|
||||||
return="void"
|
return="void"
|
||||||
abstract="false"
|
abstract="false"
|
||||||
|
@ -823,6 +823,18 @@ android_glDrawArrays__III
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */
|
||||||
|
static void
|
||||||
|
android_glDrawElements__IIII
|
||||||
|
(JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) {
|
||||||
|
glDrawElements(
|
||||||
|
(GLenum)mode,
|
||||||
|
(GLsizei)count,
|
||||||
|
(GLenum)type,
|
||||||
|
(const GLvoid *)offset
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) */
|
/* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) */
|
||||||
static void
|
static void
|
||||||
android_glDrawElements__IIILjava_nio_Buffer_2
|
android_glDrawElements__IIILjava_nio_Buffer_2
|
||||||
@ -4786,6 +4798,20 @@ android_glVertexAttrib4fv__ILjava_nio_FloatBuffer_2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLint offset ) */
|
||||||
|
static void
|
||||||
|
android_glVertexAttribPointer__IIIZII
|
||||||
|
(JNIEnv *_env, jobject _this, jint indx, jint size, jint type, jboolean normalized, jint stride, jint offset) {
|
||||||
|
glVertexAttribPointer(
|
||||||
|
(GLuint)indx,
|
||||||
|
(GLint)size,
|
||||||
|
(GLenum)type,
|
||||||
|
(GLboolean)normalized,
|
||||||
|
(GLsizei)stride,
|
||||||
|
(const GLvoid *)offset
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/* void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr ) */
|
/* void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr ) */
|
||||||
static void
|
static void
|
||||||
android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I
|
android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I
|
||||||
@ -4872,6 +4898,7 @@ static JNINativeMethod methods[] = {
|
|||||||
{"glDisable", "(I)V", (void *) android_glDisable__I },
|
{"glDisable", "(I)V", (void *) android_glDisable__I },
|
||||||
{"glDisableVertexAttribArray", "(I)V", (void *) android_glDisableVertexAttribArray__I },
|
{"glDisableVertexAttribArray", "(I)V", (void *) android_glDisableVertexAttribArray__I },
|
||||||
{"glDrawArrays", "(III)V", (void *) android_glDrawArrays__III },
|
{"glDrawArrays", "(III)V", (void *) android_glDrawArrays__III },
|
||||||
|
{"glDrawElements", "(IIII)V", (void *) android_glDrawElements__IIII },
|
||||||
{"glDrawElements", "(IIILjava/nio/Buffer;)V", (void *) android_glDrawElements__IIILjava_nio_Buffer_2 },
|
{"glDrawElements", "(IIILjava/nio/Buffer;)V", (void *) android_glDrawElements__IIILjava_nio_Buffer_2 },
|
||||||
{"glEnable", "(I)V", (void *) android_glEnable__I },
|
{"glEnable", "(I)V", (void *) android_glEnable__I },
|
||||||
{"glEnableVertexAttribArray", "(I)V", (void *) android_glEnableVertexAttribArray__I },
|
{"glEnableVertexAttribArray", "(I)V", (void *) android_glEnableVertexAttribArray__I },
|
||||||
@ -5011,6 +5038,7 @@ static JNINativeMethod methods[] = {
|
|||||||
{"glVertexAttrib4f", "(IFFFF)V", (void *) android_glVertexAttrib4f__IFFFF },
|
{"glVertexAttrib4f", "(IFFFF)V", (void *) android_glVertexAttrib4f__IFFFF },
|
||||||
{"glVertexAttrib4fv", "(I[FI)V", (void *) android_glVertexAttrib4fv__I_3FI },
|
{"glVertexAttrib4fv", "(I[FI)V", (void *) android_glVertexAttrib4fv__I_3FI },
|
||||||
{"glVertexAttrib4fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib4fv__ILjava_nio_FloatBuffer_2 },
|
{"glVertexAttrib4fv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glVertexAttrib4fv__ILjava_nio_FloatBuffer_2 },
|
||||||
|
{"glVertexAttribPointer", "(IIIZII)V", (void *) android_glVertexAttribPointer__IIIZII },
|
||||||
{"glVertexAttribPointerBounds", "(IIIZILjava/nio/Buffer;I)V", (void *) android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I },
|
{"glVertexAttribPointerBounds", "(IIIZILjava/nio/Buffer;I)V", (void *) android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I },
|
||||||
{"glViewport", "(IIII)V", (void *) android_glViewport__IIII },
|
{"glViewport", "(IIII)V", (void *) android_glViewport__IIII },
|
||||||
};
|
};
|
||||||
|
@ -669,6 +669,22 @@ public class GLES10 {
|
|||||||
java.nio.IntBuffer params
|
java.nio.IntBuffer params
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2009 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
// C function const GLubyte * glGetString ( GLenum name )
|
// C function const GLubyte * glGetString ( GLenum name )
|
||||||
|
|
||||||
public static native String glGetString(
|
public static native String glGetString(
|
||||||
|
@ -670,6 +670,15 @@ public class GLES20 {
|
|||||||
int count
|
int count
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// C function void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset )
|
||||||
|
|
||||||
|
public static native void glDrawElements(
|
||||||
|
int mode,
|
||||||
|
int count,
|
||||||
|
int type,
|
||||||
|
int offset
|
||||||
|
);
|
||||||
|
|
||||||
// C function void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices )
|
// C function void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices )
|
||||||
|
|
||||||
public static native void glDrawElements(
|
public static native void glDrawElements(
|
||||||
@ -978,6 +987,22 @@ public class GLES20 {
|
|||||||
java.nio.IntBuffer params
|
java.nio.IntBuffer params
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2009 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
// C function void glGetProgramInfoLog( GLuint program, GLsizei maxLength, GLsizei * length,
|
// C function void glGetProgramInfoLog( GLuint program, GLsizei maxLength, GLsizei * length,
|
||||||
// GLchar * infoLog);
|
// GLchar * infoLog);
|
||||||
|
|
||||||
@ -1018,6 +1043,22 @@ public class GLES20 {
|
|||||||
java.nio.IntBuffer params
|
java.nio.IntBuffer params
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2009 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
// C function void glGetShaderInfoLog( GLuint shader, GLsizei maxLength, GLsizei * length,
|
// C function void glGetShaderInfoLog( GLuint shader, GLsizei maxLength, GLsizei * length,
|
||||||
// GLchar * infoLog);
|
// GLchar * infoLog);
|
||||||
|
|
||||||
@ -1064,6 +1105,22 @@ public class GLES20 {
|
|||||||
byte source
|
byte source
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2009 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
// C function const GLubyte * glGetString ( GLenum name )
|
// C function const GLubyte * glGetString ( GLenum name )
|
||||||
|
|
||||||
public static native String glGetString(
|
public static native String glGetString(
|
||||||
@ -1316,6 +1373,22 @@ public class GLES20 {
|
|||||||
int length
|
int length
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2009 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
// C function void glShaderSource ( GLuint shader, GLsizei count, const GLchar ** string, const GLint* length )
|
// C function void glShaderSource ( GLuint shader, GLsizei count, const GLchar ** string, const GLint* length )
|
||||||
|
|
||||||
public static native void glShaderSource(
|
public static native void glShaderSource(
|
||||||
@ -1814,6 +1887,17 @@ public class GLES20 {
|
|||||||
java.nio.FloatBuffer values
|
java.nio.FloatBuffer values
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// C function void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLint offset )
|
||||||
|
|
||||||
|
public static native void glVertexAttribPointer(
|
||||||
|
int indx,
|
||||||
|
int size,
|
||||||
|
int type,
|
||||||
|
boolean normalized,
|
||||||
|
int stride,
|
||||||
|
int offset
|
||||||
|
);
|
||||||
|
|
||||||
// C function void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr )
|
// C function void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr )
|
||||||
|
|
||||||
private static native void glVertexAttribPointerBounds(
|
private static native void glVertexAttribPointerBounds(
|
||||||
|
@ -39,6 +39,7 @@ void glDetachShader ( GLuint program, GLuint shader )
|
|||||||
void glDisable ( GLenum cap )
|
void glDisable ( GLenum cap )
|
||||||
void glDisableVertexAttribArray ( GLuint index )
|
void glDisableVertexAttribArray ( GLuint index )
|
||||||
void glDrawArrays ( GLenum mode, GLint first, GLsizei count )
|
void glDrawArrays ( GLenum mode, GLint first, GLsizei count )
|
||||||
|
void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset )
|
||||||
void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices )
|
void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices )
|
||||||
void glEnable ( GLenum cap )
|
void glEnable ( GLenum cap )
|
||||||
void glEnableVertexAttribArray ( GLuint index )
|
void glEnableVertexAttribArray ( GLuint index )
|
||||||
@ -138,5 +139,6 @@ void glVertexAttrib3f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z )
|
|||||||
void glVertexAttrib3fv ( GLuint indx, const GLfloat *values )
|
void glVertexAttrib3fv ( GLuint indx, const GLfloat *values )
|
||||||
void glVertexAttrib4f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
|
void glVertexAttrib4f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
|
||||||
void glVertexAttrib4fv ( GLuint indx, const GLfloat *values )
|
void glVertexAttrib4fv ( GLuint indx, const GLfloat *values )
|
||||||
|
void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLint offset )
|
||||||
void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr )
|
void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr )
|
||||||
void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height )
|
void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height )
|
||||||
|
@ -695,7 +695,7 @@ public class JniCodeEmitter {
|
|||||||
boolean isPointerFunc = isPointerFunc(jfunc);
|
boolean isPointerFunc = isPointerFunc(jfunc);
|
||||||
boolean isVBOPointerFunc = (outName.endsWith("Pointer") ||
|
boolean isVBOPointerFunc = (outName.endsWith("Pointer") ||
|
||||||
outName.endsWith("PointerOES") ||
|
outName.endsWith("PointerOES") ||
|
||||||
outName.endsWith("DrawElements")) &&
|
outName.endsWith("DrawElements") || outName.endsWith("VertexAttribPointer")) &&
|
||||||
!jfunc.getCFunc().hasPointerArg();
|
!jfunc.getCFunc().hasPointerArg();
|
||||||
if (isPointerFunc) {
|
if (isPointerFunc) {
|
||||||
outName += "Bounds";
|
outName += "Bounds";
|
||||||
|
Reference in New Issue
Block a user