Login  Register

Re: Issue with Java 3D under OpenJDK 7 / Mac OS X

Posted by InteractiveMesh on Jan 24, 2013; 2:40pm
URL: https://forum.jogamp.org/Issue-with-Java-3D-under-OpenJDK-7-Mac-OS-X-tp4025259p4028006.html

The attached zip-file contains my contribution to the Java project "hharrison / java3d-core" hosted on github (https://github.com/hharrison/java3d-core).

The included source code is a non-exclusive contribution and comprises added or changed code in the following classes of the package 'javax.media.j3d' based on version pre5 of 2012/11/23 and JogAmp/JOGL release 2.0-rc11 :

Canvas3D, J3DGraphics2DImpl, JoglDrawable, JoglPipeline, MasterControl, NoopPipeline, Pipeline, Renderer, TextureRetained, and Texture3DRetained.

The targeted issues and features are :

1. Mac OS X 10.7+ / Oracle JRE 7+

 - JOGL's OffscreenLayerSurface approach implemented
 - Canvas3D implements javax.media.nativewindow.OffscreenLayerOption
 - new Pipeline method 'resizeOffscreenLayerSurface'
 - Renderer detects Canvas3D's size changes and performs offscreen layer resizing
 
 - Still required : fix of Mac/Oracle JRE/JOGL's x/y-positioning and z-ordering issues (see post above)

 - classes: Canvas3D, JoglPipeline, NoopPipeline, Pipeline, Renderer

2. Offscreen rendering

 - deprecated pbuffer replaced with framebuffer object
 - based on JOGL's FBO implementation GLFBODrawable and FBObject
 - pbuffer is still available if FBO isn't supported or not desired
 - double buffering and scene antialiasing support if requested and available
 - currently fixed number of samples: 4

 - classes: Canvas3D, JoglPipeline, Renderer

3. Best configuration

 - Java 3D compliant GLCapabilitiesChooser introduced : J3DCapsChooser
 - Workaround if capability chooser isn't called (Mac/JRE 7)

 - class: JoglPipeline
 
4. Texture object generation

 - internal texture object name generation replaced with OpenGL 'glGenTextures' function
 - avoids conflict with JOGL's texture object names
 - new Pipeline method 'generateTexture' implemented

 - classes: Canvas3D, J3DGraphics2DImpl, JoglPipeline, MasterControl, NoopPipeline, Pipeline, TextureRetained, Texture3DRetained  


These sources contain code and implementation approaches from the JogAmp/JOGL project, namely
 - com.jogamp.opengl.FBObject
 - javax.media.opengl.awt.GLCanvas
 - jogamp.opengl.GLDrawableHelper
 - jogamp.opengl.GLFBODrawableImpl
 
Licenses are included in the txt-file.

A new build after replacing the affected classes should run on Mac, Linux, and Windows.

August

Project-contribution_hharrison-java3d-core.zip