71 |
cerr << "Couldn't set window to current -> returning\n"; |
cerr << "Couldn't set window to current -> returning\n"; |
72 |
return; |
return; |
73 |
} |
} |
74 |
DBG(dbg) << "Set current\n"; |
DBG(dbg) << "Set current "<<wid<<"\n"; |
75 |
|
|
76 |
} |
} |
77 |
void releaseWindow(int wid = -1) { |
void releaseWindow(int wid = -1) { |
81 |
cerr << "Couldn't release window current!!!"; |
cerr << "Couldn't release window current!!!"; |
82 |
exit(17); |
exit(17); |
83 |
} |
} |
84 |
|
DBG(dbg) << "Release current "<<wid<<"\n"; |
85 |
} |
} |
86 |
|
|
87 |
struct GZZJNIEventHandler : public Os::Eventhandler { |
struct GZZJNIEventHandler : public Os::Eventhandler { |
341 |
setWindow(); |
setWindow(); |
342 |
GLuint ret; |
GLuint ret; |
343 |
glGenTextures(1, &ret); |
glGenTextures(1, &ret); |
344 |
|
DBG(dbg) << "Created texture id "<<ret<<"\n"; |
345 |
GLERR |
GLERR |
346 |
releaseWindow(); |
releaseWindow(); |
347 |
return ret; |
return ret; |
368 |
jstring format, |
jstring format, |
369 |
jstring name, jobjectArray params) { |
jstring name, jobjectArray params) { |
370 |
setWindow(); |
setWindow(); |
371 |
|
DBG(dbg)<<"Shade into "<<id<<"\n"; |
372 |
|
|
373 |
const char *name_utf = env->GetStringUTFChars(name, 0); |
const char *name_utf = env->GetStringUTFChars(name, 0); |
374 |
|
|
554 |
GLERR |
GLERR |
555 |
|
|
556 |
releaseWindow(wid); |
releaseWindow(wid); |
|
DBG(dbg) << "Set current\n"; |
|
557 |
} |
} |
558 |
|
|
559 |
JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_compileCallGL |
JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_compileCallGL |
683 |
releaseWindow(window); |
releaseWindow(window); |
684 |
} |
} |
685 |
|
|
|
DBG(dbg) << "Did releasecurrent\n"; |
|
686 |
|
|
687 |
} |
} |
688 |
|
|
749 |
releaseWindow(window); |
releaseWindow(window); |
750 |
} |
} |
751 |
|
|
|
DBG(dbg) << "Did releasecurrent\n"; |
|
752 |
|
|
753 |
return t; |
return t; |
754 |
} |
} |