538 |
} |
} |
539 |
|
|
540 |
JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1Texture_1copyTexImage2D( |
JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1Texture_1copyTexImage2D( |
541 |
JNIEnv *env, jclass, jint id, jstring bufferstr, |
JNIEnv *env, jclass, jint id, jint wid, jstring bufferstr, |
542 |
jstring targetstr, jint level, |
jstring targetstr, jint level, |
543 |
jstring iforstring, jint x, jint y, jint w, jint h, |
jstring iforstring, jint x, jint y, jint w, jint h, |
544 |
jint border) { |
jint border) { |
545 |
|
setWindow(wid); |
546 |
GLenum buffer = tokenFromJstring(env, bufferstr); |
GLenum buffer = tokenFromJstring(env, bufferstr); |
547 |
GLenum target = tokenFromJstring(env, targetstr); |
GLenum target = tokenFromJstring(env, targetstr); |
548 |
GLenum ifor = tokenFromJstring(env, iforstring); |
GLenum ifor = tokenFromJstring(env, iforstring); |
549 |
glBindTexture(target, id); |
glBindTexture(target, id); |
550 |
glReadBuffer(buffer); |
glReadBuffer(buffer); |
551 |
|
DBG(dbg) << "Copyteximage "<<target<<" "<<level<<" "<<ifor<<" " |
552 |
|
<<x<<" "<<y<<" "<<w<<" "<<h<<" "<<border<<"\n"; |
553 |
glCopyTexImage2D(target, level, ifor, x, y, w, h, border); |
glCopyTexImage2D(target, level, ifor, x, y, w, h, border); |
554 |
glBindTexture(target, 0); |
glBindTexture(target, 0); |
555 |
GLERR |
GLERR |
556 |
|
releaseWindow(); |
557 |
} |
} |
558 |
|
|
559 |
JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_impl_1Texture_1shade |
JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_impl_1Texture_1shade |