diff options
author | Jack Palevich <jackpal@google.com> | 2010-06-22 20:08:40 +0800 |
---|---|---|
committer | Jack Palevich <jackpal@google.com> | 2010-06-22 20:08:40 +0800 |
commit | 224107a421e2611b15d1ec736df54bca9ee3e78d (patch) | |
tree | 7947fa03cc7f65a001a6b899d20f9a848a80e6a6 /opengl/java | |
parent | 07ccf5ad7edfeeebb79208ad3e8a52917fe038a8 (diff) | |
download | frameworks_base-224107a421e2611b15d1ec736df54bca9ee3e78d.zip frameworks_base-224107a421e2611b15d1ec736df54bca9ee3e78d.tar.gz frameworks_base-224107a421e2611b15d1ec736df54bca9ee3e78d.tar.bz2 |
Add OpenGL ES 2.0 VBO versions glDrawElements and glVertexAttribPointer.
Change-Id: Id0069535e97fe96eef74e4d0c1d19b010061fe3b
Diffstat (limited to 'opengl/java')
-rw-r--r-- | opengl/java/android/opengl/GLES10.java | 16 | ||||
-rw-r--r-- | opengl/java/android/opengl/GLES20.java | 84 |
2 files changed, 100 insertions, 0 deletions
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( |