From: Sven G. <sgo...@ja...> - 2002-01-08 18:56:04
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 08 January 2002 18:02, Pepijn Van Eeckhoudt wrote: > In the red book (1.2 third edition) on page 482 second paragraph, it is > stated that only a pointer is kept inside the tesselator :). The > tesselator kicks in when you call glTessEndPolygon. My suggestion would > be to copy the data that is passed in glTessVertex calls, and to free it > after glTessEndPolygon has returned. I modified my program so it uses > direct buffers and this works fine. If I keep the exact same code, but > pass a double[] it's messed up again, so the problem isn't in my program. > > Pepijn Van Eeckhoudt thx .. for the next future, we need to support many more NIO Buffer functions, true ! so you are welcome to add such NIO support to the manuall coded one, like you suggested e.g. for GLU functions .. 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 iD8DBQE8O0CsHdOA30NoFAARAkiaAJsGztRzxtMEUGAV4laLTBPGvr4ObQCghN3Z 49ejsxPlH7Z2+x8o22MLimE= =08nL -----END PGP SIGNATURE----- |