aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/util
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1021: Refine Stereo API; Fix GenericStereoDevice; Fix StereoDemo01 for ↵Sven Gothel2014-08-072-21/+31
| | | | | | | | | | | | | | | | | | | | movie playback and OSX usage (HiDPI surfaceSize) - StereoDevice.DeviceType: Add API doc - StereoDevice: Add getFactory() - GenericStereoDevice - Use common static vars for configurations for simplicity - Fix createRenderer(..)'s eyeViewport in case no post-processing is performed, i.e. needs viewport X offset. - StereoDemo01 - Use 'movie' eyePosition instead of default if: - using a movie player _and_ using lenses! - Fix NEWT window pixel-unit size after window creation!
* FixedFuncHook: Use downstream gl.getGLProfile().getImpl() for custom GL2ES1 ↵Sven Gothel2014-07-291-2/+2
| | | | impl. profile, reflecting true implementing profile.
* BuildComposablePipeline: Handle synthetic isGL* and getGL* more generic, ↵Sven Gothel2014-07-291-0/+22
| | | | | | | | | | | | | | | | | allow FixedFunctionHook to properly determine it's identity BuildComposablePipeline: Handle synthetic isGL* and getGL* more generic, allow using a prologue hook as needed for FixedFunctionHook's 'isGL*core()', 'isGLES*Compatible()' and 'getGLProfile()' methods. The latter FixedFunctionHook take the emulated GL profile GL2ES1 into account, allowing JOGL code to assume only having GL2ES1 available. Otherwise methods like Texture.enable(..) would skip the glEnable(TEXTURE_2D) call and FixedFunctionHook could not enable it's usage. GLProfile received a 'public static GLProfile createCustomGLProfile(final String profile, final GLProfile profileImpl)' allowing utilities like FixedFunctionHook to create a generic profile. BuildComposablePipeline sorts the methods before emitting for better readability.
* Bug 1031: Remove Deprecated Classes and Methods (JOGL)Sven Gothel2014-07-102-19/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed Deprecated Class: - com/jogamp/opengl/util/TGAWriter.java - Use TextureIO w/ .tga suffix - com/jogamp/opengl/util/awt/Screenshot.java - Use: - com.jogamp.opengl.util.GLReadBufferUtil, or - com.jogamp.opengl.util.awt.AWTGLReadBufferUtil The latter for reading into AWT BufferedImage See: TestBug461FBOSupersamplingSwingAWT, TestBug605FlippedImageAWT - javax/media/opengl/GLPbuffer.java - Use: caps.setPBuffer(true); final GLAutoDrawable pbuffer = GLDrawableFactory.getFactory( caps.getGLProfile() ).createOffscreenAutoDrawable(null, caps, null, 512, 512); - See: TestPBufferDeadlockAWT, .. Removed Deprecated Methods: - Constructor of AWT-GLCanvas, SWT-GLCanvas, AWT-GLJPanel with argument 'final GLContext shareWith' See GLSharedContextSetter, i.e. glCanvas.setSharedContext(..) ! - GLDrawableFactory.createOffscreenAutoDrawable(..) with argument 'final GLContext shareWith' See GLSharedContextSetter, i.e. offscreenAutoDrawable.setSharedContext(..) ! - GLDrawableFactory.createGLPbuffer(..), see above! - com.jogamp.opengl.util.av.AudioSink 'enqueueData(AudioDataFrame audioDataFrame)', use 'enqueueData(int, ByteBuffer, int)' - GLSharedContextSetter.areAllGLEventListenerInitialized(), migrated to GLAutoDrawable ! - GLBase's - glGetBoundBuffer(int), use getBoundBuffer(int) - glGetBufferSize(int), use getBufferStorage(int).getSize() - glIsVBOArrayBound(), use isVBOArrayBound() - glIsVBOElementArrayBound(), use isVBOElementArrayBound() - NEWT MouseEvent.BUTTON_NUMBER, use BUTTON_COUNT
* StereoDevice: Don't make inner class's method private due to wrapper ↵Sven Gothel2014-07-081-1/+1
| | | | generation (still, findbugs didn't report this)
* Findbugs: Use inner static class where possibleSven Gothel2014-07-081-7/+7
|
* Findbugs: Misc minor issues (see below)Sven Gothel2014-07-081-7/+7
| | | | | | | - remove duplicate code in branch - Use Type.valueOf(primitive) - Don't use array.toString() directly - remove dead code
* Findbugs: Remove branches where reference cannot be nullSven Gothel2014-07-081-13/+11
|
* Findbugs: Use Integer.parseInt(string) for int values to avoid boxing and ↵Sven Gothel2014-07-081-1/+1
| | | | unboxing
* Findbugs.static_final_immutable: Use final qualifier for static immutable ↵Sven Gothel2014-07-081-3/+3
| | | | instances.
* GenericStereoDevice: Cast to float before operating division, requesting ↵Sven Gothel2014-07-081-3/+4
| | | | float. Base aspect-ratio on eyeTextureSize
* Findbugs.increment_volatile: Use AtomicInteger or add comment that operation ↵Sven Gothel2014-07-081-1/+1
| | | | is safe!
* Bug 1021: Add GenericStereoDevice* Supporting custom configurations; Hook-in ↵Sven Gothel2014-07-0711-0/+1524
| | | | | | | | | | | | | | | | | | | | | | oculusvr-sdk java distortion-mesh calculation if available StereoDeviceFactory support new GenericStereoDeviceFactory, with it's GenericStereoDevice and GenericStereoDeviceRenderer. GenericStereoDevice maintains different configurations, triggered either by passing a GenericStereoDevice.Config instance directly or by the device-index parameter: - 0: monoscopi device: No post-processing - 1: stereoscopic device SBS: No post-processing - 2: stereoscopic device SBS + Lenses: Distortion post-processing (only available w/ oculusvr-sdk sub-module) Producing a 'GenericStereoDevice.Config' instance is self containing and may extend if supporting more device types like top-bottom, interlaced etc. StereoDemo01 handles all use-cases and may be used as a test-bed to add and experiment with stereoscopy, devices and settings.
* Bug 1021: Make OVR access vendor agnostic: Package ↵Sven Gothel2014-07-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 'com.jogamp.opengl.util.stereo' contains all public interfaces/classes Renamed interfaces: CustomRendererListener -> CustomGLEventListener StereoRendererListener -> StereoGLEventListener New vendor agnostic 'stuff' in com.jogamp.opengl.util.stereo: 1 - StereoDeviceFactory To create a vendor specific StereoDeviceFactory instance, which creates the StereoDevice. 2 - StereoDevice For vendor specific implementation. Can create StereoDeviceRenderer. 3 - StereoDeviceRenderer For vendor specific implementation. 4 - StereoClientRenderer Vendor agnostic client StereoGLEventListener renderer, using a StereoDeviceRenderer. Now supports multiple StereoGLEventListener, via add/remove. - MovieSBSStereo demo-able via StereoDemo01 can show SBS 3D movies.
* Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-0374-953/+960
| | | | | | | | | | | | | c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
* Bug 1011 / Bug 1012: GLMediaPlayer Audio/Video stuttering w/ OSX and ↵Sven Gothel2014-06-112-1/+15
| | | | OpenAL/JOAL (works using openal-soft default on all platforms now)
* GLMediaPlayer: Fix video stutter if using NullAudioSinkSven Gothel2014-06-092-9/+61
| | | | | NullAudioSink shall return the last enqueued PTS in getPTS() not causing a-v delta measure based on lagging audio in player.
* GLMediaPlayerImpl: Change access of most fields to private for clarity and ↵Sven Gothel2014-05-205-107/+89
| | | | API stability
* Bug 801: Refine commit 9a15aad0e5388a4b927e44d3d2ce136f32474bc2 cache ↵Sven Gothel2014-05-201-0/+17
| | | | | | | | TextureSequence's fragment shader hash-code Adding TextureSequence.getTextureFragmentShaderHashCode() allowing to use a cached hash-code (performance, interface usability). Implemented in GLMediaPlayerImpl and ImageSequence.
* Extract FFMPEGNatives's Audio + Video formats to their own class in AV ↵Sven Gothel2014-05-194-217/+273
| | | | | | | | | private package. jogamp.opengl.util.av.impl.FFMPEGNatives.SampleFormat -> jogamp.opengl.util.av.AudioSampleFormat jogamp.opengl.util.av.impl.FFMPEGNatives.PixelFormat -> jogamp.opengl.util.av.VideoPixelFormat .. to be reused for other decoders later-on.
* Texture/TextureIO: Make 'wrapping' Texture ctor public, remove same factory ↵Sven Gothel2014-05-191-5/+2
| | | | method from TextureIO
* FFMPEGMediaPlayer / FFMPEGv10Natives: Fix libav-10 and ffmpeg-2.x version ↵Sven Gothel2014-05-092-10/+18
| | | | validation (libavutil)
* Merge remote-tracking branch 'hharrison2/master'Sven Gothel2014-04-231-4/+4
|\
| * jogl: avoid bugs with sign-extension in JPEGDecoderHarvey Harrison2014-04-111-4/+4
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
* | Reduce jar-size / cleanup: Replace 1 kB test-ntsc01-57x32.png w/ 400kB ↵Sven Gothel2014-04-101-1/+1
|/ | | | test-ntsc01-28x16.png asset ; Generalize TextureSequenceDemo01 -> SingleTextureSeqFrame ; Unit tests use test-data, not assets.
* FFMPEGMediaPlayer: Use 'const' qualifier in shader stubSven Gothel2014-04-091-4/+4
|
* Add TextureSequence.isTextureAvailable(), allowing triggering action only ↵Sven Gothel2014-04-091-0/+5
| | | | when source becomes ready
* Bug 801: Reduce temp. object creation, i.e. GC loadSven Gothel2014-04-021-6/+6
|
* Math and PMVMatrix: Cleanup and RefineSven Gothel2014-03-142-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added final qualifier where possible - Refined API doc - FloatUtil: - Add machine EPSILON - fixed value and runtime computed (real machEps) - incl. isZero(..), isEqual(..) - Add makeRotationAxis(..) - Moved from PMVMatrix for reusage - Add makeRotationEuler(..) - New, not recommended due to Gimbal-Lock - Add copyMatrix[Column|Row](..) - Add more PI variations and trigo-func float mappings - Removed cross and normalize, use VectorUtil! VectorUtil: - Add copyVec* - Add equals and isZero w/ and w/o EPSILON - Add distance[Square] - Add length[Square] PMVMatrix: - Removed 'destroy' method in favor of making most fields 'final'. AffineTransform: - Added AABBox transform - Public multiply
* Bug 927: Try fix deadlock.Xerxes Rånby2014-02-251-2/+2
| | | | | | (14:15:13) sgothel: @Xerxes: In doResume .. do a 'while( !isActive && !shallPause && isRunning ) {' (14:15:52) sgothel: doPause: while( isActive && !shallPause && isRunning ) (14:31:55) sgothel: doPause only: while( isActive && isRunning ) {
* Bug 927 - Multithreading (MT) issues libav/ffmpegSven Gothel2014-02-224-13/+12
| | | | | | | | | | | | | | FFMPEG Natives: - Move 'mutex_avcodec_openclose' to local static and initialize at initSymbols0 - setStream0: - Add another locked mutex block around: - [ sp_avformat_open_input .. sp_avformat_find_stream_info ] This solves the issue of: [NULL @ 0x89d20c60] insufficient thread locking around avcodec_open/close()
* Match Bitstream changes of gluegen commit ↵Sven Gothel2014-02-211-35/+35
| | | | 4447232af0d95a4348d09d4ed03fbef48394ca3a
* Bug 980: Use Bitsream class for JPEGDecoderSven Gothel2014-02-201-69/+32
|
* Bug 927: Fix minor MT issues w/ libav/ffmpegSven Gothel2014-02-164-70/+76
| | | | | | | | | | | | | Issue: [NULL @ 0x35bde60] insufficient thread locking around avcodec_open/close() Decorating said libav functions w/ mutex lock/release. Abstract impl. to either use pthread or JNI Monitor, but using the latter to reduce dependencies (ming64 windows). FFMPEGNatives is now an abstract class containing the 'static final Object mutex_avcodec_openclose'
* GLMediaPlayer: Add user attached objects, similar to GLContext - Allowing ↵Sven Gothel2014-01-261-0/+19
| | | | GLMediaEventListener impl. to access GLMediaPlayer associated objects
* Bug 942: GLBufferObjectTracker: Tracking GLBufferStorage accurately, ↵Sven Gothel2014-01-211-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | synchronized and secure [1/2] GLBufferSizeTracker becomes GLBufferObjectTracker and tracks the buffer's data store, GLBufferStorage, accurately, synchronized and secure. Synchronization is required, since the GLBufferStorage can be shared across many GLContext on multiple threads. This requires all GLBufferStorage lifecycle affecting GL functions to utilize synchronized GLBufferObjectTracker methods while passing a native GL-func callback. These GL functions are: - glBufferData, glBufferStorage (GL 4.4), glNamedBufferDataEXT Creating the GLBufferStorage object - glMapBuffer, glMapBufferRange, and their *Named*EXT variants - glUnmapBuffer, glUnmapNamedBufferEXT 'glDeleteBuffers' can simply notify the GLBufferObjectTracker No more HashMap is required to associate the mapped buffer address to the mapped ByteBuffer. GLBufferObjectTracker simply utilizes a buffer-name (int) -> GLBufferStorage map. +++ The security aspect shall be implemented by validating all arguments whether they match the required GL constraints, as well as validating tracked states like 'size'. The following functions will throw an GLException accordingly: - glBufferData, glNamedBufferDataEXT * @throws GLException if size is less-than zero * @throws GLException if a native GL-Error occurs - glBufferStorage (GL 4.4) * @throws GLException if size is less-or-eqaul zero * @throws GLException if a native GL-Error occurs - glMapBuffer, and it's *Named*EXT variant * @throws GLException if buffer is not bound to target * @throws GLException if buffer is not tracked * @throws GLException if buffer is already mapped * @throws GLException if buffer has invalid store size, i.e. less-than zero - glMapBufferRange, and it's *Named*EXT variant * @throws GLException if buffer is not bound to target * @throws GLException if buffer is not tracked * @throws GLException if buffer is already mapped * @throws GLException if buffer has invalid store size, i.e. less-than zero * @throws GLException if buffer mapping range does not fit, incl. offset - glMapBufferRange, and it's *Named*EXT variant Only clear mapped buffer reference of GLBufferStorage if native unmap was successful. Further more special error handling shall be applied to: - glMapBuffer, and it's *Named*EXT variant, glMapBuffer, and it's *Named*EXT variant - A zero GLBufferStorage size will avoid a native call and returns null - A null native mapping result indicating an error will not cause a GLException but returns null This allows the user to handle this case.
* JOGL Assets: Replace test-ntsc01-160x90.png w/ test-ntsc01-57x32.png (Save ↵Sven Gothel2013-12-281-1/+1
| | | | ~2 kB)
* FFMPEGMediaPlayer: Add missing indentation of commit ↵v2.1.4_rc01Sven Gothel2013-12-181-7/+7
| | | | 8a032a2c1f247819bdb08382fbebcc4cd896b3f2
* ALAudioSink GLMediaPlayerImpl FFMPEGMediaPlayer: Verbosity only w/ DEBUG flag.Xerxes Rånby2013-12-182-2/+6
| | | | Signed-off-by: Xerxes Rånby <[email protected]>
* Bug 918: Fix EOS Regression: Only use pts>duration for EOS if duration > 0 ↵Sven Gothel2013-12-111-2/+2
| | | | | | (camera or other sources may not have duration) Regression of commit 8a8ed735f6631b2da7bf605c5c3dda4e0fc13905
* Bug 918 (2/2): Determine StreamWorker usage after stream-init ; Fix seek(..) ↵Sven Gothel2013-12-111-87/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ; Fallback for EOS Detection ; MovieSimple uses full GLEventListener for 'Audio Only' as well to test seek Determine StreamWorker usage after init - To support audio only files, we need to determine to use StreamWorker after completion of stream-init. Fix seek(..) - FFMPeg: pos0 needs to use aPTS for audio-only - Clip target time [0..duration[ Fallback for EOS Detection In case the backend does not report proper EOS: - Utilize 'nullFramesCount >= MAX' -> EOS, where MAX is number of frames for 3s play duraction and where 'nullFramesCount' is increased if no valid packet is available and no decoded-video or -audio in the queue. - Utilize pts > duration -> EOS MovieSimple uses full GLEventListener for 'Audio Only' as well to test seek - Matroska seek for audio-only leads to EOS .. http://video.webmfiles.org/big-buck-bunny_trailer.webm - MP4 audio-only seek works http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4 MovieSimple/MovieCube: - Use audio-pts in audio-only to calc target time Tested: - A, V and A+V - Pause, Stop and Seek - GNU/Linux
* Bug 918: GLMediaPlayer: Fix Deadlock if EOS happens after pause/resume ↵Sven Gothel2013-12-111-10/+18
| | | | | | | | | (seek) - Tested w/ seeking 'Audio Only' and Matroska Test stream was default of MovieSimple: http://video.webmfiles.org/big-buck-bunny_trailer.webm while disabling video (-vid -2)
* Bug 918 (1/2): Use StreamWorker in 'Audio Only' mode, since no ↵Sven Gothel2013-12-111-1/+1
| | | | | | | | 'getNextTexture(..)' is issued here! Thanks to Xerxes to analyze this issue thoroughly. TODO: Implement EOS for 'Audio Only' and test seek, pause, etc .. - Apply manual tests in MovieSimple
* Fix Bug 902: FFMPEGMediaPlayer uses IOUtil.decodeURIIfFilePath(uri) to ↵Sven Gothel2013-11-281-2/+7
| | | | decode proper file-scheme if applicable - otherwise encoded ASCII URI.
* Bug 890 - Fix GLES3 Profile Mapping, i.e. GL2ES2 queries and mappings; ↵Sven Gothel2013-11-071-1/+3
| | | | | | | | | | | | | | | | | | | | Validate isGLES*() usage and definition ; Add and use ShaderCode.createExtensionDirective(..) - Fix GLES3 Profile Mapping, i.e. GL2ES2 queries and mappings - GLProfile: Add GL2ES2 -> ES3 mapping - EGLContext: Reuqest major '3' for ES3 - EGLGLCapabilities/EGLGraphicsConfiguration: Consider EGLExt.EGL_OPENGL_ES3_BIT_KHR - Validate isGLES*() usage and definition - Fix BuildComposablePipeline's isGLES() code - For GLSL related queries use isGLES() instead of isGLES2(), which would exclude ES3 - Add and use ShaderCode.createExtensionDirective(..) - Supporting creating GLSL extension directives while reusing strings from GLExtensions - Minor cleanup of GLContextImpl.setGLFuncAvail(..)
* Bug 885 - GLMediaPlayer: Allow single threaded mode - Especially where ↵Sven Gothel2013-11-012-47/+109
| | | | | | | | | | | | multiple media textures (Android) or shared GL context are not usable. - GLMediaPlayer: - TEXTURE_COUNT_MIN is the new minimum: '1' - i.e. no multithreading, single threaded player - TEXTURE_COUNT_DEFAULT is '4' - multithreaded - GLMediaPlayerImpl: - Add Single threaded mode, but perform initStreamImpl(..) off-thread. -
* GLDrawableFactory: createDummy*(..) Pass GLCapabilitiesImmutable + ↵Sven Gothel2013-10-311-5/+5
| | | | GLCapabilitiesChooser instead of GLProfile, allowing using same or similar caps - important for sharing ctx
* Bug 776 GLContext Sharing: Fix copy-ctor GLArrayDataClient: Create new ↵Sven Gothel2013-10-305-9/+7
| | | | | | instance of GLArrayHandler of same type; Simplify GLArrayHandler inheritance. Refines commit 9f2a9df0a4b7093925c8854b37fba053469a4b35
* jogl: replce more unneeded String() constructionHarvey Harrison2013-10-201-5/+4
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* jogl: add missing @Override annotationsHarvey Harrison2013-10-1725-0/+98
| | | | Signed-off-by: Harvey Harrison <[email protected]>