Special-case glMapBufferRange
Updating the generator to handle GLvoid*/java.nio.Buffer return values probably wouldn't be too hard, but this is the only function that needs it currently. Bug: 8566953 Change-Id: I359a951136ab479ab576ce2e5a2881b937b7e8c9
This commit is contained in:
parent
610bbf2b6f
commit
1c8b8e8b8e
@ -184,7 +184,7 @@ void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose,
|
||||
void glBlitFramebuffer ( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter )
|
||||
void glRenderbufferStorageMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height )
|
||||
void glFramebufferTextureLayer ( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer )
|
||||
// GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access )
|
||||
GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access )
|
||||
void glFlushMappedBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length )
|
||||
void glBindVertexArray ( GLuint array )
|
||||
void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays )
|
||||
|
13
opengl/tools/glgen/stubs/gles11/glMapBufferRange.cpp
Normal file
13
opengl/tools/glgen/stubs/gles11/glMapBufferRange.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
/* GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access ) */
|
||||
static jobject
|
||||
android_glMapBufferRange__IIII
|
||||
(JNIEnv *_env, jobject _this, jint target, jint offset, jint length, jint access) {
|
||||
GLvoid* _p = glMapBufferRange((GLenum)target,
|
||||
(GLintptr)offset, (GLsizeiptr)length, (GLbitfield)access);
|
||||
jobject _buf = (jobject)0;
|
||||
if (_p) {
|
||||
_buf = _env->NewDirectByteBuffer(_p, length);
|
||||
}
|
||||
return _buf;
|
||||
}
|
||||
|
9
opengl/tools/glgen/stubs/gles11/glMapBufferRange.java
Normal file
9
opengl/tools/glgen/stubs/gles11/glMapBufferRange.java
Normal file
@ -0,0 +1,9 @@
|
||||
// C function GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access )
|
||||
|
||||
public static native java.nio.Buffer glMapBufferRange(
|
||||
int target,
|
||||
int offset,
|
||||
int length,
|
||||
int access
|
||||
);
|
||||
|
@ -0,0 +1 @@
|
||||
{"glMapBufferRange", "(IIII)Ljava/nio/Buffer;", (void *) android_glMapBufferRange__IIII },
|
Loading…
Reference in New Issue
Block a user