aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Findbugs.increment_volatile: Use AtomicInteger or add comment that operation ↵Sven Gothel2014-07-082-2/+2
| | | | is safe!
* Findbugs.not-written.null: Fix referencing non-written fields (never written ↵Sven Gothel2014-07-086-29/+46
| | | | | | | | | | | | | | | or due branching) - AWT TextRenderer: Add throw new InternalError("fontRenderContext never initialized!"); FIXME! - GLContextImpl.hasFBOImpl(): Fix serious NPE issue if extCache is null - GLDrawableFactoryImpl.createOffscreenDrawableImpl(..): - Fix NPE issue w/ null drawable - Fix resetting GammaRamp by ensuring originalGammaRamp will be set at 1st setGammaRamp(..) - AndroidGLMediaPlayerAPI14: Fix NPE: Use already resolved local referenced - EGLDrawableFactory: Fix NPE: Only operate on non null surface! - ALAudioSink.dequeueBuffer(..): Only resolve releasedBuffer elements if not null -
* Findbugs.minor: Fix 'array -> string', missing argumentSven Gothel2014-07-082-3/+3
|
* 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.
* Fix FloatUtil.makePerspective(..): The tan(fovy/2) shall be used, not ↵Sven Gothel2014-07-051-3/+8
| | | | | | | | | | | | | tan(fovy), fix callers; Simplify FloatUtil.makePerspective(..FovHVHalves..) Fix FloatUtil.makePerspective(..): The tan(fovy/2) shall be used, not tan(fovy), fix callers - This bug didn't hit (yet), since callers already performed the division (degree -> radian) by falsly claiming the passed value is in radian - where it was actually fov/2 in radians. Simplify FloatUtil.makePerspective(..FovHVHalves..) - Due to the fix above, it became pretty clear that the makeFrustum(..) method can be utilized. Simply apply all our tan-half-fov values on zNear.
* Bug 1021: Make OVR access vendor agnostic: Package ↵Sven Gothel2014-07-052-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | '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-03239-4335/+4337
| | | | | | | | | | | | | 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
* Fix 'typo' in messages: 'Catched' -> 'Caught'Sven Gothel2014-06-2810-23/+23
|
* Enhance FloatUtil: More optimizations, concludes commit ↵Sven Gothel2014-06-281-3/+3
| | | | | | | | | | | | | | | | | 0bded476868c5fdfe44502bfd55957469d0d72bb FloatUtil optimizations (unroll and linear memeory access): - transposeMatrix - invertMatrix (diff algo as well - 50% speed bump) - multMatrix - multMatrixVec FloatUtil added - matrixDeterminant(..) FloatUtil removed - Certain FloatBuffer variants are removed or at least marked deprecated.
* Enhance FloatUtil: Merge ProjectFloat features while adding optimized ↵Sven Gothel2014-06-272-548/+184
| | | | | | | | | | | | | | | | | | variations; PMVMatrix: Remove NIO buffer path, use backing-array only and FloatUtil direct. - FloatUtil pptimized variants: - mapObjToWinCoords (gluProject) passing 'P x Mv' for batch operations - mapWinToObjCoords (gluUnProject) passing 'Inv(P x Mv)' for batch operations - mapWinToObjCoords (gluUnProject) passing 'Inv(P x Mv)' and two winz values for two ray picking resulting in two obj positions. (-> mapWinToRay) - PMVMatrix - dropped low performance NIO mode - simply use common backing-array and fixed offsets directly - drop ProjectFloat usage in favor of FloatUtil - reduce number of temporary arrays
* Fix Bug 1019 - Remedy of Bug 691 causes 'access/modify after free' and ↵Sven Gothel2014-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | crashes the app The 'magic' MyNSOpenGLContext::dealloc (MacOSXWindowSystemInterface-calayer.m) of force destroying the underlying CGLContextObj of it's associated NSOpenGLContext as introduced as a remedy of Bug 691 is plain wrong. It was added in commit f6e6fab2a7ddfb5c9b614cb072c27ff697629161 to mitigate the experience behavior of delayed GL context destruction when creating/destroying them multiple times as exposed in unit test TestGLCanvasAddRemove01SwingAWT. While this 'hack' worked for some reason on some OSX versions, it caused a 'access/modify after free' issue exposed under some circumstances and crashes the application. The actual culprit of the delayed GL context destruction is different. The offthread CALayer detachment and hence final destruction issued on the main-thread is _not_ issued immediately due to some referencing holding by NSApp. Issuing an empty event on the NSApp (thread) will wake up the thread and release claimed resources. This has been found while realizing that the GL context are released if the mouse is being moved (duh!). This issue is also known when triggering stop on the NSApp (NEWT MainThread), same remedy has been implemented here for a long time.
* Bug 1011 / Bug 1012: GLMediaPlayer Audio/Video stuttering w/ OSX and ↵Sven Gothel2014-06-113-6/+50
| | | | OpenAL/JOAL (works using openal-soft default on all platforms now)
* GLMediaPlayer: Fix video stutter if using NullAudioSinkSven Gothel2014-06-093-9/+66
| | | | | NullAudioSink shall return the last enqueued PTS in getPTS() not causing a-v delta measure based on lagging audio in player.
* UpstreamSurfaceHook: Add 'NativeSurface getUpstreamSurface()' (from ↵Sven Gothel2014-06-082-7/+10
| | | | EGLUpstreamSurfaceHook) to generalize ProxySurfaceImpl.getUpstreamSurface()
* Bug 1010 - Fix ES3.glPixelStorei and revalidate GLPixelStorageModesSven Gothel2014-05-261-9/+10
| | | | | | | | | | | | Remove GLES3Impl.glPixelStorei pname validation which was true for ES2 impl, but is no more valid for ES3, which accepts more values than GL_PACK_ALIGNMENT & GL_UNPACK_ALIGNMENT. Revalidate GLPixelStorageModes: - Properly support ES3 PixelStorageModes - Revalidate PixelStorageModes for all GL profiles - Properly reset values at save - Separate PACK and UNPACK save/reset/restore implementation
* Bug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units: ↵Sven Gothel2014-05-227-17/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refine commit f9a00b91dcd146c72a50237b62270f33bd0da98e - Using comment tag 'FIXME HiDPI' to locate remaining issues - Fix remaining 'getPixel*(..)' -> 'getSurface*(..)' - UpstreamSurfaceHook - Fix usage (one by one) of - NativeWindow: getWindowWidth() / getWindowHeight() - NativeSurface/GLDrawable: getSurfaceWidth() / getSurfaceHeight() - mention window- or pixel units in API doc where required - use 'setSurfaceSize(..)' where appropriate to match 'getSurface*()' - GLFBODrawable - GLOffscreenAutoDrawable - UpstreamSurfaceHook.MutableSize - NativeWindow's Point: Add API doc and 'Point scaleInv(..)' - NativeSurface Simplify new conversion methods and use single in-place storage - 'int[] getWindowUnitXY(int[], int[])' -> 'int[] convertToWindowUnits(int[], int[])' - 'int[] getPixelUnitXY(int[], int[])' -> 'int[] convertToPixelUnits(int[], int[])' - NEWT Screen/Monitor - Assume screen/window units - TODO: Refine semantics - Monitor resolution probably is in pixel units ?! - Including the Rectangle/Monitor association etc etc - NEWT Window - Add setSurfaceSize(..) for convenience - Add 'Point convertToWindowUnits(final Point pixelUnitsAndResult)', etc .. - All window ops are using window units (size, pos, ..), but methods operating on the surface/drawable: windowRepaint(..) .. - TODO: Consider changing method names 'window*(..)' to 'surface*(..)' actually operating on surface/drawable - Window.windowRepaint(..) - GLAutoDrawableDelegate.windowResizedOp(..) (maybe all similar methods in here) - NEWT Mouse/Pointer Events - Using pixel units
* Bug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units; ↵Sven Gothel2014-05-2119-76/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add HiDPI for AWT GLCanvas w/ OSX CALayer Core API Change: To support HiDPI thoroughly in JOGL (NativeWindow, JOGL, NEWT) we need to separate window- and pixel units. NativeWindow and NativeSurface now have distinguished access methods for window units and pixel units. NativeWindow: Using window units - getWindowWidth() * NEW Method * - getWindowHeight() * NEW Method * - getX(), getY(), ... NativeSurface: Using pixel units - getWidth() -> getSurfaceWidth() * RENAMED * - getHeight() -> getSurfaceHeight() * RENAMED * GLDrawable: Using pixel units - getWidth() -> getSurfaceWidth() * RENAMED, aligned w/ NativeSurface * - getHeight() -> getSurfaceHeight() * RENAMED, aligned w/ NativeSurface * Above changes also removes API collision w/ other windowing TK, e.g. AWT's getWidth()/getHeight() in GLCanvas and the same method names in GLDrawable before this change. +++ Now preliminary 'working': - AWT GLCanvas - AWT GLJPanel Tested manually on OSX w/ and w/o HiDPI Retina: java com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT -manual -noanim -time 1000000 java com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT -manual -noanim -time 1000000 +++ TODO: - NEWT - Change Window.setSize(..) to use pixel units ? - OSX HiDPI support - Testing .. - API refinement
* GLMediaPlayerImpl: Change access of most fields to private for clarity and ↵Sven Gothel2014-05-206-112/+94
| | | | 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.
* Minor edits: Fix comments / API-docsSven Gothel2014-05-191-2/+2
|
* 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-232-4/+5
|\
| * jogl: avoid writing into an uninitialized array in nurbs codeHarvey Harrison2014-04-111-0/+1
| | | | | | | | | | | | pspec is never initialized, this would have always crashed. Signed-off-by: Harvey Harrison <[email protected]>
| * 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-022-23/+33
|
* X11/WGL GLContext Impl: setGLFunctionAvailability(..) w/ ↵Sven Gothel2014-04-013-4/+4
| | | | | | | | withinGLVersionsMapping:=true if null == sharedContext .. otherwise no quirk could be set on non ARB ctx GL implementations. null == sharedContext, always for first context creation, i.e. indeed within GL version mapping.
* GLRendererQuirks.NoMultiSamplingBuffers: Prelim detection of this quirk due ↵Sven Gothel2014-03-191-1/+14
| | | | to Gallium/Nouveau Driver (TODO: Handle it in GLCapabilities Selection)
* Add generic support for picking via raycast intersection and AABBox (or similar)Sven Gothel2014-03-161-5/+5
| | | | | | | | | - New simple type Ray, denominating a .. ray - Added PMVMatrix.gluUnProjectRay(..) similar to gluUnproject(..) however, result is a Ray. - Added AABBox.intersectsRay(Ray) ..
* FloatUtil/VectorUtil: Enhance isEqual/compare w/ and w/o epsilon, add unit ↵Sven Gothel2014-03-151-4/+4
| | | | tests - Cleanup VectorUtil (vec2/3 naming, remove dedundant functions)
* Math and PMVMatrix: Cleanup and RefineSven Gothel2014-03-143-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 961: Stabilize glXGetFBConfigAttrib(..) and glXChooseFBConfig(..) Usage ↵Sven Gothel2014-03-102-9/+38
| | | | | | | | | | | | | | | | Against OpenGL Bugs ; Fix glXGetFBConfigs - glXChooseFBConfig(..) - Remove NULL FBConfig pointer from result in native code, which has been observed in Mesa 8.0.5-4 libgl1-mesa-swx11 (Debian-7). - glXGetFBConfigs - Add manual implementation similar to glXChooseFBConfig - glXGetFBConfigAttrib(..) - glXGetFBConfig(..) - Returns boolean reflecting success, don't throw exception - caller handles error - Caller ignore failure if not essential (i.e. already chosen config)
* Bug 984 - Fix GLBufferObjectTracker.mapBuffer(..)'s mapBufferImpl(..) ↵Sven Gothel2014-02-261-2/+2
| | | | | | | | | parameters for mapBufferRange(..) and mapNamedBufferRange(..) GLBufferObjectTracker.mapBuffer(..) variant for mapBufferRange(..) and mapNamedBufferRange(..) used wrong parameters in it's mapBufferImpl(..) call. Fixed and added mapBufferRange(..) test in TestMapBufferRead01NEWT
* 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 ) {
* ALAudioSink: Add thread-name to exceptions; stopImpl shall not throw an ↵Sven Gothel2014-02-221-22/+38
| | | | exception at destroy
* Bug 927 - Multithreading (MT) issues ALAudioSinkSven Gothel2014-02-221-53/+54
| | | | | | | Add global synchronization around ALAudioSink constructor code, which 'magically' solves the openal-soft multithreading issues .. This is a workaround.
* 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
|
* GLContextImpl/GLDrawableImpl.getDefaultReadBuffer(..): Pass hint whether ↵Sven Gothel2014-02-183-4/+6
| | | | dedicated read-drawable is being used (double buffering)
* 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'
* Bug 927 - Multithreading (MT) issues with ALAudioSink (openal-soft)Sven Gothel2014-02-151-31/+102
| | | | | | | | | | | | | | - Using update openal-soft (commit 7297c3214a4c648aaee81a9877da15b88f798197) - Analyzed openal-soft threading issues: - a global-lock would have removed the issue - turns out that using ALC_EXT_thread_local_context's alcSetThreadContext(..) instead of alcMakeContextCurrent(..) solves the issue - Cleaned up al*GetError() queries and handling - Simplified flush/dequeue buffers
* GLPixelStorageModes: Safe and restore GL2ES3 modes, i.e. add missing GLES3 ↵Sven Gothel2014-02-141-8/+8
| | | | modes. GLStateTracker: Use proper GL names for enums
* Bug 972 - Reduce ClassLoader Lookup, i.e. Class.forName(..): GLProfile, ↵Sven Gothel2014-02-121-7/+5
| | | | | | | | | | | | GLContextImpl, DisplayImpl GLProfile, GLContextImpl: - ReflectionUtil.DEBUG_STATS_FORNAME: Dump forName stats if set - Cache GL*Impl and GL*ProcAddressTable Constructor<?> for GLContextImpl's createInstance(..) - Remove off-thread early classloading thread which only adds complications DisplayImpl: - Remove one redundant availability test
* GLMediaPlayer: Add user attached objects, similar to GLContext - Allowing ↵Sven Gothel2014-01-261-0/+19
| | | | GLMediaEventListener impl. to access GLMediaPlayer associated objects
* Bug 948 - Autodetect GLRendererQuirks.SingletonEGLDisplayOnlySven Gothel2014-01-242-22/+17
| | | | | | | | | Refines commit fbe00e6f5dca8043b40dd96f096fecc9424e0cc3 Instead of querying driver artifacts (vendor, platform, version ..) we simply can autodetect this quirk by trying to get a second egl-display handle when initializing the EGLDrawablFactory's default device: EGL.eglGetDisplay(EGL.EGL_DEFAULT_DISPLAY)