summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl
Commit message (Collapse)AuthorAgeFilesLines
* GLMediaPlayer: Add multithreaded decoding w/ textureCount > 2 where ↵Sven Gothel2013-08-108-466/+666
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | available EGL/FFMPeg. WIP! Off-thread decoding: If validated (impl) textureCount > 2, decoding happens on extra thread. If decoding requires GL context, a shared context is created for decoding thread. API Changes: - initGLStream(..): Adds 'textureCount' as argument. - TextureSequence.TexSeqEventListener.newFrameAvailable(..) exposes the new frame available - TextureSequence.TextureFrame exposes the PTS (video) Implementation: - 'int validateTextureCount(int)': implementation decides whether textureCount can be > 2, i.e. off-thread decoding allowed, default is NO w/ textureCount==2! - 'boolean requiresOffthreadGLCtx()': implementation decides whether shared context is required for off-thread decoding - 'syncFrame2Audio(TextureFrame frame)': implementation shall handle a/v sync, due to audio stream details (pts, buffered frames) - FFMPEGMediaPlayer extends GLMediaPlayerImpl, no more EGLMediaPlayerImpl (redundant) +++ - SyncedRingbuffer: Expose T[] array +++ TODO: - syncAV! - test Android
* GLFBODrawableImpl.initialize(): Unrealize when already unrealized shall not ↵Sven Gothel2013-08-101-1/+8
| | | | throw an exception - only dump DEBUG info!
* GLDrawableFactory: Expose createDummyDrawable(..) / GLDrawableFactoryImpl: ↵Sven Gothel2013-08-101-10/+29
| | | | | | Make impl. methods final. createDummyDrawable(..) is useful for efficient shared context w/o actually rendering to this dummy drawable's framebuffer
* GLContext: Refine API doc (CONTEXT_NOT_CURRENT.. values) / Exception messageSven Gothel2013-08-101-2/+2
|
* FFMPEGMediaPlayer: Cleanup AudioPusher 'usage', i.e. disabled for now ↵Sven Gothel2013-07-201-64/+71
| | | | (subject to be removed).
* FFMPEGMediaPlayer: Fix yuv stored in alpha shader decode on ES2 and GL2Xerxes Rånby2013-07-201-8/+11
| | | | | Regression introduced by: dba2faf8520a43a809eb756869c6c97a0a2ef2cd
* FFMPEGPlayer Audio Sink Refactoring ..Sven Gothel2013-07-198-277/+926
| | | | | | | | | | | | | | | | - AudioSink w/ AudioFrame and formats public - ALAudioSink uses a circular buffer now, hence relaxes the one-threaded player mode - FFMPEGMediaPlayer uses multiple audio frames (equal to the ALAudioSink number) and wraps data to NIO buffer w/o copy. - FFMPEGMediaPlayer audio threading currently disabled: distorted sound Seems that the ALAudioSink's circular buffer usage is good enough for now. - Verbosity only w/ DEBUG flag - New SyncedRingbuffer for effcient synced buffering
* Merge remote-tracking branch 'xranby/FFMPEGMediaPlayer'Sven Gothel2013-07-176-14/+427
|\
| * ALAudioSink: Reduce exessive CPU usage caused by polling alGetSourcei.Xerxes Rånby2013-07-161-0/+8
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * FFMPEGMediaPlayer: Only instance ALAudioSink if JOAL is found on the classpath.Xerxes Rånby2013-07-161-7/+15
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * AudioSink: interface add isAudioSinkAvailableXerxes Rånby2013-06-245-6/+16
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * ALAudioSink: Fill buffers before sourcing them.Xerxes Rånby2013-06-241-1/+0
| | | | | | | | | | | | Fixes OpenAL invalid argument error when trying to fill buffers. Signed-off-by: Xerxes Rånby <[email protected]>
| * Merge remote-tracking branch 'xranby-github/FFMPEGMediaPlayer'Xerxes Rånby2013-06-246-14/+402
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java Signed-off-by: Xerxes Rånby <[email protected]>
| | * ALAudioSink: Buffer and playback audio data.Xerxes Rånby2013-06-201-22/+80
| | | | | | | | | | | | | | | | | | | | | There is still something wrong with the buffering part; OpenAL will complain at runtime. Signed-off-by: Xerxes Rånby <[email protected]>
| | * FFMPEGMediaPlayer: Add AudioSink interface.Xerxes Rånby2013-06-195-55/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use ALAudioSink when available and fallback to JavaSoundAudioSink when JOAL are not found on classpath. Java Sound playback moved from FFMPEGMediaPlayer into JavaSoundAudioSink. Signed-off-by: Xerxes Rånby <[email protected]>
| | * Merge remote-tracking branch 'xranby/github/FFMPEGMediaPlayer-audio' into ↵Xerxes Rånby2013-06-192-13/+163
| | |\ | | | | | | | | | | | | FFMPEGMediaPlayer
| | | * FFMPEGMediaPlayer: Limit video sync delay to 47ms in order to fix audio ↵Xerxes Rånby2013-05-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | buffer underrun. Signed-off-by: Xerxes Rånby <[email protected]>
| | | * FFMPEGMediaPlayer: Poor mans audio/video sync.Xerxes Rånby2013-05-121-12/+98
| | | | | | | | | | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| | | * FFMPEGMediaPlayer: blocking Java Sound outputXerxes Rånby2013-05-101-16/+17
| | | |
| | | * partial implementation of Java Sound outputXerxes Rånby2013-05-101-0/+51
| | | |
| | | * FFMPEGMediaPlayer: Add updateSound callback for passing decoded jni audio ↵Xerxes Rånby2013-05-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | frames to java. Signed-off-by: Xerxes Rånby <[email protected]>
| | | * FFMPEGMediaPlayer: Workaround forward seek delay caused by video sync.Xerxes Rånby2013-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Prevent the video sync code to delay a frame more than 1 second. Signed-off-by: Xerxes Rånby <[email protected]>
| | | * FFMPEGMediaPlayer: Workaround dropped video frames while decoding audio.Xerxes Rånby2013-05-101-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A temporal solution before we implement video decode and frame cache in a separate thread. Signed-off-by: Xerxes Rånby <[email protected]>
| | | * FFMPEGMediaPlayer: Lookup decoded audio data_size using ↵Xerxes Rånby2013-05-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | av_samples_get_buffer_size Signed-off-by: Xerxes Rånby <[email protected]>
* | | | Remedy for Bug 782: Issue Debug.initSingleton() or Debug.debug(..) before ↵Sven Gothel2013-07-179-12/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | calling 'PropertyAccess.isPropertyDefined(propName, default)' through Debug class. Calling 'Debug.isPropertyDefined(propName, default)' may be 'optimized' to 'PropertyAccess.isPropertyDefined(propName, default)', which would skip the modules Debug's class initialization. Iff that happens, an AccessControlException may happen, due to requesting an insecure property, since modules own Debug class has not been added it's trusted prefixes from within it's init block yet. This seems to be a bug of the JVM .. to me, however .. the above description is the only able to explain the issue at hand. +++ Fix calls Debug class own static methods, either Debug.initSingleton() or Debug.debug(), before calling 'isPropertyDefined(propName, default)'. +++ Also mark Debug class static methods final! +++
* | | | X11GLXContext: Remove redundant manual aliasing of ext. names in ↵Sven Gothel2013-07-171-10/+0
| | | | | | | | | | | | | | | | isExtensionAvailable() - impl. uses a mapping.
* | | | Fix OSX GL-core lack of pbuffer: GLDrawableFactory.canCreateGLPbuffer(..) ↵Sven Gothel2013-07-178-21/+17
| | | | | | | | | | | | | | | | | | | | | | | | add GLProfile argument, similar to canCreateFBO(..) In case a compatible non-core profile is requests, canCreateGLPbuffer(..) returns false on OSX.
* | | | Redefine: isGLES3Compatible() and isGL4ES3(), i.e. allow GL4ES3 usage in ↵Sven Gothel2013-07-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | case proper ES3_compat is given. isGLES3Compatible() and isGL4ES3() of GLBase _and_ GLContext includes [ GL >= 4.3, GL >= 3.1 w/ GL_ARB_ES3_compatibility and GLES3 ]. Tested GL 'aliasing' w/ TestGLProfile01NEWT, i.e. isGL*() and getGL*().
* | | | Fix FFMPEGMediaPlayer: Only use RED for GL3ES3 profiles, otherwise stick w/ ↵Sven Gothel2013-07-161-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | ALPHA (regression of e92e561df9673ce77783d6fa3815a942a39a53c0) GLES2 does not and GL2 may not support RED!
* | | | FFMPEGMediaPlayer: Use GL_RED instead of deprecated GL_ALPHA, otherwise ↵Sven Gothel2013-07-161-6/+6
| | | | | | | | | | | | | | | | won't work w/ core >= GL3 profiles
* | | | Fix BuildComposablePipeline's isGL*/getGL* ; GLBase: ↵Sven Gothel2013-07-151-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getDownstreamGL()/getRootGL(); GLContext.isGL* added proper API doc., isGL3core()/hasNoDefaultVAO() and getDefaultVAO(). - Fix BuildComposablePipeline's isGL*/getGL* (regression of commit 3a0d7703da32e9a5ddf08a334f18588a78038d880) - GLBase: getDownstreamGL()/getRootGL() Allows user traversing through pipelined GL instances. Also added getRootGL() to GLContext. - GLContext.isGL* added proper API doc.: We test the actual context, not the profile. - GLContext isGL3core()/hasNoDefaultVAO() and getDefaultVAO() - Move isGL3code() def. back to pre 3a0d7703da32e9a5ddf08a334f18588a78038d880, i.e. Includes [ GL4, GL3 ] w/o GLES3. - Added hasNoDefaultVAO() and getDefaultVAO() .. incl. [ GL4, GL3, GLES3 ]
* | | | StringBuffer -> StringBuilderSven Gothel2013-07-151-2/+2
| | | |
* | | | Add Support for GL 4.3 (Bug 716) and ES 3.0 (Bug 717)Sven Gothel2013-07-1511-110/+272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ES3 / GL4.3: - Update all EGL, GLX, WGL and GL (desktop and mobile) khronos headers to latest version. - GL3/gl3* -> GL/glcorearb* - Explicitly preserve ES2_compatibility and ES3_compatibility in header, most extension grouping was removed in new headers. - Always load all GLHeader to ensure proper extension association across all profiles. - Unified method signatures - Added GL_EXT_map_buffer_range to core - Using common 'glMapBufferImpl(..)' for all glMapBuffer(..) and glMapBufferRange(..) impl. - Init necessary fields of GL instances via 'finalizeInit()' called by reflection, if exist. This allows removing initialization checks, i.e. for all buffer validations. - BuildStaticGLInfo: Can handle new GL header structure, i.e. one CPP extenstion block incl. define + funcs. - GLJavaMethodBindingEmitter: Simply print the - No GL duplication due to new intermediate interfaces, see below - OO lineare inheritance (Added GL2ES3, GL3ES3 and GL4ES3 intemediates): GLBase - GL - GL2ES2 - GLES2 GLBase - GL - GL2ES2 - GL2GL3 - [ GL2, GL3 ] GLBase - GL - GL2ES2 - GL2ES3 - GL3ES3 - [ GL3 ] GLBase - GL - GL2ES2 - GL2ES3 - GL3ES3 - GL4ES3 - [ GLES3, GL4, .. ] - Expose 'usable' intermediate interfaces GL3ES3 and GL4ES3 in GLBase/GLProfile/GLContext via is*() and get*(). - GLContext*: - isGL3core() is true if [ GL4, GL3, GLES3 ] (added GLES3) - Added ctxProfile argument to allow handling ES versions: - getMaxMajor(..), getMaxMinor(..), isValidGLVersion(..) and decrementGLVersion(..) - mapGLVersions(..) prepared for ES ARB/KHR validation - EGLContext checks ES3 (via old ctx's GL_VERSION) - ExtensionAvailabilityCache adds GL_ES_Version_X_Y for ES. - Prelim tests w/ Mesa 9.1.3 GL Version 3.0 (ES profile, ES2 compat, ES3 compat, FBO, hardware) - OpenGL ES 3.0 Mesa 9.1.3 [GL 3.0.0, vendor 9.1.3 (Mesa 9.1.3)] - TODO: - Use KHR_create_context in EGLContext.createContextARBImpl(..) - More tests (Mobile, ..) +++ Misc: - GLContext*: - Complete glAllocateMemoryNV w/ glFreeMemoryNV.
* | | | PNGJ: Bump to git sha1 a0b1101ba2d37de39428ed55c8189502e24a3125 of ↵Sven Gothel2013-07-093-1336/+1438
| | | | | | | | | | | | | | | | | | | | | | | | https://code.google.com/p/pngj Part 2/2 - Started w/ 51427b92a2d9cd3fc619854e26536c9c6adad947 Missed rejected patches ..
* | | | NEWT: Using WeakReferences for global cache of Display, Screen and Window ↵Sven Gothel2013-07-041-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instances; Removing ref. at API destroy() is wrong ; Allow GC to clear .. - Removing ref. at API destroy() is wrong - Since all instances can be recreated, removing ref at destroy() is simply wrong. - Keep weak references until GC collects, i.e. user does not claim them anymore. - Safe for Display, since it holds it's EDT thread. - Window/Screen .. if user abandons reference .. nothing we can do here. - Allow GC to clear .. No need to hold ref loonger than user.
* | | | Remove deprecated methods.Sven Gothel2013-07-041-18/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Quaternion.isEmpty() - Texture.dispose(GL) - GLContext.getGLVersionMajor() / ..Minor() - GLContextImpl.bindPbufferToTexture() / releasePbufferFromTexture() - MouseEvent.getWheelRotation() -
* | | | Remove redundant check around Mesa quirk (that check has already occurred ↵Mark Raynsford2013-07-031-9/+6
| | | | | | | | | | | | | | | | via isDriverMesa)
* | | | Merge branch 'master' of ssh://jogamp.org/srv/scm/jogl into markMark Raynsford2013-07-0322-161/+267
|\ \ \ \
| * | | | GLContext: Rename 2-digit VersionNumber statics aligning w/ all 3-digit ↵Sven Gothel2013-07-032-4/+4
| | | | | | | | | | | | | | | | | | | | names, e.g. Version31 -> Version310. ; Trim GLVersionNumber string.
| * | | | PNGJ: Bump to git sha1 a0b1101ba2d37de39428ed55c8189502e24a3125 of ↵Sven Gothel2013-07-0220-157/+263
| |/ / / | | | | | | | | | | | | https://code.google.com/p/pngj/
* / / / Bug 759:Mark Raynsford2013-07-021-3/+3
|/ / / | | | | | | | | | | | | | | | | | | Currently, the compatibility context on Mesa >= 9.1.3 seems to be very broken. The core contexts, however, seem to be quite stable. This commit both reduces and widens the scope of the current Mesa quirk to include only Compatibility contexts on OpenGL > 3 || 3.n where n >= 1.
* | | Fix Regression of 889ba9488ca07b59fdcc378642a2dc20676d69a3: ↵Sven Gothel2013-06-231-1/+2
| | | | | | | | | | | | GLDebugMessageHandler GL Profile criteria for availability is wrong
* | | Fix Bug 761 (part 1/2): Move GLDrawableFactory.shutdownHook -> ↵Sven Gothel2013-06-231-36/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NativeWindowFactory.shutdownHook, the latter handles customShutdownHooks for NativeWindow, JOGL and NEWT. Unifying our shutdown mechanism is required to provide a controlled shutdown sequence. NativeWindowFactory is chosen to be the new central entry point, since it is the lowest denominator (common module). - Move GLDrawableFactory.shutdownHook -> NativeWindowFactory.shutdownHook Reverse the shutdown dependency for clarity and availability to all modules, i.e. NEWT may not know about JOGL. Remove the 'gamma' shutdown hook, instead simply call GLDrawableFactoryImpl.resetDisplayGamma() before destroy. NativeWindowFactory.shutdownHook handles customShutdownHooks for NativeWindow, JOGL and NEWT - Modules can register their shutdown runnable at head or tail of list. - Allows controlled shutdown across all modules.
* | | Fix Bug 759: Add quirk GLNonCompliant for Mesa AMD GL >= 3.1 renderer.Juan Camilo Prada2013-06-211-2/+6
| | |
* | | GL*ProcAddressTable: Fix regressions: getField(..) -> getDeclaredField(..), ↵Sven Gothel2013-06-213-18/+17
| | | | | | | | | | | | incl. access check; Move getAddressFor() from ctx -> private dbg-handler (sec); FFMPEGMediaPlayer: Missed fetching func-ptr 'glTexSubImage2D'.
* | | Security: Apply security changes from GlueGenSven Gothel2013-06-2119-106/+161
|/ / | | | | | | | | | | | | | | | | GlueGen related commits - 23341a2df2d2ea36784a16fa1db8bc7385351a12 - 2d8e25398e929f553c4524e9c57f083d90ba4e08 - 8cabcd2de8b46c42dffcaaf46ccc2dc4d092ebba - f69831574d4927d03d40c330d0b047d8c89622a4 - eb842815498f5926828b49c48fffce22fc9586a2
* | Add optional JOAL dependency, enabling JOAL usage for our 'av' package. ↵Sven Gothel2013-06-181-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: May be relocated to external project later! Assumption: gluegen/ joal/ jogl/ For OpenAL / JOAL code: - use the package jogamp.opengl.openal (like jogamp.opengl.android) - will be build _before_ the other 2nd pass java files - do not expose OpenAL/JOAL APIs, if being used by other packages, since only this package is being compiled w/ JOAL jar files!
* | GLDynamicLibraryBundleInfo.shallLinkGlobal(): Defaults to 'true' now, ↵Sven Gothel2013-06-184-34/+19
| | | | | | | | | | | | | | | | allowing to remove specialized values. - Windows always used global - The OpenGL library is always available by all processes system wide. - Tested on OSX (was using local, previously).
* | Fix Bug 735: GLAutoDrawable must issue glViewport(..) even w/o ↵Sven Gothel2013-06-171-14/+21
| | | | | | | | | | | | | | | | | | | | | | GLEventListener ; Optimize GLDrawableHelper's glViewportCall(..) GLAutoDrawable must issue glViewport(..) even w/o GLEventListener - Same behavior w/ or w/o GLEventListener requires to issue glViewport, always. Optimize GLDrawableHelper's glViewportCall(..) - 'private void init(..)' receives 'setViewport' argument to be passed to 'private void reshape(..)' allowing to only the the viewport once @ 'public void init(..)' and display.
* | Fix Bug 753: Stuttering caused by lack of GL resource synchronization ↵Sven Gothel2013-06-171-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | between Java GL- and CALayer thread ; Simplify / Fix waitUntilRenderSignal(). Stuttering caused by lack of GL resource synchronization between Java GL- and CALayer thread + // Required(?) to finish previous GL rendering to give CALayer proper result, + // i.e. synchronize both threads each w/ their GLContext sharing same resources. + // + // FIXME: IMHO this synchronization should be implicitly performed via 'CGL.flushBuffer(contextHandle)' above, + // in case this will be determined a driver bug - use a QUIRK entry in GLRendererQuirks! + gl.glFinish(); Simplify / Fix waitUntilRenderSignal() - remove loop and 'ready' condition -> nonsense - if too later, i.e. lastWaitTime+TO < now, use now+TO as max. vsync waiting time Bug735 Tests: - Make vsync, wait and ECT (exclusive context thread) configurable via main args. - Inv2*, Inv3* and Inv4*: Fluent Animation - Works w/ ECT