From: Luca L. <Luc...@in...> - 2000-11-27 15:00:01
|
Hi all, during the last raining weekend I played a little bit on my powerbook with MacOSX (I am running it full time from a couple of months) trying to port gl4java on it (thanks to Sven I am using gl4java on my java app from a couple of years now). I know Sven is working on that but I tried to see if I can get some hints. Actually I am able to compile the libraries both from the makefile and from Project Builder. The hard part was to discover the format for native libraries in MacOSX and I got it. I started from the mac code of Gerard for the platform dependent part with very little modification.... Now the problem, running the info: java gl4java.GLContext -info I get the following (if I comment a couple of methods where the bus error is generated I get also the java window but without the information content, just to confirm that the native libraries are working): jvm vendor: Apple Computer, Inc. jvm version: 1.2.2 jvm version (parsed): major: 1, minor: 2 loaded native library: GL4JavaJauGljJNI12 loaded native library: GL4JavaJauGLJNI12 loaded native library: GL4JavaJauGLUJNI12 native Libraries loaded succesfull GLFunc implementation GLFuncJauJNI created succesfull GLUFunc implementation GLUFuncJauJNI created succesfull >>> createGLContext >>> gljInit sizes: jint=4 AGLDrawable=4 AGLContext= 4 GLbyte 1 GLshort 2 GLint 4 GLfloat 4 GLdouble 8 GLubyte 1 GLboolean 1 GLushort 2 GLuint 4 GLenum 4 GLbitfield 4 jboolean 1 jbyte 1 jchar 2 jshort 2 jint 4 jlong 8 jfloat 4 jdouble 8 openOpenGL: fglContext ok openOpenGL: received pData 147735408 openOpenGL: glDrawable ok the renderers that are available on this system: Device : 0 invalid display (Error code 10006) *** malloc[2371]: argument too large: -28 Bus error I am not a professional programmer and also my background is not on informatic but I think the problem could be to one or the second of the following facts: - I have some warning during compilation about incompatible pointers: ............... CNativeCode/OpenGL_macosx.c:301: warning: int format, long int arg (arg 3) CNativeCode/OpenGL_macosx.c:301: warning: int format, long int arg (arg 4) CNativeCode/OpenGL_macosx.c:301: warning: int format, long int arg (arg 5) CNativeCode/OpenGL_macosx.c:397: warning: int format, long int arg (arg 3) CNativeCode/OpenGL_macosx.c:442: warning: passing arg 7 of `get_GC' from incompatible pointer type CNativeCode/OpenGL_macosx.c:442: warning: passing arg 8 of `get_GC' from incompatible pointer type CNativeCode/OpenGL_macosx.c:454: warning: int format, long int arg (arg 3) CNativeCode/OpenGL_macosx.c:460: warning: int format, long int arg (arg 3) .......... - In the macosx documentation there is something about the fact that calling Toolbox functions (the toolbox was used in the Mac OS for writing GUI) in MacOS X requires a lock on the toolbox (not necessary with MacOS) otherwise you can get memory corruption and bus errors. There is someone who can help at this stage? Best regards, Luca Lutterotti |