> >I am concerned that the crash we are seeing is the result of the >intialization of the OpenGL DLL for the graphics card (let's just say it's a >card known for bad drivers). It doesn't seem to take much to cause a >problem: just load opengl32.dll (which is linked by the Java 3D native >library, j3d.dll) and do almost any kind of OpenGL initialization. > >If you can excuse some simplification, it boils down to this: if the Java 3D >native library is loaded, the application becomes dependent on the graphics >card driver. The degree of dependence (and any effect) would vary by >graphics card, of course. >
Yes, Java 3D does currently have this assumtion and dependence. >You mentioned that because of the way class loaders work, the native library >will get loaded when any Java 3D class is loaded. Can you clarify how that >works? (I don't understand how using *any* Java 3D class could cause the >library to be loaded... I thought that only certain classes would cause the >library to be loaded, and only when the class is instantiated.) Thanks. > Sure. There is a static initializer on the VirtualUniverse object which creates an internal controller called MasterControl. MasterControl loads the J3D.dll when it is created. So, whenever the VirtualUniverse class gets loaded, the J3D.dll will get loaded. This seems pretty clean except for the way the the current class loaders work. Whenever a class gets loaded, all classes that it refers to get loaded and verified. Since, there is implementation work going on behind the API, we refer to a number of classes that don't seem to be directly be related to the API you call. You can see how, by recursion, most of the Java 3D classes get loaded when you refer to a single class. There is a feature we are looking at for Java 3D 1.4 that can help this. We are looking at adding a RenderingDevice interface. An application could then use our defult rendering device, or instantiate one of its own - like a null renderer for instance. Doug. =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
