[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob ./Makefile include/vob/jni/Types.hxx src...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] libvob ./Makefile include/vob/jni/Types.hxx src... |
Date: |
Tue, 11 Mar 2003 07:57:05 -0500 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Changes by: Tuomas J. Lukka <address@hidden> 03/03/11 07:57:04
Modified files:
. : Makefile
include/vob/jni: Types.hxx
src/jni : Gen.cxx Main.cxx Makefile Strings.cxx
Log message:
Ahhh.. bug being found; the different namespaces prevented the compiler
complaint
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/Makefile.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/jni/Types.hxx.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/jni/Gen.cxx.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/jni/Main.cxx.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/jni/Makefile.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/jni/Strings.cxx.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: libvob/Makefile
diff -u libvob/Makefile:1.9 libvob/Makefile:1.10
--- libvob/Makefile:1.9 Tue Mar 11 06:24:28 2003
+++ libvob/Makefile Tue Mar 11 07:57:03 2003
@@ -6,7 +6,7 @@
.PHONY: all subdirs $(SUBDIRS)
-all: subdirs java
+all: subdirs java jni
CLASSDIR=CLASSES/
@@ -17,6 +17,9 @@
ctest: src/trans
src/jni: src/os src/texture src/util src/trans
+
+jni: src/jni java
+ make -C src/jni jnilib
subdirs: $(SUBDIRS)
Index: libvob/include/vob/jni/Types.hxx
diff -u libvob/include/vob/jni/Types.hxx:1.14
libvob/include/vob/jni/Types.hxx:1.15
--- libvob/include/vob/jni/Types.hxx:1.14 Tue Mar 11 07:10:31 2003
+++ libvob/include/vob/jni/Types.hxx Tue Mar 11 07:57:04 2003
@@ -30,11 +30,14 @@
#include <vob/Types.hxx>
#include <vob/util/ObjectStorer.hxx>
#include <vob/os/Os.hxx>
+#include <vob/Debug.hxx>
#include <vob/jni/Strings.hxx>
+
namespace Vob {
namespace JNI {
+ PREDBGVAR(dbg_convert);
/** The JNI parameter template class.
*
@@ -126,13 +129,18 @@
VOB_JNI_CONVERSION_ASSIGN(int, "int", jint)
START_VOB_JNI_CONVERSION(Token, "String", jstring)
+ DBG(dbg_convert) << "Converting token "<<in<<"\n";
out = tokenFromJstring(env, in);
+ DBG(dbg_convert) << "Converted token "<<out<<"\n";
END_VOB_JNI_CONVERSION
START_VOB_JNI_CONVERSION_IDDED(GLubyte *, "GL.ByteVector")
+ DBG(dbg_convert) << "Converting bytevec "<<in<<"\n";
ByteVector *bv = bytevectors[in];
+ DBG(dbg_convert) << "Got bytevec "<<bv<<"\n";
out = &((*bv)[0]);
+ DBG(dbg_convert) << "Got ptr "<<(int)out<<"\n";
END_VOB_JNI_CONVERSION
START_VOB_JNI_CONVERSION_IDDED(DisplayListID, "GL.DisplayList")
Index: libvob/src/jni/Gen.cxx
diff -u libvob/src/jni/Gen.cxx:1.10 libvob/src/jni/Gen.cxx:1.11
--- libvob/src/jni/Gen.cxx:1.10 Tue Mar 11 07:10:32 2003
+++ libvob/src/jni/Gen.cxx Tue Mar 11 07:57:04 2003
@@ -76,6 +76,7 @@
jni << "#include <vob/vobs/Trivial.hxx>\n";
jni << "#include <vob/vobs/Pixel.hxx>\n";
jni << "#include <vob/LinearPrimitives.hxx>\n";
+ jni << "#include \"org_nongnu_libvob_gl_GLRen.h\"\n";
jni << "using namespace Vob::JNI;\n";
jni << "using namespace Vob::Primitives;\n";
jni << "namespace Vob { \n";
@@ -84,10 +85,11 @@
jni << " switch(id) {\n" << VOB_TRANSCSTREAM.str()<<"\n";
jni << " default: return 0;\n";
jni << " }}\n";
- jni << "namespace Vobs { \n";
+ jni << "} \n";
+ jni << "using namespace Vob; using namespace Vob::Vobs; \n";
jni << "extern \"C\" { \n";
jni << VOB_JNISTREAM.str()<<"\n\n";
- jni << "}}}\n";
+ jni << "}\n";
return 0;
}
Index: libvob/src/jni/Main.cxx
diff -u libvob/src/jni/Main.cxx:1.6 libvob/src/jni/Main.cxx:1.7
--- libvob/src/jni/Main.cxx:1.6 Tue Mar 11 07:10:32 2003
+++ libvob/src/jni/Main.cxx Tue Mar 11 07:57:04 2003
@@ -34,10 +34,13 @@
#include <vob/buildmipmaps.hxx>
#include <vob/Debug.hxx>
+#include "org_nongnu_libvob_gl_GL.h"
+
namespace Vob {
namespace JNI {
DBGVAR(dbg, "JNI.general");
DBGVAR(dbg_event, "JNI.event");
+DBGVAR(dbg_convert, "JNI.convert");
ObjectStorer<Vob0> vob0s("Vob0");
ObjectStorer<Vob1> vob1s("Vob1");
Index: libvob/src/jni/Makefile
diff -u libvob/src/jni/Makefile:1.8 libvob/src/jni/Makefile:1.9
--- libvob/src/jni/Makefile:1.8 Tue Mar 11 07:10:32 2003
+++ libvob/src/jni/Makefile Tue Mar 11 07:57:04 2003
@@ -15,7 +15,9 @@
LIBS=-lGL -lGLU -lstdc++
-all: $(sources:.cxx=.o) Gen libvobjni.so
+all: $(sources:.cxx=.o) Gen
+
+jnilib: libvobjni.so
Gen: Gen.o
$(CXX) -o Gen Gen.o $(LIBS)
@@ -23,9 +25,17 @@
GLRen.gen.cxx: Gen GLRen.template.java
(cd ../..; src/jni/Gen)
+GLRen.gen.o: org_nongnu_libvob_gl_GLRen.h
+Main.o: org_nongnu_libvob_gl_GL.h
+
libvobjni.so: $(JNIOBJS) Makefile
$(CXXLINK) -rdynamic -fpic -o libvobjni.so $(SHARED) $(CXXFLAGS)
$(JNIOBJS) $(LIBS)
include $(sources:.cxx=.dep)
+
+org_nongnu_libvob_gl_GL.h: ../../CLASSES/org/nongnu/libvob/gl/GL.class
+ javah -classpath $(CLASSPATH):../../CLASSES org.nongnu.libvob.gl.GL
+org_nongnu_libvob_gl_GLRen.h: ../../CLASSES/org/nongnu/libvob/gl/GLRen.class
+ javah -classpath $(CLASSPATH):../../CLASSES org.nongnu.libvob.gl.GLRen
Index: libvob/src/jni/Strings.cxx
diff -u libvob/src/jni/Strings.cxx:1.1 libvob/src/jni/Strings.cxx:1.2
--- libvob/src/jni/Strings.cxx:1.1 Tue Mar 11 07:10:32 2003
+++ libvob/src/jni/Strings.cxx Tue Mar 11 07:57:04 2003
@@ -24,6 +24,7 @@
* Written by Tuomas J. Lukka
*/
+#include <vob/jni/Types.hxx>
#include <vob/jni/Strings.hxx>
#include <callgl.hxx>
@@ -42,8 +43,11 @@
GLenum tokenFromJstring(JNIEnv *env, jstring token) {
+ DBG(JNI::dbg_convert) << "Converting jstring "<<env<<" "<<token<<"\n";
std::string str = jstr2stdstr(env, token);
+ DBG(JNI::dbg_convert) << "Got std str "<<str<<"\n";
GLenum ret = CallGL::getTokenValue(str.c_str());
+ DBG(JNI::dbg_convert) << "Got val "<<ret<<"\n";
return ret;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] libvob ./Makefile include/vob/jni/Types.hxx src...,
Tuomas J. Lukka <=