[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/jni GzzGL-jni.cxx
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz/gfx/jni GzzGL-jni.cxx |
Date: |
Mon, 23 Sep 2002 04:46:17 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/09/23 04:46:17
Modified files:
gfx/jni : GzzGL-jni.cxx
Log message:
Oopss
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/jni/GzzGL-jni.cxx.diff?tr1=1.27&tr2=1.28&r1=text&r2=text
Patches:
Index: gzz/gfx/jni/GzzGL-jni.cxx
diff -c gzz/gfx/jni/GzzGL-jni.cxx:1.27 gzz/gfx/jni/GzzGL-jni.cxx:1.28
*** gzz/gfx/jni/GzzGL-jni.cxx:1.27 Sat Sep 21 03:35:17 2002
--- gzz/gfx/jni/GzzGL-jni.cxx Mon Sep 23 04:46:17 2002
***************
*** 1,6 ****
#include <vector>
! #include "gzz_gfx_gl_GZZGL.h"
#include "librenderables/Renderables.hxx"
#include "librenderables/RealRenderables.hxx"
--- 1,6 ----
#include <vector>
! #include "gzz_gfx_gl_GL.h"
#include "librenderables/Renderables.hxx"
#include "librenderables/RealRenderables.hxx"
***************
*** 186,192 ****
int inited = 0;
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_init
(JNIEnv *env, jclass, jint) {
if(inited++) {
cerr << "Already inited: "<<(inited-1)<<"\n";
--- 186,192 ----
int inited = 0;
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_init
(JNIEnv *env, jclass, jint) {
if(inited++) {
cerr << "Already inited: "<<(inited-1)<<"\n";
***************
*** 221,227 ****
// Window
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_createWindowImpl
(JNIEnv *env, jclass, jint x, jint y, jint w, jint h, jobject eh) {
DBG(dbg) << "Creating new window for Java "<<x<<" "<<y<<" "<<w<<"
"<<h<<"\n";
jobject ehglobal = env->NewGlobalRef(eh);
--- 221,227 ----
// Window
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_createWindowImpl
(JNIEnv *env, jclass, jint x, jint y, jint w, jint h, jobject eh) {
DBG(dbg) << "Creating new window for Java "<<x<<" "<<y<<" "<<w<<"
"<<h<<"\n";
jobject ehglobal = env->NewGlobalRef(eh);
***************
*** 233,239 ****
return windows.add(win);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_deleteWindow
(JNIEnv *env, jclass, jint id) {
// Window *w = windows.get(id);
--- 233,239 ----
return windows.add(win);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_deleteWindow
(JNIEnv *env, jclass, jint id) {
// Window *w = windows.get(id);
***************
*** 242,255 ****
windows.remove(id);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_repaintWindow
(JNIEnv *env, jclass, jint id) {
DBG(dbg_event) << "RepaintWindow called\n";
Os::Window *w = windows.get(id);
w->repaint();
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_getWindowSize
(JNIEnv *env, jclass, jint id, jobject rect) {
Os::Window *win = windows.get(id);
int xywh[4];
--- 242,255 ----
windows.remove(id);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_repaintWindow
(JNIEnv *env, jclass, jint id) {
DBG(dbg_event) << "RepaintWindow called\n";
Os::Window *w = windows.get(id);
w->repaint();
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_getWindowSize
(JNIEnv *env, jclass, jint id, jobject rect) {
Os::Window *win = windows.get(id);
int xywh[4];
***************
*** 269,296 ****
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_addTimeoutWindow
(JNIEnv *env, jclass, jint id, jint ms, jint tid) {
Os::Window *w = windows.get(id);
w->addTimeout(ms, tid);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_impl_1Window_1setCurrent
(JNIEnv *env, jclass, jint id) {
setWindow(id);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_impl_1Window_1release
(JNIEnv *env, jclass, jint id) {
releaseWindow();
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_impl_1Window_1move
(JNIEnv *env, jclass, jint id, jint x, jint y) {
windows.get(id)->move(x,y);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_impl_1Window_1resize
(JNIEnv *env, jclass, jint id, jint w, jint h) {
windows.get(id)->resize(w,h);
}
--- 269,296 ----
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_addTimeoutWindow
(JNIEnv *env, jclass, jint id, jint ms, jint tid) {
Os::Window *w = windows.get(id);
w->addTimeout(ms, tid);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1Window_1setCurrent
(JNIEnv *env, jclass, jint id) {
setWindow(id);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1Window_1release
(JNIEnv *env, jclass, jint id) {
releaseWindow();
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1Window_1move
(JNIEnv *env, jclass, jint id, jint x, jint y) {
windows.get(id)->move(x,y);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1Window_1resize
(JNIEnv *env, jclass, jint id, jint w, jint h) {
windows.get(id)->resize(w,h);
}
***************
*** 328,334 ****
// Image
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_createImageImpl
(JNIEnv *env, jclass, jstring filename) {
const char *utf = env->GetStringUTFChars(filename, 0);
Image *img = ws->loadImageFile(utf);
--- 328,334 ----
// Image
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_createImageImpl
(JNIEnv *env, jclass, jstring filename) {
const char *utf = env->GetStringUTFChars(filename, 0);
Image *img = ws->loadImageFile(utf);
***************
*** 336,347 ****
return images.add(img);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_deleteImage
(JNIEnv *, jclass, jint img) {
images.remove(img);
}
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_getImageSize
(JNIEnv *, jclass, jint img, jint dimNo) {
Image *i = images[img];
if(dimNo == 0)
--- 336,347 ----
return images.add(img);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_deleteImage
(JNIEnv *, jclass, jint img) {
images.remove(img);
}
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_getImageSize
(JNIEnv *, jclass, jint img, jint dimNo) {
Image *i = images[img];
if(dimNo == 0)
***************
*** 352,358 ****
// TexRect
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_createTexRectImpl
(JNIEnv *, jclass, jint id)
{
DBG(dbg) << "CreateTexRectImpl\n";
--- 352,358 ----
// TexRect
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_createTexRectImpl
(JNIEnv *, jclass, jint id)
{
DBG(dbg) << "CreateTexRectImpl\n";
***************
*** 373,392 ****
return imagetiles.add(t);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_deleteTexRect
(JNIEnv *, jclass, jint id)
{
// MEMLEAK! MUST FREE MOSAICTILE FIRST!
imagetiles.remove(id);
}
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_getTexRectTexID
(JNIEnv *, jclass, jint id)
{
return imagetiles[id]->getRect().tex.getTexId();
}
! JNIEXPORT jdouble JNICALL Java_gzz_gfx_gl_GZZGL_getTexRectTexCoord
(JNIEnv *, jclass, jint id, jint coord, double v)
{
Mosaic::Rect &rect = imagetiles[id]->getRect();
--- 373,392 ----
return imagetiles.add(t);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_deleteTexRect
(JNIEnv *, jclass, jint id)
{
// MEMLEAK! MUST FREE MOSAICTILE FIRST!
imagetiles.remove(id);
}
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_getTexRectTexID
(JNIEnv *, jclass, jint id)
{
return imagetiles[id]->getRect().tex.getTexId();
}
! JNIEXPORT jdouble JNICALL Java_gzz_gfx_gl_GL_getTexRectTexCoord
(JNIEnv *, jclass, jint id, jint coord, double v)
{
Mosaic::Rect &rect = imagetiles[id]->getRect();
***************
*** 398,404 ****
}
// Texture
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_impl_1createTexture
(JNIEnv *, jclass) {
setWindow();
GLuint ret;
--- 398,404 ----
}
// Texture
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_impl_1createTexture
(JNIEnv *, jclass) {
setWindow();
GLuint ret;
***************
*** 409,415 ****
return ret;
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_impl_1deleteTexture
(JNIEnv *, jclass, jint id) {
setWindow();
GLuint rel = id;
--- 409,415 ----
return ret;
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1deleteTexture
(JNIEnv *, jclass, jint id) {
setWindow();
GLuint rel = id;
***************
*** 424,430 ****
return ret;
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_impl_1Texture_1loadNull2D
(JNIEnv *env, jclass, jint id, jint level, jstring internalFormat_s,
jint w, jint h, jint border, jstring format_s, jstring type_s) {
int internalFormat = tokenFromJstring(env, internalFormat_s);
--- 424,430 ----
return ret;
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1Texture_1loadNull2D
(JNIEnv *env, jclass, jint id, jint level, jstring internalFormat_s,
jint w, jint h, jint border, jstring format_s, jstring type_s) {
int internalFormat = tokenFromJstring(env, internalFormat_s);
***************
*** 439,445 ****
GLERR
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_impl_1Texture_1loadSubImage
(JNIEnv *env, jclass, jint id, jint level, jint imageId, jint xoffs, jint
yoffs) {
glBindTexture(GL_TEXTURE_2D, id);
--- 439,445 ----
GLERR
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1Texture_1loadSubImage
(JNIEnv *env, jclass, jint id, jint level, jint imageId, jint xoffs, jint
yoffs) {
glBindTexture(GL_TEXTURE_2D, id);
***************
*** 451,457 ****
GLERR
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_impl_1Texture_1downsampleInto
(JNIEnv *env, jclass, jint id, jint intoid, jstring targetstr, jint level,
jstring internalFormat, jstring transferType)
{
GLenum target = tokenFromJstring(env, targetstr);
--- 451,457 ----
GLERR
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1Texture_1downsampleInto
(JNIEnv *env, jclass, jint id, jint intoid, jstring targetstr, jint level,
jstring internalFormat, jstring transferType)
{
GLenum target = tokenFromJstring(env, targetstr);
***************
*** 483,489 ****
}
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_impl_1Texture_1shade
(JNIEnv *env, jclass, jint id, jint w, jint h, jint d, jint comp,
jstring internalFormat,
jstring format,
--- 483,489 ----
}
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_impl_1Texture_1shade
(JNIEnv *env, jclass, jint id, jint w, jint h, jint d, jint comp,
jstring internalFormat,
jstring format,
***************
*** 561,567 ****
// VertexProgramNV
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_impl_1createVertexProgramNV
(JNIEnv *, jclass) {
setWindow();
GLuint ret;
--- 561,567 ----
// VertexProgramNV
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_impl_1createVertexProgramNV
(JNIEnv *, jclass) {
setWindow();
GLuint ret;
***************
*** 573,579 ****
return ret;
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_impl_1deleteVertexProgramNV
(JNIEnv *, jclass, jint id) {
#ifdef GL_VERTEX_PROGRAM_NV
setWindow();
--- 573,579 ----
return ret;
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_impl_1deleteVertexProgramNV
(JNIEnv *, jclass, jint id) {
#ifdef GL_VERTEX_PROGRAM_NV
setWindow();
***************
*** 583,589 ****
#endif
}
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_impl_1VertexProgramNV_1load
(JNIEnv *env, jclass, jint id, jstring prog) {
#ifdef GL_VERTEX_PROGRAM_NV
setWindow();
--- 583,589 ----
#endif
}
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_impl_1VertexProgramNV_1load
(JNIEnv *env, jclass, jint id, jstring prog) {
#ifdef GL_VERTEX_PROGRAM_NV
setWindow();
***************
*** 600,606 ****
// Font
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_createFontImpl
(JNIEnv *env, jclass, jstring file, jint pt) {
DBG(dbg) << "creatFontImpl\n";
setWindow();
--- 600,606 ----
// Font
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_createFontImpl
(JNIEnv *env, jclass, jstring file, jint pt) {
DBG(dbg) << "creatFontImpl\n";
setWindow();
***************
*** 614,635 ****
return fonts.add(f);
}
! JNIEXPORT jfloat JNICALL Java_gzz_gfx_gl_GZZGL_getFontHeight
(JNIEnv *, jclass, jint i) {
return fonts.get(i)->f->getLineHeight();
}
! JNIEXPORT jfloat JNICALL Java_gzz_gfx_gl_GZZGL_getFontYOffs
(JNIEnv *, jclass, jint i) {
return fonts.get(i)->f->getLineOffset();
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_deleteFont
(JNIEnv *, jclass, jint i) {
fonts.remove(i);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_putFontWidths
(JNIEnv *env, jclass, jint fontId, jshortArray widths) {
int arrayLength = env->GetArrayLength(widths);
--- 614,635 ----
return fonts.add(f);
}
! JNIEXPORT jfloat JNICALL Java_gzz_gfx_gl_GL_getFontHeight
(JNIEnv *, jclass, jint i) {
return fonts.get(i)->f->getLineHeight();
}
! JNIEXPORT jfloat JNICALL Java_gzz_gfx_gl_GL_getFontYOffs
(JNIEnv *, jclass, jint i) {
return fonts.get(i)->f->getLineOffset();
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_deleteFont
(JNIEnv *, jclass, jint i) {
fonts.remove(i);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_putFontWidths
(JNIEnv *env, jclass, jint fontId, jshortArray widths) {
int arrayLength = env->GetArrayLength(widths);
***************
*** 646,652 ****
// DisplayList
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_createDisplayListImpl
(JNIEnv *, jclass) {
setWindow();
int l = glGenLists(1);
--- 646,652 ----
// DisplayList
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_createDisplayListImpl
(JNIEnv *, jclass) {
setWindow();
int l = glGenLists(1);
***************
*** 657,663 ****
}
return l;
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_startCompile
(JNIEnv *, jclass, jint l, jint wid) {
DBG(dbg) << "Start list compilation "<<l<<"\n";
--- 657,663 ----
}
return l;
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_startCompile
(JNIEnv *, jclass, jint l, jint wid) {
DBG(dbg) << "Start list compilation "<<l<<"\n";
***************
*** 667,673 ****
glNewList(l, GL_COMPILE);
GLERR
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_endCompile
(JNIEnv *, jclass, jint, jint wid) {
DBG(dbg) << "End list compilation\n";
GLERR
--- 667,673 ----
glNewList(l, GL_COMPILE);
GLERR
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_endCompile
(JNIEnv *, jclass, jint, jint wid) {
DBG(dbg) << "End list compilation\n";
GLERR
***************
*** 677,683 ****
releaseWindow();
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_compileCallGL
(JNIEnv *env, jclass, jint l, jstring s) {
DBG(dbg) << "Start callgl\n";
setWindow();
--- 677,683 ----
releaseWindow();
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_compileCallGL
(JNIEnv *env, jclass, jint l, jstring s) {
DBG(dbg) << "Start callgl\n";
setWindow();
***************
*** 692,698 ****
DBG(dbg) << "released window\n";
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_deleteDisplayList
(JNIEnv *, jclass, jint l) {
DBG(dbg) << "Delete display list (XXX Might crash if contexts wrong)\n";
glDeleteLists(l, 1);
--- 692,698 ----
DBG(dbg) << "released window\n";
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_deleteDisplayList
(JNIEnv *, jclass, jint l) {
DBG(dbg) << "Delete display list (XXX Might crash if contexts wrong)\n";
glDeleteLists(l, 1);
***************
*** 701,718 ****
// ByteVector
//
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_createByteVectorImpl
(JNIEnv *, jclass, jint size) {
ByteVector *vec = new ByteVector(size);
return bytevectors.add(vec);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_deleteByteVector
(JNIEnv *, jclass, jint id) {
bytevectors.remove(id);
}
! JNIEXPORT void JNICALL
Java_gzz_gfx_gl_GZZGL_impl_1ByteVector_1readFromBuffer_1ubytes
(JNIEnv *env, jclass, jint id, jint winid, jstring buffer, jint x, jint y,
jint w, jint h, jstring format)
{
setWindow(winid);
--- 701,718 ----
// ByteVector
//
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_createByteVectorImpl
(JNIEnv *, jclass, jint size) {
ByteVector *vec = new ByteVector(size);
return bytevectors.add(vec);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_deleteByteVector
(JNIEnv *, jclass, jint id) {
bytevectors.remove(id);
}
! JNIEXPORT void JNICALL
Java_gzz_gfx_gl_GL_impl_1ByteVector_1readFromBuffer_1ubytes
(JNIEnv *env, jclass, jint id, jint winid, jstring buffer, jint x, jint y,
jint w, jint h, jstring format)
{
setWindow(winid);
***************
*** 732,738 ****
releaseWindow();
}
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_impl_1ByteVector_1get
(JNIEnv *env, jclass, jint id, jint ind) {
return (*bytevectors[id])[ind];
}
--- 732,738 ----
releaseWindow();
}
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_impl_1ByteVector_1get
(JNIEnv *env, jclass, jint id, jint ind) {
return (*bytevectors[id])[ind];
}
***************
*** 740,772 ****
// Renderable
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_deleteRenderable0
(JNIEnv *, jclass, jint id) {
renderable0s.remove(id);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_deleteRenderable1
(JNIEnv *, jclass, jint id) {
renderable1s.remove(id);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_deleteRenderable2
(JNIEnv *, jclass, jint id) {
renderable2s.remove(id);
}
// functions
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_startContext
(JNIEnv *env, jclass) {
setWindow();
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_endContext
(JNIEnv *env, jclass) {
releaseWindow();
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_eventLoop
(JNIEnv *env, jclass, jboolean wait) {
DBG(dbg) << "Going into eventloop in C++\n";
try {
--- 740,772 ----
// Renderable
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_deleteRenderable0
(JNIEnv *, jclass, jint id) {
renderable0s.remove(id);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_deleteRenderable1
(JNIEnv *, jclass, jint id) {
renderable1s.remove(id);
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_deleteRenderable2
(JNIEnv *, jclass, jint id) {
renderable2s.remove(id);
}
// functions
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_startContext
(JNIEnv *env, jclass) {
setWindow();
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_endContext
(JNIEnv *env, jclass) {
releaseWindow();
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_eventLoop
(JNIEnv *env, jclass, jboolean wait) {
DBG(dbg) << "Going into eventloop in C++\n";
try {
***************
*** 782,788 ****
*/
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_renderImpl
(JNIEnv *env, jclass, jint window,
jintArray codes, jfloatArray pts1, jintArray indices2,
jfloatArray pts2,
--- 782,788 ----
*/
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_renderImpl
(JNIEnv *env, jclass, jint window,
jintArray codes, jfloatArray pts1, jintArray indices2,
jfloatArray pts2,
***************
*** 852,858 ****
return t.tv_usec*1E-6 + t.tv_sec;
}
! JNIEXPORT jfloat JNICALL Java_gzz_gfx_gl_GZZGL_timeRenderImpl
(JNIEnv *env, jclass, jint window,
jintArray codes, jfloatArray pts1,
jint numpts, jboolean standardcoords, jint iters) {
--- 852,858 ----
return t.tv_usec*1E-6 + t.tv_sec;
}
! JNIEXPORT jfloat JNICALL Java_gzz_gfx_gl_GL_timeRenderImpl
(JNIEnv *env, jclass, jint window,
jintArray codes, jfloatArray pts1,
jint numpts, jboolean standardcoords, jint iters) {
***************
*** 912,925 ****
return t;
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_setDebugVar
(JNIEnv *env, jclass, jstring name, jint value) {
const char *utf = env->GetStringUTFChars(name, 0);
Debug::var(utf) = value;
env->ReleaseStringUTFChars(name, utf);
}
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GZZGL_getDebugVar
(JNIEnv *env, jclass, jstring name) {
const char *utf = env->GetStringUTFChars(name, 0);
int value = Debug::var(utf) ;
--- 912,925 ----
return t;
}
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_setDebugVar
(JNIEnv *env, jclass, jstring name, jint value) {
const char *utf = env->GetStringUTFChars(name, 0);
Debug::var(utf) = value;
env->ReleaseStringUTFChars(name, utf);
}
! JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_getDebugVar
(JNIEnv *env, jclass, jstring name) {
const char *utf = env->GetStringUTFChars(name, 0);
int value = Debug::var(utf) ;
***************
*** 927,933 ****
return value;
}
! JNIEXPORT jobjectArray Java_gzz_gfx_gl_GZZGL_getDebugVarNames
(JNIEnv *env, jclass) {
vector<const char *> vec;
vec = Debug::getVarNames();
--- 927,933 ----
return value;
}
! JNIEXPORT jobjectArray Java_gzz_gfx_gl_GL_getDebugVarNames
(JNIEnv *env, jclass) {
vector<const char *> vec;
vec = Debug::getVarNames();
***************
*** 940,946 ****
return result;
}
! JNIEXPORT jstring JNICALL Java_gzz_gfx_gl_GZZGL_getGLString
(JNIEnv *env, jclass, jstring name) {
const char *utf = env->GetStringUTFChars(name, 0);
const char *value = CallGL::getString(utf) ;
--- 940,946 ----
return result;
}
! JNIEXPORT jstring JNICALL Java_gzz_gfx_gl_GL_getGLString
(JNIEnv *env, jclass, jstring name) {
const char *utf = env->GetStringUTFChars(name, 0);
const char *value = CallGL::getString(utf) ;
***************
*** 948,954 ****
return env->NewStringUTF(value);
}
! JNIEXPORT jfloatArray JNICALL Java_gzz_gfx_gl_GZZGL_getGLFloat
(JNIEnv *env, jclass, jstring name) {
const char *utf = env->GetStringUTFChars(name, 0);
vector<float> vec = CallGL::getFloat(utf) ;
--- 948,954 ----
return env->NewStringUTF(value);
}
! JNIEXPORT jfloatArray JNICALL Java_gzz_gfx_gl_GL_getGLFloat
(JNIEnv *env, jclass, jstring name) {
const char *utf = env->GetStringUTFChars(name, 0);
vector<float> vec = CallGL::getFloat(utf) ;
***************
*** 958,964 ****
return result;
}
! JNIEXPORT jfloatArray JNICALL Java_gzz_gfx_gl_GZZGL_getGLTexParameterFloat
(JNIEnv *env, jclass, jstring target, jint tex, jstring name) {
const char *utf_target = env->GetStringUTFChars(target, 0);
const char *utf = env->GetStringUTFChars(name, 0);
--- 958,964 ----
return result;
}
! JNIEXPORT jfloatArray JNICALL Java_gzz_gfx_gl_GL_getGLTexParameterFloat
(JNIEnv *env, jclass, jstring target, jint tex, jstring name) {
const char *utf_target = env->GetStringUTFChars(target, 0);
const char *utf = env->GetStringUTFChars(name, 0);
***************
*** 970,976 ****
return result;
}
! JNIEXPORT jfloatArray JNICALL
Java_gzz_gfx_gl_GZZGL_getGLTexLevelParameterFloat
(JNIEnv *env, jclass, jstring target, jint tex, jint level, jstring name) {
const char *utf_target = env->GetStringUTFChars(target, 0);
const char *utf = env->GetStringUTFChars(name, 0);
--- 970,976 ----
return result;
}
! JNIEXPORT jfloatArray JNICALL Java_gzz_gfx_gl_GL_getGLTexLevelParameterFloat
(JNIEnv *env, jclass, jstring target, jint tex, jint level, jstring name) {
const char *utf_target = env->GetStringUTFChars(target, 0);
const char *utf = env->GetStringUTFChars(name, 0);
***************
*** 982,988 ****
return result;
}
! JNIEXPORT jstring JNICALL Java_gzz_gfx_gl_GZZGL_getGLTokenString
(JNIEnv *env, jclass, jint value) {
const char *str = CallGL::getTokenString(value) ;
return env->NewStringUTF(str);
--- 982,988 ----
return result;
}
! JNIEXPORT jstring JNICALL Java_gzz_gfx_gl_GL_getGLTokenString
(JNIEnv *env, jclass, jint value) {
const char *str = CallGL::getTokenString(value) ;
return env->NewStringUTF(str);
***************
*** 990,996 ****
GLuint buf[1600 * 1200];
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GZZGL_reallyClearStencilBuffer
(JNIEnv *env, jclass, jint w, jint h) {
if(w*h > 1600*1200) return;
--- 990,996 ----
GLuint buf[1600 * 1200];
! JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_reallyClearStencilBuffer
(JNIEnv *env, jclass, jint w, jint h) {
if(w*h > 1600*1200) return;