From: Pepijn V. E. <pep...@lu...> - 2002-01-09 10:55:54
|
Sorry if i wasn't clear. In the makefile in the C2J directory there are rules like: ../CNativeCode/OpenGLU_JauJNI_funcs.c: C2J.class \ warning.skel \ ../CNativeCode/OpenGLU_funcs.c.skel \ manual/glu-manualCodedImplJNI.c \ glu-proto-auto.c cat warning.skel \ ../CNativeCode/OpenGLU_funcs.c.skel \ manual/glu-manualCodedImplJNI.c \ glu-proto-auto.c \ > ../CNativeCode/OpenGLU_JauJNI_funcs.c Which cats the C2J generated file (glu-proto-auto.c) and the manual file (glu-manualCodedImplJNI.c) together. The auto generated file however already contains an implementation for a lot of glu functions (for instance "JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3B"). If I put a manually coded implementation for this function in glu-manualCodedImplJNI.c, then the cat'ed file has two implementations of the function in it. Is there a way to do this correctly or do am I mistaken somewhere? Pepijn Van Eeckhoudt Sven Goethel wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wednesday 09 January 2002 10:42, Pepijn Van Eeckhoudt wrote: > >>If I wanted to change the native code for a standard opengl function >>(for instance the glu tesselator stuff), is it enough to add my own >>implementations to the files in C2J\manual. >> > > YES > > please read my latest explanation I send to the mailinglist, see below .. > > >>From the makefile it seems >>like the auto generated stuff is put together with the manual file using >>cat, so I assume you would have a duplicate function declaration then. >> > > where is the duplicate ? > > nono, it just depends on your point of view. > > for me, the generated sources (C2J'ed and cat'ed) > placed to gl4java/ and CNativeCode/ are not kinda temporaery files .. > > the true sources within C2J/manual, e.g. for gl4java/GLUFunc14JauJNI.java, > are the origin ones ! > > or may be i misunderstood you, so please gimme more details ! > > >>Or did I miss something? If I'm correct, then how sould I add a manual >>implementation for a gl function? >> > > like i mentions before (see below) .. > > >>Pepijn Van Eeckhoudt >> >>Sven Goethel wrote: >> > > <snip> > >>>you can find such manual codes within the GL4Java/C2J/manual directory ! >>> >>>then we need some new functions within the: >>> gl4java/GLUFunc14.java (interface) >>> C2J/manual/glu-manualCodedVirt-14.java (manual part) >>> >>> gl4java/GLUFunc14JauJNI.java (implementation - JNI declarations and >>>stubs ..) C2J/manual/glu-manualCodedImplJNI1-14.java (manual part) >>> >>> CNativeCode/OpenGLU_JauJNI14_funcs.c (native implementation) >>> C2J/manual/glu-manualCodedImplJNI14.c (manual part) >>> >>>just have a look - and understand, how it is done within the >>>manual GLFunc14* counterpart of the NV extension ..: >>> >>>GL4Java/C2J/manual: >>> gl-manualCodedImplJNI1-14.java gl-manualCodedImplJNI14.c >>>gl-manualCodedVirt1-14.java >>> >>>we might want to make the memory managment functions more general >>>purpose, so we can use them for e.g. (as you suggested) >>> - glTessVertex >>> - we should create a native NIO buffer which will be used .., >>> straight outta the java application, >>> or by a new general purpose GL4Java utility function .. >>> >>> - all passed NIO buffers might be freed by the glTessEndPolygon >>>function or by another one .. if allocated by a GL4Java utility function >>> >>> - glTessEndPolygon >>> - might free all passed NIO buffers, if allocated by a GL4Java utility >>>function >>> >>>so this little concept - please review and make it more clean RFC .., >>>might be introduced to all OpenGL functions which handles a big amount of >>>data, e.g. textures etc., where the JVM's GC might moves or cleans the >>>memory .. >>> >>>cheers, sven >>> > > - -- > health & wealth > mailto:sgo...@ja... > www : http://www.jausoft.com ; pgp: http://www.jausoft.com/gpg/ > voice : +49-521-2399440 ; fax : +49-521-2399442 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: For info see http://www.gnupg.org > > iD8DBQE8PBoRHdOA30NoFAARAmZZAJwMEFkRHaVBqEmK3AA2MaTOtVT9KgCgkVO+ > 84T+4Y0FCr02cRS8HIjAAWQ= > =dMkU > -----END PGP SIGNATURE----- > > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup > > |