aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
Commit message (Collapse)AuthorAgeFilesLines
* GLAutoDrawable* refinement of abstraction / generalization - API Change!Sven Gothel2012-07-0423-213/+434
| | | | | | | | | | | | | | | | | | | | | | | | - GLAutoDrawable (compat change - recompile): - 'void invoke(boolean wait, GLRunnable glRunnable)' -> 'boolean invoke(boolean wait, GLRunnable glRunnable)' Allows notifying caller whether the task has been executed or at least enqueued. - GLAutoDrawable add 'GLEventListener removeGLEventListener(int index)' - This allow one to remove a specific GLEventListener and reusing it (return value). - GLDrawableImpl remove 'destroy()' to favor 'setRealized(false)' - Using more common code of GLAutoDrawableBase, i.e. GLPbufferImpl can use defaultDestroyOp(). - Removes redundancy of methods - GLAutoDrawableBase/Delegate - better 'default' names to emphasize it's purpose, adding API doc - includes more generic functionality - defaultWindowDestroyNotify() - defaultDestroyOp() - TestGLAutoDrawableDelegateNEWT demonstrates a simple example w/ all window events handled. - Fix TestParenting01cSwingAWT's threading use (gl disturbance thread)
* GLAutoDrawable: Refine API doc; Use new abstract impl. GLAutoDrawableBase ↵Sven Gothel2012-07-028-263/+586
| | | | | | | | | | | | | | | (GLWindow, ..); Add new GLAutoDrawableDelegate. - Refine API doc - 'void setContext(GLContext)' -> 'GLContext setContext(GLContext)' - Add note to createContext(GLContext) override -Use new abstract impl. GLAutoDrawableBase, used by: - GLWindow - GLAutoDrawableDelegate - GLPbufferImpl - Add new GLAutoDrawableDelegate incl. unit test
* GLContextImpl/GLDrawableImpl: More fail-safe, cleanup, mark some methods finalSven Gothel2012-06-293-19/+25
| | | | | | | | | | | GLContextImpl: Cleanup - release(): simplify the conditions - destroy(): allow locked twice before (destroy case) GLDrawableImpl: - fail safe: swapBuffers - final methods: getFactoryImpl, toHexString, getGLProfile, getRequestedGLCapabilities, getFactory, isRealized, lockSurface, unlockSurface
* Minor cleanupSven Gothel2012-06-293-17/+16
|
* AWT/SWT GLCanvas: Remove volatile of context instance, use drawable ↵Sven Gothel2012-06-282-4/+4
| | | | instance's volatile 'feature'
* SWT/AWT GLCanvas multithreading annotations (see commit ↵Sven Gothel2012-06-282-6/+30
| | | | 1a91ec5c8b6fd9d9db7bc115569c369fe7b38e9b) ; AWT GLCanvas remove dead code.
* SWT GLCanvas: Fix destroy(), Remove local concurrency hack & out-of-process ↵Sven Gothel2012-06-281-103/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | locking ; Revise threading code; Proper name for SWT unit tests. SWT GLCanvas: - Fix destroy() drawable.setRealized(false); is being called within dispose() method - Remove local concurrency hack [MT-0] The hack: 'final GLContext ctx = getContext(); a = null != ctx ? ctx.something() : 0;' is thread safe locally, however, w/o covering the hole use case of the caller it makes no sense to add thread safe code here - would be only an illusion. In case any of the methods are called outside of a locked state extra care should be added. Maybe we shall expose locking facilities to the user. However, since the user shall stick to the GLEventListener model while utilizing GLAutoDrawable implementations, she is safe due to the implicit locked state. - Removing out-of-process locking [MT-1] Claiming the recursive lock in the dispose/display/.. methods and _then_ issuing a complex off-thread GL task could lead to deadlock. The GL task could involve calling GLEventListener methods, which itself could try to manipulate the GLCanvas -> deadlock. Similar to [MT-0] we may need to either find a proper locking mechanism or simply ignore it and reduce functionality. TBH .. the number of scenarious of the mentioned deadlock are very limited and exotic. - Revise threading code [MT-2] Besides the other MT-* remarks, the logic whether to spawn off the GL task and determination which thread to use is too complex and redundant. (See isRenderThread(), runInGLThread() and runInDesignatedGLThread()) - Proper name for SWT unit tests. Reflect the semantics.
* GLContext* TRACE_SWITCH: Add GLContext instance hash value to allow tracking.Sven Gothel2012-06-282-12/+21
|
* GLDrawable* cleanup: Add @Override, remove trailing whitespace, ..Sven Gothel2012-06-2824-401/+716
|
* Capabilities cleanup: make most get*() final, impl. Comparable to ↵Sven Gothel2012-06-274-71/+111
| | | | | | | | | | | | | | | | CapabilitiesImmutable, Misc .. - Comparable<CapabilitiesImmutable> to CapabilitiesImmutable: "interface CapabilitiesImmutable extends VisualIDHolder, WriteCloneable" -> "interface CapabilitiesImmutable extends VisualIDHolder, WriteCloneable, Comparable<CapabilitiesImmutable>" - CapabilitiesImmutable and GLCapabilitiesImmutable get-methods final (most) - GLCapabilitiesImmutable.compareTo: add doubleBuffered (between stereo and samples) Misc: - Add @Override - remove trailing whitespace,
* Misc cleanup: Add @Override, remove trailing whitespaceSven Gothel2012-06-2718-464/+603
|
* Misc cleanup: Add @Override, remove trailing whitespaceSven Gothel2012-06-2722-238/+329
|
* Misc cleanup: add @OverrideSven Gothel2012-06-271-1/+1
|
* NativeSurface Cleanup (API Change) - Adapt to GlueGen Lock cleanup commit: ↵Sven Gothel2012-06-273-11/+3
| | | | | | | | | | | | 834b9e530e652b7ff7c5e222720bce3ad2b11c5f - adapt to GlueGen Lock cleanup - remove isSurfaceLocked(), use 'null != getSurfaceLockOwner()' instead Misc: - remove unused priv./impl. methods - add @Override
* Implement Bug #598 - JOGL ALL JAR File Change incl. it's Native Jar URL ↵Sven Gothel2012-06-262-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Derivation - Depends on GlueGen commit 9a71703904ebfec343fb2c7266343d37a2e4c3db JAR file name changes: ALL JARs: - jogl.all.jar -> jogl-all.jar - jogl.all-noawt.jar -> jogl-all-noawt.jar - jogl.all-mobile.jar -> jogl-all-mobile.jar - jogl.all-android.jar -> jogl-all-android.jar - jogl.all-android.apk -> jogl-all-android.apk Atomic JARs: - nativewindow.core.jar -> nativewindow-core.jar - nativewindow.awt.jar -> nativewindow-awt.jar - nativewindow.os.x11.jar -> nativewindow-os-x11.jar - nativewindow.os.win.jar -> nativewindow-os-win.jar - nativewindow.os.macosx.jar -> nativewindow-os-osx.jar - jogl.core.jar -> jogl-core.jar - jogl.sdk.jar -> jogl-sdk.jar - jogl.glmobile.jar -> jogl-glmobile.jar - jogl.glmobile.dbg.jar -> jogl-glmobile-dbg.jar - jogl.util.jar -> jogl-util.jar - jogl.glutess.jar -> jogl-glutess.jar - jogl.glumipmap.jar -> jogl-glumipmap.jar - jogl.util.fixedfuncemu.jar -> jogl-util-fixedfuncemu.jar - jogl.awt.jar -> jogl-awt.jar - jogl.swt.jar -> jogl-swt.jar - jogl.util.awt.jar -> jogl-util-awt.jar - jogl.os.x11.jar -> jogl-os-x11.jar - jogl.os.win.jar -> jogl-os-win.jar - jogl.os.osx.jar -> jogl-os-osx.jar - jogl.os.android.jar -> jogl-os-android.jar - jogl.gldesktop.jar -> jogl-gldesktop.jar - jogl.gldesktop.dbg.jar -> jogl-gldesktop-dbg.jar - jogl.glugldesktop.jar -> jogl-glu-gldesktop.jar - jogl.util.gldesktop.jar -> jogl-util-gldesktop.jar - jogl.omx.jar -> jogl-omx.jar - jogl.cg.jar -> jogl-cg.jar - newt.core.jar -> newt-core.jar - newt.ogl.jar -> newt-ogl.jar - newt.awt.jar -> newt-awt.jar - newt.event.jar -> newt-event.jar - newt.driver.x11.jar -> newt-driver-x11.jar - newt.driver.win.jar -> newt-driver-win.jar - newt.driver.macosx.jar -> newt-driver-osx.jar - newt.driver.android.jar -> newt-driver-android.jar - newt.driver.kd.jar -> newt-driver-kd.jar - newt.driver.intelgdl.jar -> newt-driver-intelgdl.jar - newt.driver.broadcomegl.jar -> newt-driver-broadcomegl.jar Test JARs: - jogl.test.jar -> jogl-test.jar - jogl.test-android.jar -> jogl-test-android.jar - jogl.test-android.apk -> jogl-test-android.apk
* JOGL CapabilitiesChooser-API and impl.: Cleanup using generics: 'List l' -> ↵Sven Gothel2012-06-2110-43/+51
| | | | 'List<? extends CapabilitiesImmutable> l'
* TextureIO TGA/PNG: Use RGB[9] for 1-3 channel data; PNGImage(PNGJ) add 1 ↵Sven Gothel2012-06-184-35/+65
| | | | channel (Luminance) read/write
* Texture Unit Tests: AWT/NEWT GL2/ES2 PNGJ/AWT-PNG-Loading and Rendering ↵Sven Gothel2012-06-181-1/+1
| | | | | | | | | | | | | | (TestPNGTextureFromFile[AWT/NEWT]) Properly test combinations of TextureIO usage w/ - NEWT / AWT usage - GL2 / ES2 usage - PNG implementations: PNGJ (internal) and AWT - adding screenshots of result for later analysis Misc: - IOUtil.getResource(..) usage CLASS.class.getClassLoader() -> this.getClass().getClassLoader()
* Fix Bug 590: Wrong GL2 and GLES2 aliasing of ↵Sven Gothel2012-06-161-0/+2
| | | | | | | | | | | | | | | | GL_ARB_half_float_pixel/GL_ARB_half_float_vertex and GL_OES_texture_half_float extensions We mistakenly aliase the GL2 and GLES2 extensions: - GL_ARB_half_float_pixel - GL_HALF_FLOAT_ARB 0x140B - GL_ARB_half_float_vertex - GL_HALF_FLOAT 0x140B - GL_OES_texture_half_float extensions - GL_HALF_FLOAT_OES 0x8D61 This also leads to adding GL_HALF_FLOAT_OES to com.jogamp.opengl.util.GLBuffers.sizeof(..).
* Adapt to GlueGen commit 1468286bf569a493e4fdb887d5f3732f88c8cec3 ↵Sven Gothel2012-06-161-1/+1
| | | | (IOUtil.createTempFile(..) change)
* Java Source Files: dos -> unix formatSven Gothel2012-05-157-1878/+1878
|
* Clarify API Doc: GLRunnable and it's GLAutoDrawable::invoke(..)Sven Gothel2012-05-152-16/+25
|
* graph/font: Add "public float getAdvanceWidth(int i, float pixelSize);"Sven Gothel2012-05-153-1/+7
| | | | | Font::getAdvancedWidth(..) allows applications to query a glyphs width with a given pixel size, as it is being used for rendering.
* Graph/Glyph: Clarify public Font.Glyph and private FontInt.GlyphIntSven Gothel2012-05-154-11/+13
|
* GLContext.destroy() error case: Lock hold > 1 - More explicit error message.Sven Gothel2012-05-141-2/+2
|
* Fix Bug 572: AWT-GLCanvas shall force setRealized(true) on AWT-EDT avoiding ↵Sven Gothel2012-05-141-3/+8
| | | | AWTTree deadlock
* GLContext*: Remove '[set/is]Synchronized(..)' - Defaults to wait for locks: ↵Sven Gothel2012-05-139-89/+49
| | | | | | | | | | | | | | | | | | | | | | | | 1. Drawable, 2. GLContext Remove deadlock situation where thread-1 (Animator Thread) holds the GLContext-Lock and acquires the Surface-Lock, while thread-2 (UI/Main/EDT) holds the Surface-Lock and attempts to create the GLContext and hence acquires the GLContext-Lock. A GLContext-Lock and hence makeing the GLContext current requires to hold the Surface-Lock. The prev. code acquired the locks in reverse order and allowed the deadlock as described above. This fix acquires the locks in the proper natural order 1 - Surface-Lock 2 - GLContext-Lock This fix also renders the use of the non-synchronized behavior invalid, since it is bogus not to wait for the GLContext lock where it waits for the Surface lock. It also seems nonsense not to wait for any of both locks and our code always waited for both (synchronized := true). The GLContext [set/is]Synchronized(..) methods are removed and waiting for the lock per default is the correct behavior.
* Fix regression of commit de2b129a56335262a44a05541a3ab2e35668cc6e: ↵Sven Gothel2012-05-112-40/+45
| | | | | | | | | | | | | | | ProjectFloat Matrix Multiplication of gluUnProject(..) impl. ProjectFloat's previous gluMultMatricesf(..) used row-major order, but the replacement multMatrixf(..) uses column-major order (like OpenGL, ..). Note: The replaced 'gluMultMatrixVecf' by multMatrixVecf() already used column-major order. Fix: Reverse the arguments of matrix multiplication m1 x m2 -> m2 x m1 Added proper API documentation in FloatUtil -> Column Major Order of Linear Matrix Layout
* NEWT API Change 'WindowClosingProtocol': Use 'enum WindowClosingMode' ↵Sven Gothel2012-05-022-4/+6
| | | | instead of static final int values.
* GLProfile/EGLDrawableFactory: Detect ANGLE (Windows D3D ES2 Emulation) and ↵Sven Gothel2012-05-012-22/+71
| | | | | | | | | | | | | disable support per default. We have to disable support for ANGLE, the D3D ES2 emulation on Windows provided w/ Firefox and Chrome. When run in the mentioned browsers, the eglInitialize(..) implementation crashes. This behavior can be overridden by explicitly enabling ANGLE on Windows by setting the property 'jogl.enable.ANGLE'. EGLDrawableFactory: - destroy(): clear references and unregister factory, maybe triggered by GLProfile (ANGLE case) - getAvailableCapabilitiesImpl(): return empty list in case EGL/ES is n/a (ANGLE case)
* EGLGraphicsConfigurationFactory: Add 'unregisterFactory()' static entry ↵Sven Gothel2012-05-011-1/+16
| | | | allowing to remove EGL/ES based factory
* Completing swap-interval implementation for OSX's CALayer usage. Closing Bug 555Sven Gothel2012-04-221-13/+12
| | | | | | | | | | | | - Based on Andres Colubri's initiative and commit 218d67fc0222d7709b21c45792d44501351939c4. - Reading real screen refresh rate ('stolen' from NEWT) - Properly handling swap-interval and vsync-to in native code - Increasing accuracy vsync-to to microseconds Tested manually w/ TestGearsES2AWT.
* Recognize swap-interval in NSOpenGLLayer modeAndres Colubri2012-04-221-2/+12
|
* FFMPEGDynamicLibraryBundleInfo: Adding notes ..Sven Gothel2012-04-211-0/+5
|
* FFMPEGMediaPlayer: Fix NPE; Add remarks about binary incompatibility in ↵Sven Gothel2012-04-211-1/+9
| | | | | | | | | | | upcoming version (master branch) We need native structure access methods to deal with API changes in the libav headers, which break binary compatibility! Currently we are binary compatible w/ [0.6 ?, ] 0.7 and 0.8 but not w/ trunk. Tested: Linux, Windows and OSX (self compiled binary)
* Core/Animator: Force animator thread to be non-daemon.Sven Gothel2012-04-211-0/+5
| | | | | Even thought we didn't set the thread to be a daemon, if the [parent] thread instantiating the Animator the attribute would be passed along.
* FFmpeg Dyn. Symbol Validation: Proper check for alternative symbols where ↵Sven Gothel2012-04-211-25/+63
| | | | one of a set must be available.
* GLMediaPlayer: Add Class / Package API doc incl. detailed info in the ↵Sven Gothel2012-04-186-5/+122
| | | | implementations.
* Adding initial Libav/FFMpeg GLMediaPlayer implementationSven Gothel2012-04-161-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Java classes already slipped through in commit 10935e1ec0d8ed677bc3fddfaa8cd73898a3bcbf - oops. Since we cannot provide a Libav binary (even though Google does in Android and Chrome) due to legal uncertainities .. we dynamically link to an existing Libav / FFmpeg library in a 'relaxed' manner. Ie. we allow certain recent functions to be absent to be able to run on a wider range of Libav versions. Currently tested on Debian Linux and Windows7 64bit/32bit Binaries for Win/OSX: - Windows http://ffmpeg.zeranoe.com/builds/ - OSX http://www.ffmpegx.com/ Features: - Dynamic relaxed linking to Libav (see above) - YUV420P texture lookup function shader stub (conversion to RGB) - 1-copy only (decoder buffer to texture) - simple - uses libavformat's network streaming - fixes some odd PTS values TODO: - Audio output (Should use OpenAL, duh) - Seek works poorly - Offthread multi-texture fetching for smoother animation - Maybe more pixelformat conversions
* TextureSequence Shader Support; GLMediaPlayer uses 'int' where possible; ↵Sven Gothel2012-04-167-194/+517
| | | | | | | | | | | | | General enhancments. For details about TextureSequence/GLMediaPlayer shader collaboration w/ your own shader source, see TextureSequence and TexCubeES2 / MovieSimple demo. TextureSequence allows implementations to provide their own texture lookup function which may provide color space conversion (YUV) .. or other runtime hw-accel features. Have a look at the next commit, which provides an Libav/FFMpeg implementation w/ YUV/RGB shader conversion. MovieCube adds keyboard control (Android: firm touch on display to launch keyboard, don't break it though :)
* ShaderCode: Adding 'replaceInShaderSource a -> b utility functionSven Gothel2012-04-161-1/+55
|
* Add native tests for libav/ffmpeg and gstSven Gothel2012-04-162-0/+722
|
* API Change ShaderCode/ShaderUtil: Enable optional mutable shader source / ↵Sven Gothel2012-04-165-79/+230
| | | | | | | | | | | | | | | | | | | | | | generalize shader source storage type to CharSequence[] Benefits: - Allows code injection and general shader source editing (before compilation) - Uses mutable StringBuilder only if editing is intended, hence reduces memory footprint and String conversion at compilation in such case. - ShaderCode.create(..) factory methods add nw attribute 'mutableStringBuilder' if true method returns a mutable StringBuilder instance which can be edited later on at the costs of a String conversion when passing to 'glShaderSource(int, int, String[], IntBuffer)'. If <code>false</code> method returns an immutable <code>String</code> instance, which can be passed to {@link GL2ES2#glShaderSource(int, int, String[], IntBuffer)} at no additional costs. - New 'edit' methods in ShaderCode: ' - int insertShaderSource(int shaderIdx, String tag, int fromIndex, CharSequence data); - int insertShaderSource(int shaderIdx, int position, CharSequence data);
* StringBuffer -> StringBuilder (Local objects, no concurrency) ; Impacts: ↵Sven Gothel2012-04-1653-89/+87
| | | | Capabilities/GLContext API 'toString(StringBuilder)'
* Reloc OMXGLMediaPlayer jogamp.opengl.omx -> jogamp.opengl.util.av.implSven Gothel2012-04-121-5/+1
|
* Refine API docSven Gothel2012-04-113-11/+12
|
* ShaderState: No exception in 'releaseAllAttributes()' if attribute is n/aSven Gothel2012-04-111-6/+2
|
* Refine GLMediaPlayer/TextureSequence, add MovieCube demo, fix minor bug in ↵Sven Gothel2012-04-1111-173/+198
| | | | | | | | | | | | | | | | | | | | Texture - Add TextureSequence, base interface of GLMediaPlayer to genralize texture streams - TextureSequence / GLMediaPlayer: Use inner classes for event and texture data - getLastTexture() shall never return 'null', initialization of TextureSequence (initGLStream(..), etc) shall provide a TextureFrame w/ the stream's dimension. - GLMediaPlayerImpl.createTexImageImpl() y-flip defaults to 'false' impl. shall define y-flip, if required. - Added MovieCube demo - Fix Texture: initialize aspectRation for 'wrapping' ctor -
* GLArrayData: Fix 'growBuffer()' / clarify 'initialSize' -> 'initialElementCount'Sven Gothel2012-04-117-104/+120
| | | | | - growBuffer() was using '(osize+additional) * components' -> 'osize + (additional * components )' - added jogl.debug.GLArrayData - notifying growBuffer()
* Move com.jogamp.opengl.av -> com.jogamp.opengl.util.av (it's in the util ↵Sven Gothel2012-04-116-0/+0
| | | | atomic JAR and not core)