/[libvob]/libvob/src/jni/Main.cxx
ViewVC logotype

Diff of /libvob/src/jni/Main.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by tjl, Tue Mar 11 11:24:29 2003 UTC revision 1.6 by tjl, Tue Mar 11 12:10:32 2003 UTC
# Line 27  Main.cxx Line 27  Main.cxx
27  #include <callgl.hxx>  #include <callgl.hxx>
28    
29  #include <vob/jni/Types.hxx>  #include <vob/jni/Types.hxx>
30    #include <vob/jni/Strings.hxx>
31  #include <vob/glerr.hxx>  #include <vob/glerr.hxx>
32    
33  #include <vob/Texture.hxx>  #include <vob/Texture.hxx>
# Line 45  ObjectStorer<Vob> vob3s("Vob3(none)"); Line 46  ObjectStorer<Vob> vob3s("Vob3(none)");
46    
47  Os::WindowSystem *ws;  Os::WindowSystem *ws;
48    
 typedef std::vector<GLubyte> ByteVector;  
49  ObjectStorer<ByteVector> bytevectors("bytevectors");  ObjectStorer<ByteVector> bytevectors("bytevectors");
50    
51  ObjectStorer<Os::RenderingSurface> windows("windows");  ObjectStorer<Os::RenderingSurface> windows("windows");
# Line 98  void javaExc(JNIEnv *env, const char *wh Line 98  void javaExc(JNIEnv *env, const char *wh
98      }      }
99  }  }
100    
 /** Converts std::string to jstring through UTF-8 transformation */  
 jstring stdstr2jstr(JNIEnv *env, std::string stdstr) {  
   return env->NewStringUTF(stdstr.c_str());  
 }  
   
 /** Converts jstring to std::string through UTF-8 transformation */  
 std::string jstr2stdstr(JNIEnv *env, jstring jstr) {  
   const char *strptr = env->GetStringUTFChars(jstr, 0);  
   std::string stdstr(strptr, env->GetStringUTFLength(jstr));  
   env->ReleaseStringUTFChars(jstr, strptr);  
   return stdstr;  
 }  
   
101  struct GZZJNIEventHandler : public Os::Eventhandler {  struct GZZJNIEventHandler : public Os::Eventhandler {
102    
103      jobject globalRef;      jobject globalRef;
# Line 399  jf(void, impl_1deleteTexture) Line 386  jf(void, impl_1deleteTexture)
386        releaseWindow();        releaseWindow();
387  }  }
388    
 GLenum tokenFromJstring(JNIEnv *env, jstring token) {  
     std::string str = jstr2stdstr(env, token);  
     GLenum ret = CallGL::getTokenValue(str.c_str());  
     return ret;  
 }  
   
389  bool hasGenMipmaps() {  bool hasGenMipmaps() {
390      static int initialized;      static int initialized;
391      static bool hasExtension;      static bool hasExtension;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26