replicant-frameworks_native/opengl/tools/glgen/stubs/gles11/glMapBufferRange.cpp
Jesse Hall 1c8b8e8b8e 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
2013-04-10 22:00:26 -07:00

14 lines
483 B
C++

/* 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;
}