From 224107a421e2611b15d1ec736df54bca9ee3e78d Mon Sep 17 00:00:00 2001 From: Jack Palevich Date: Tue, 22 Jun 2010 20:08:40 +0800 Subject: Add OpenGL ES 2.0 VBO versions glDrawElements and glVertexAttribPointer. Change-Id: Id0069535e97fe96eef74e4d0c1d19b010061fe3b --- opengl/java/android/opengl/GLES10.java | 16 +++++++ opengl/java/android/opengl/GLES20.java | 84 ++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) (limited to 'opengl/java') diff --git a/opengl/java/android/opengl/GLES10.java b/opengl/java/android/opengl/GLES10.java index db52b82..790acbd 100644 --- a/opengl/java/android/opengl/GLES10.java +++ b/opengl/java/android/opengl/GLES10.java @@ -669,6 +669,22 @@ public class GLES10 { 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 ) public static native String glGetString( diff --git a/opengl/java/android/opengl/GLES20.java b/opengl/java/android/opengl/GLES20.java index b8aac0e..635f811 100644 --- a/opengl/java/android/opengl/GLES20.java +++ b/opengl/java/android/opengl/GLES20.java @@ -670,6 +670,15 @@ public class GLES20 { 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 ) public static native void glDrawElements( @@ -978,6 +987,22 @@ public class GLES20 { 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, // GLchar * infoLog); @@ -1018,6 +1043,22 @@ public class GLES20 { 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, // GLchar * infoLog); @@ -1064,6 +1105,22 @@ public class GLES20 { 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 ) public static native String glGetString( @@ -1316,6 +1373,22 @@ public class GLES20 { 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 ) public static native void glShaderSource( @@ -1814,6 +1887,17 @@ public class GLES20 { 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 ) private static native void glVertexAttribPointerBounds( -- cgit v1.1