aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util
Commit message (Collapse)AuthorAgeFilesLines
* Improves a bit the documentation of ImageTypeJulien Gouesse2015-08-191-5/+5
|
* Improves a bit the documentation of ImageType and adds .ico and .cur into itJulien Gouesse2015-08-191-23/+68
|
* PNGPixelRect: Avoid redundant wrapping of InputStream into BufferedInputStreamSven Gothel2015-08-191-1/+2
|
* Bug 1042: ImageIOUtil -> ImageType + ImageType.Util ; Fix implementation and ↵Sven Gothel2015-08-198-1505/+1736
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test. - ImageIOUtil -> ImageType + ImageType.Util - ImageType.Util.getFileSuffix(..): - Fix byte type conversion, i.e. 'b == (byte)0x89', cast is required to avoid byte -> int conversion. Note: signed byte -128 - +128 - Parse in O(1), i.e. lexicographical parsing - FIXME: We seem to have at least three type collisions, validate! - ImageType: - Complete T_* w/ API doc -> FIXME/TODO missing type references! - ImageType instancing via InputStream or manual type definition. - TextureData - Contains optional source ImageType - TextureProvider: - Deprecate newTextureData(..) variants other than InputStream simplifying TextureIO. - TextureProvider.SupportsImageTypes: - Added interface, allowing mapping ImageType -> provider - Tested standalone ImageType (TestImageTypeNEWT) and via TextureIO (TestTextureIONEWT) utilizing list of all test data (ImageTstFiles), i.e. PNG, JPG, TGA and DDS.
* Bug 1042: ImageIOUtil: Use unique public static final const String identifiersSven Gothel2015-08-182-154/+1065
|
* Bug 1042: ImageIOUtil: Left-Align branches for readabilitySven Gothel2015-08-181-100/+100
|
* Bug 1193: ShaderCode: Add SUFFIX_COMPUTE_SOURCE/SUFFIX_COMPUTE_BINARY; Add ↵Sven Gothel2015-08-181-3/+22
| | | | @since 2.3.2 tag
* Updates the documentation of the class ShaderCode concerning the compute shadersJulien Gouesse2015-08-131-11/+13
|
* Adds the compute shaders into the list of supported shaders for ShaderCodeJulien Gouesse2015-08-131-0/+9
|
* Deprecates SGIImage.isSGIImage() and DDSImage.isDDSImage(), see the bug ↵Julien Gouesse2015-08-092-7/+14
| | | | report 1042
* Calls ImageIOUtil in TextureIO to detect the image format of a stream, see ↵Julien Gouesse2015-08-091-4/+7
| | | | the bug report 1042
* Documents ImageIOUtil, see the bug report 1042Julien Gouesse2015-08-091-0/+17
|
* Detection of the image format, first version (work in progress), see the bug ↵Julien Gouesse2015-08-091-0/+428
| | | | report 1042
* StereoDevice (Generic/OVR): Add knowledge about LocationSensorParameter and ↵Sven Gothel2015-07-202-0/+68
| | | | allow reset origin of location-sensor
* Clarify code in stereo/ovr: Comments, states, names, formatting.Sven Gothel2015-07-202-3/+3
|
* Refine Frustum definition: Adding Frustum.FovDesc; Clarify makeFrustum ↵Sven Gothel2015-07-201-3/+5
| | | | argument constraints -> Exceptions
* ShaderCode: Add 'create' variations w/ custom shader file suffixes as well ↵Sven Gothel2015-07-191-19/+303
| | | | as w/ Uri usage
* Fix javadoc typo: </count> -> </code>Sven Gothel2015-07-181-4/+4
|
* Bug 1151 - Working OculusVR SDK 0.5.0.1 on GNU/Linux w/ Positional Tracker (DK2)Sven Gothel2015-07-188-46/+153
| | | | | | | | | | | | | | | | | | | | | | | | | Note: The ovrd server must run, otherwise no device is being detected. General Stereo API Changes: - EyePose -> ViewerPose - We only use the viewer pose and derive the pupile position via EyeParameter. - Hence we reduce complexity. - A single ViewerPose will be maintained by StereoDeviceRenderer - position is in meter, allowing StereoGLEventListener to scale device independent. - StereoDevice receives knowledge of certain sensors, to be queried and used for start-sensors. OVR: - Simply apply the above general changes - Build: Remove [more] unused API entries for SDK rendering
* Bug 1116: Add ShutdownHook for all factories and devices to ↵Sven Gothel2015-03-273-8/+105
| | | | StereoDeviceFactory using NativeWindowFactory
* Bug 1116: Oculus SDK 0.4.4: Add extra DK1 detection; Add call to ↵Sven Gothel2015-03-272-0/+10
| | | | | | | | | | | | | | ovr_Shutdown() and ovrHmd_Destroy(hmdDesc). Add extra DK1 detection - SDK 0.4.4 w/ DK1 (Linux): ovrHmd_Detect() returns zero! - In such case: Try creating one device, which works for DK1 on Linux Add call to ovr_Shutdown() and ovrHmd_Destroy(hmdDesc). - Add StereoDeviceFactory.shutdown() and call ovr_Shutdown() for in OVRStereoDeviceFactory.shutdown(). - Call ovrHmd_Destroy(hmdDesc) in OVRStereoDevice.dispose().
* Bug 1116 - Add OculusVR DK2 Support - Part-1 (DK2 on DK1 SDK w/o Eye Tracker)Sven Gothel2015-03-218-19/+466
| | | | | | | | | | | | | | | | | - DK2's screen on X11 (at least) starts in rotated mode, detect and apply MonitorDevice rotation via NEWT's OpenGL StereoDeviceUtil - Move StereoDevice.Config -> StereoDeviceConfig - Expose generic StereoDevice to public: GenericStereoDeviceConfig + GenericStereoDeviceFactory - GenericStereoDeviceFactory exposes public GenericStereoDeviceConfig creation for mono, sbs-stereo and lense-sbs-stereo w/ diff. parameters. - Pass eye surface/texture size for each eye from device to renderer, instead of assuming unified values. - Unify GenericStereoDevice.createRenderer(..) and OVRStereoDevice.createRenderer(..) code
* Bug 1135 - Cleanup: Class ownership change of static GL enumeratesSven Gothel2015-03-069-29/+28
| | | | GLBufferStateTracker now also supports GL4.GL_QUERY_BUFFER
* Fix typo: PixelFormat.Composition.[componenCount() -> componentCount()]Sven Gothel2015-02-162-3/+3
| | | | .. thx to Julien Gouesse's review.
* Bug 682 - Relocating javax.media.opengl.* -> com.jogamp.opengl.* (Part 1)Sven Gothel2015-02-0257-240/+240
| | | | | | | | | sed -i 's/javax\.media\.opengl/com\.jogamp\.opengl/g' `grep -Rl "javax\.media\.opengl" src` sed -i 's/javax\.media\.nativewindow/com\.jogamp\.nativewindow/g' `grep -Rl "javax\.media\.nativewindow" src` sed -i 's/javax\/media\//com\/jogamp\//g' `grep -Rl "javax/media/" src` sed -i 's/javax\/media\//com\/jogamp\//g' `grep -Rl "javax/media/" doc` Manually edited all occurences within make/**
* Bug 1126: Adobt GlueGen commit 7db9df61142694965b50f2e0553d4c9e5668439bSven Gothel2015-02-021-1/+1
|
* Bug 1107 - Refine PixelFormat, GLPixelBuffer and ↵Sven Gothel2014-12-067-224/+518
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DirectDataBufferInt/BufferedImageInt - PixelFormat Refine definition allowing complete format conversion by its attributes instead of static 'knowledge'. - PixelFormat has_a *new* PixelFormat.Composition - PixelFormat.Composition contains all pixel component layout information as required for inspection and conversion. Component names are enumerated via PixelFormat.CType. - PixelFormatUtil.convert(..) utilizes generic conversion based on PixelFormat.Composition rather static type mapping. However, a int32 RGBA static conversion is still supported for performance. Utilizes Bitstream for varying pixel component bit-width. - Complete w/ hashCode() and equals(..) - GLPixelBuffer - Take 'pack' mode into account when determine GLPixelAttributes, i.e. on GLES pack=true (e.g. glReadPixel) only RGBA is guaranteed to work. Hence querying GLPixelAttributes requires the GLProfile, PixelFormat and pack mode. - Complete GLPixelAttributes conversions from PixelFormat or GL format/data-type, while taking GL data-type into account, as well as pack-mode. - Complete w/ hashCode() and equals(..) - SingletonGLPixelBufferProvider queries singleton GLPixelBuffer via - PixelFormat.Composition hostPixelComp, - GLPixelAttributes pixelAttributes, - boolean pack which comprise a unique key, allowing the implementation to utilize a hash map. This is implemented in AWTSingletonGLPixelBufferProvider. This allows distinct singleton GLPixelBuffer for different host PixelFormat (conversion) and GLPixelAttributes (depending on GLProfile). - Removes field 'componentCount' which was 'hacked in' to pass information about an optional host memory layout. Implementations utilizing conversion, e.g. AWTGLPixelBuffer, can implement GLPixelBufferProvider's 'PixelFormat.Composition getHostPixelComp(final GLProfile glp, final int componentCount)' and manage such implementation details, see use-case GLJPanel. - DirectDataBufferInt/BufferedImageInt: Expose underlying NIO ByteBuffer - AWTMisc.createCursor(..) uses DirectDataBufferInt.BufferedImageInt exposed NIO ByteBuffer, allowing to use generic PixelFormatUtil.convert(..).
* Use ExceptionUtils.dumpStack(..) instead of Thread.dumpStack()Sven Gothel2014-10-264-10/+16
|
* GLContext.Version* VersionNumber Constants: Clarify names, avoiding ↵Sven Gothel2014-10-252-2/+2
| | | | mis-interpretation alike Version130 -> [ 1.3.0 | 1.30.0 ] ?
* FloatUtil.makeFrustum(..): Add throws GLException API doc / Add GLException ↵Sven Gothel2014-10-251-2/+9
| | | | | | | | | | | | | if zNear == zFar throws GLException with GL_INVALID_VALUE if zNear is <= 0, or zFar < 0, or if left == right, or bottom == top, or zNear == zFar Add note on callers: - FloatUtil.makePerspective(..) - Matrix4.* - PMVMatrix.* - ProjectFloat.*
* Fix GLContext.Version* regression: Use Version1_1 and Version1_2 for 1.1 and ↵Sven Gothel2014-10-122-16/+16
| | | | | | | | | | | | | | | 1.2 (Version110 and Version120 are for 1.10 and 1.20 GLSL) Following commit introduced the wrong version usage, where a comparison w/ 1.1 and 1.2 was intended. Commit 6363fccee219ce238b0b2ded39c116e2bc8613d5 GLBuffers.sizeof(..): Add support for ES3, reading supported glPixelStorei states Commit 73a4d809f92126228b64a3bded75686db806be64 Don't utilize glPixelStorei's PACK/UNPACK IMAGE_HEIGHT and SKIP_IMAGES for Desktop GL < 1.2, avoiding GL-Error Commit f358c49418e95c622d50eb29f53c60dc4dbdee5b Bug 1047 - jogamp.opengl.glu.mipmap.Mipmap now uses already parsed GL version number and GL profile selection
* ShaderCode: Fix link to create(..) methodSven Gothel2014-10-081-3/+3
|
* AnimatorBase thread-name: Add instance sequence numberSven Gothel2014-10-071-2/+5
|
* Bug 1078: Add Fallback in AWTPrintLifecycle.setupPrint(): Use Onscreen GLAD ↵Sven Gothel2014-09-301-1/+1
| | | | | | | | | | | | | | | | | | | if Offscreen-GLAD Realization throws an Exception (Stability) - GLDrawableFactoryImpl: createOffscreenDrawable(..) and createDummyAutoDrawable(..) Temporary catch exception during setRealized(true) of newly created GLDrawable, to unrealize the instance before propagating the exception. This handling removes a memory leak in case the exception of this method is handled and application continues to operate, e.g. as in AWTPrintLifecycle.setupPrint(). The underlying drawable gets unrealized, since it's setRealized(boolean) implementation toggles its realize-state before delegating the realize-operation. Hence this is functional. - AWTPrintLifecycle.setupPrint() Stability Catch exception thrown by factory.createOffscreenAutoDrawable(..)'s setRealize(true) to continue operation w/ onscreen GLAD.
* Fix future compatibility issues (analog to b22x commit ↵Sven Gothel2014-09-241-4/+4
| | | | | | | | | | | | | | 546f9b1a03c46b63f8bb18c1b8e2c80a8b66cf7c) - GLFBODrawable: - Remove FBOMODE_DEFAULT - GLRendererQuirks: - Remove COUNT - Add getCount() method for future compatibility. - Animator - Hide local fields (private or package private)
* Fix synchronization issues in Animator* Exception caseSven Gothel2014-09-233-74/+77
| | | | | | | | | | | | | | | | | | | | | | | Refines commit cef7ba607ad7e8eb1ff2a438d77710a29aa0bda6 - The animator monitor-lock was still hold in the post finally block issuing flushGLRunnables(), due to intrinsic monitor release (in finally): - <http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-2.html#jvms-2.11.10> - <http://stackoverflow.com/questions/10743285/behavior-of-a-synchronized-method-with-try-and-finally> - Further: AnimatorBase.flushGLRunnables() acquired the lock itself (duh!) This commit removes the requirement for finally altogether by simply return a boolean from handleUncaughtException(caughtException), where false denotes the caller to propagate the exception itself (no handler). Post synchronized block then issues flushGLRunnables() and exceptation propagation as required. AnimatorBase.flushGLRunnables() 'synchronized' modifier is removed. Further, ThreadDeath is being propagated if caught. Here the finally block is also removed - redundant.
* Fix synchronization issues in GLDrawableHelper.flushGLRunnables(), fixes ↵Sven Gothel2014-09-223-40/+60
| | | | | | | | | | | | | | | | | | | | | rare deadlock with animator-exception and invoke(wait=true, ..) Fix synchronization issues in GLDrawableHelper.flushGLRunnables(): - Querying 'glRunnables.size()' is not synchronized, only its reference is volatile, not the instance's own states. - 'flushGLRunnable()' must operates while acquired the 'glRunnable' lock. - 'glRunnables' are no more volatile - introduced volatile 'glRunnableCount', allowing 'display(..)' method to pre-query whether blocking 'execGLRunnables(..)' must be called. This is risk (deadlock) free. Also fixes rare deadlock in animator display-exception / GLAD.invoke(wait=true, ..) case: - 'GLDrawableHelper.invoke(.., GLRunnable)' acquires the 'glRunnable' lock. - Then it queries animator state, which is blocking. - Hence animator's 'flushGLRunnable()' call must happen outside the animator lock
* Stabilize, fix regression: GLDrawable.invoke(..) and Animator* display-loop ↵Sven Gothel2014-09-222-8/+14
| | | | | | | | | | | | | | | 'closure' GLDrawable.invoke(..) regression of commit c77b8f586cb2553582a42f5b90aeee5ef85f1efe: 'wait' was not set to false, if 'deferredHere' was forced to 'false'. This could lead to the situation where GLRunnableTask will catch the exception and supresses it. Animator/FPSAnimator post exception propagation code animThread = null; notifyAll(); must be complete to finalize animator state in case of an exception. Decorate 'handleUncaughtException(..)' w/ try { } finally { } where the latter ensures the mentioned 'closure'.
* FBObject: Fix depth- and stencil bit count selection for attachRenderbuffer(..);Sven Gothel2014-09-201-3/+3
| | | | | | | | | | | | | | | - Fix depth- and stencil bit count selection for attachRenderbuffer(..) - Add generic values: DEFAULT_BITS, REQUESTED_BITS, CHOSEN_BITS, MAXIMUM_BITS - Refactor depth- and stencil bit-count -> format into own method - Allow depth- and stencil bit-count select a higher bit-count if required (fix) - GLFBODrawable.FBOMODE_USE_DEPTH is deprecated, using GLCapabilities.[get|set]DepthBits(..) - It was an oversight to introduce the bit flag in the first place, since we should have used the capabilities depth bit-count - Graph Test: GLEventListenerButton shall use requested capabilities for FBO drawable.
* FBObject: Simplify API (init/reset); Only issue automatic ↵Sven Gothel2014-09-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resetSamplingSink(..) if required; Fix resetSamplingSink(..), isBound(), .. - Simplify API (init/reset) - use new unique methods for init and reset: - void init(final GL gl, final int newWidth, final int newHeight, final int newSamples) - does not issue resetSamplingSink(..) - boolean reset(final GL gl, final int newWidth, final int newHeight, final int newSamples) - always issues resetSamplingSink(..) - deprecated dual-use (init/reset): - boolean reset(final GL gl, final int newWidth, final int newHeight) - boolean reset(final GL gl, int newWidth, int newHeight, int newSamples, final boolean resetSamplingSink) - reset(..) no more creates a dummy 'samplingSink' instance if sampling > 0, left up to resetSamplingSink(..) - Track 'modified' state of FBObject, if size, format or any attachment has been changed since last - use(..) - syncSamplingSink(..) - resetSamplingSink(..) - Only issue resetSamplingSink(..) from syncSamplingSink(..)/use(..) if 'modified == true' +++ - Fix setSamplingSink(..), i.e. samplingSink state handling: - Validated whether given samplingSink is initialized, throws Exception if not. - Fix resetSamplingSink(..) - resets the bound state, i.e. leaves it untouched - also unbinds the samplingSink - sampleSinkDepthStencilMismatch() also returns true if this.depth/stencil == null, but samplingSink is not. - Newly created colorbuffer/-texture matches exiting colorbuffer's internal-format, if exists. - Using simplified resetSizeImpl(..) for size mismatch - Simplified samplingColorSink init check - Fix isBound() was: 'bound = bound && fbName != gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)' fix: 'bound = bound && fbName == gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)' - Fix detachRenderbuffer(..) validates whether detachment was successful, similar to detachColorbuffer(..)
* StereoClientRenderer: Remove redundant FBObject.detachAllColorbuffer(gl) for ↵Sven Gothel2014-09-191-1/+0
| | | | init call
* FPSAnimator: Remove toString() override as accidently added in commit ↵Sven Gothel2014-09-141-5/+0
| | | | fa0115efb3989c28af21fc5f570ae49723566107
* FPSAnimator: Align code and pause/resume conditions w/ Animator, simplifying ↵Sven Gothel2014-09-131-29/+37
| | | | review.
* AnimatorBase.finishLifecycleAction(): Non blocking call shall return true, ↵Sven Gothel2014-09-132-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | success - otherwise pause()/.. return value is inconsistent. Caller of e.g. pause() running on the anim-thread or AWT-EDT (AWTAnimatorImpl) will be non-blocking. Before this change, a non-blocking simply did not wait until the 'hold' condition is reached and returned its negated value. This ofc is 'false', indicated unsuccessful operation. Caller use the return value to determine whether the call actually paused (or ..) the animator. Despite the non-blocking nature, the pause state was set, even if not reached. Hence a resume() would be required to continue operation after a temporary pause. +++ This change ignores the non-blocking nature's unmet condition. finishLifecycleAction() returns !nok || !blocking, i.e. either true for the reached condition (blocking) or true if non-blocking. Blocking calls with unmet condition still return false. +++ In case an animated GLAutoDrawableis being pulled after a non-blocking animator pause() call, the GLAutoDrawable's implementation thread-safety must ensure proper operation. +++
* GLBuffers.sizeof(..): Add support for ES3, reading supported glPixelStorei ↵Sven Gothel2014-09-091-5/+9
| | | | states
* GLPixelStorageModes: Emphasize reset*() usage; setUnpackRowLength: GL2ES2 -> ↵Sven Gothel2014-09-093-32/+14
| | | | | | | | | | GL2ES3; Better adoption of GLPixelStorageModes (GLJPanel, GLReadBufferUtil, TextureIO) - Emphasize reset*() is being called when saving modes for 1st modification; - setUnpackRowLength: GL2ES2 -> GL2ES3; Actually GL2ES3 is required for UNPACK_ROW_LENGTH - Better adoption of GLPixelStorageModes (GLJPanel, GLReadBufferUtil, TextureIO)
* Don't utilize glPixelStorei's PACK/UNPACK IMAGE_HEIGHT and SKIP_IMAGES for ↵Sven Gothel2014-09-092-8/+16
| | | | | | | | | | | | | | Desktop GL < 1.2, avoiding GL-Error Commit fc1e98790a02b4fa7922f3cdd9d437f87d7c99e5 added handling of PACK/UNPACK IMAGE_HEIGHT and SKIP_IMAGES in GLPixelStorageModes. However, it has been overseen that the four states are not available in OpenGL 1.1. Adding exclusion of the same if desktop GL < 1.2 and hence avoiding GL errors. Same applies to GLBuffers.sizeof(..) method.
* Bug 1063: Uri adoptionSven Gothel2014-09-082-17/+28
| | | | | | | | | - ShaderCode: - Using Uri - Also encode the rel. 'includeFile' (was missing earlier) - GLMediaPlayer - Exposes Uri in API, removed URI
* Adding missing '@since 2.2.1' tags to ShaderCode and GLContextSven Gothel2014-09-031-4/+20
|
* Bug 1043 - Add Tessellation Control and Evaluation Shader SupportSven Gothel2014-09-021-16/+56
| | | | | - Add GL4.GL_TESS_CONTROL_SHADER and GL4.GL_TESS_EVALUATION_SHADER support for GLSL util class ShaderCode - Add unit test TestTessellationShader01GL4NEWT, testing TessellationShader01aGL4 and TessellationShader01bGL4