summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com
Commit message (Collapse)AuthorAgeFilesLines
* Bug 935: NEWT PointerIcon: Utilize Toolkit Agnostic PixelFormat and ↵Sven Gothel2014-01-083-358/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conversion Utilities (Allowing 'arbitrary' PointerIcon data input) Commit fe28bc125429b38cdcd016746081f4a6d521c6fd added the notion of toolkit agnostic PixelFormat and conversion utilities, utilized and further tested by this patch. +++ - PointerIcon is a PixelRectangle and hence holds the decoded data. This allows on-the-fly conversion if required as well as recreation w/o PNG re-decoding. - Using array-backed PointerIcon data where possible, allowing better performance when converting PixelFormat etc. - NEWT Display adds 'createPointerIcon(final IOUtil.ClassResources pngResource...' method to support agnostic PointerIcon creation. - NEWT Display adds methods to allow users to avoid PixelFormat and Buffer NIO type forced conversion: - PixelFormat getNativePointerIconPixelFormat() - boolean getNativePointerIconForceDirectNIO() +++ PNGImage -> PNGPixelRect Deleted: com.jogamp.opengl.util.texture.spi.PNGImage Added: com.jogamp.opengl.util.PNGPixelRect (We hope nobody was using PNGImage directly since it was a service-plugin for TextureIO) PNGPixelRect is a PixelRectangle PNGPixelRect actually is implemented OpenGL agnostic, however - since our PNGJ support lives under package 'jogamp.opengl.util.pngj' it cannot be moved up (yet). PNGPixelRect now handles all PixelFormat for the target format and also added support for grayscale+alpha (2 channels). The latter is force-converted to RGB* - similar to paletted. Further more, PNGPixelRect allows simply passing an OutputStream to write the PNG data. Used by: TextureIO and NEWT +++ - OffscreenSurfaceLayer's setCursor(..) uses the agnostic PixelRectangle instead of a PNG resource. - AWTMisc uses the PixelRectangle to produce the AWT Cursor and converts it to the required format. Hence same pixels are used for NEWT and AWT pointer/cursor icon. - TestGearsES2Newt and NewtAWTReparentingKeyAdapter 'tests' iterate over 3 custom PointerIcon when pressed 'c'. - JOGLNewtAppletBase uses the new custom PointerIcon 'newt/data/crosshair-lumina-trans-32x32.png', which is included in NEWT (213 bytes only). -
* Bug 935: NEWT PointerIcon: Add Toolkit Agnostic PixelFormat and Conversion ↵Sven Gothel2014-01-081-0/+100
| | | | | | | | | | Utilities (Allowing 'arbitrary' PointerIcon data input) To allowing 'arbitrary' PointerIcon data input, i.e. via raw pixels we need to define an agnostic PixelFormat and required conversion utilities. The latter is not hw accelereated (toolkit agnostic), but this shall be expected and satisfying for small amount of 'pixels'.
* Bug 925 - Accept an ES3 Context, if reported via GL-Version-String w/o ↵Sven Gothel2013-12-211-2/+33
| | | | | | | | | | | | | | | | | | | EGL_OPENGL_ES3_BIT_KHR Add Quirk 'GLES3ViaEGLES2Config': ES3 Context is used via EGL_OPENGL_ES2_BIT and 'version 2' for create context attributes. - GLContextImpl.setGLFunctionAvailability(..)'s ES version validation only fails if requested major version == 1 and doesn't match. Hence requesting major==2 and having version 3 is tolerated. - GLContextImpl.setGLFunctionAvailability(..)'s Quirks: requested-major < has-major -> Adding GLES3ViaEGLES2Config - EGLDrawableFactory.mapAvailableEGLESConfig(..): Reflects has-major version, i.e. GLES3ViaEGLES2Config situation where an ES2 request leads to an ES3 version. Note: All workarounds can be found via lookup of GLES3ViaEGLES2Config (as usual when using quirks).
* Merge pull request #76 from esemplare/masterSven Gothel2013-12-151-1/+32
|\ | | | | Fix Bug 362: calculated dimensions for MipMaps smaller than 16x16
| * Fix Bug 362: calculated dimensions for MipMaps smaller than 16x16Michael Esemplare2013-12-111-1/+32
| | | | | | | | | | Added method to calculate mipmap blocksize for uncompressed and DXTn images
* | Bug 918 (2/2): Determine StreamWorker usage after stream-init ; Fix seek(..) ↵Sven Gothel2013-12-111-1/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ; 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 747: VectorUtil: Make scale(..) creating new float[] deprecated, adding ↵Sven Gothel2013-12-101-5/+33
| | | | | | | | | | 'in place' variant w/ passing result float[] ; TODO: Replace all variations with 'in place' version to be more memory efficient. Make scale(..) creating new float[] deprecated, adding 'in place' variant w/ passing result float[] TODO: Replace all variations with 'in place' version to be more memory efficient. See Bug747: Validate memory footprint and usage / General performance
* Bug 909 - Reccreate GLJPanel's BufferedImage is no more sourced by singleton ↵Sven Gothel2013-11-211-13/+17
| | | | | | | | | | | | AWTGLPixelBuffer GLJPanel must validate whether it's local BufferedImage's DataBuffer is sourced by the current singleton AWTGLPixelBuffer. Case: GLJPanel-B has created a new singleton AWTGLPixelBuffer w/ increased size. Previous created GLJPanel-A's local BufferedImage's DataBuffer is no more sourced by the singleton AWTGLPixelBuffer and hence must be re-created.
* Fix javadoc: TileRendererBase (links to manual anchors) and ↵Sven Gothel2013-11-121-4/+4
| | | | GLSharedContextSetter (remove <> in links, more details on Immersion.16.
* Simplify Animator* Synchronization: Remove barrier 'stateSync' and favor ↵Sven Gothel2013-11-103-162/+81
| | | | | | | | | | | | simple 'synchronized' on Animator for field-get, which is already used in most methods Utilizing a 2nd synchronization object 'stateSync' besides the main sync object, Animator itself, is hard to maintain. It's performance advantages for querying states ae questionable and may even introduce bugs. Use synchronization on Animator instance for all field read/write access. Fix unsynchronized write access of 'animThread' in Animator.MainLoop.run().
* Android ES3 Movie Demos: Add workaround for: P0003: Extension ↵Sven Gothel2013-11-072-3/+3
| | | | | | | | | 'GL_OES_EGL_image_external' not supported + // Bug on Nexus 10, ES3 - Android 4.3, where + // GL_OES_EGL_image_external extension directive leads to a failure _with_ '#version 300 es' ! + // P0003: Extension 'GL_OES_EGL_image_external' not supported + preludeGLSLVersion = false;
* Bug 898: Apply best efford on Animator operation's finishLifecycleAction(..) ↵Sven Gothel2013-11-071-19/+41
| | | | in !blocking mode, i.e. notifyAll() if waitCondition holds and test again
* Bug 890 - Fix GLES3 Profile Mapping, i.e. GL2ES2 queries and mappings; ↵Sven Gothel2013-11-075-7/+27
| | | | | | | | | | | | | | | | | | | | 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(..)
* GLRendererQuirks: Add GLSharedContextBuggy ('Mesa Intel 9.2.1' and ↵v2.1.2Sven Gothel2013-11-011-3/+40
| | | | | | | 'Hisilicon Immersion.16') Note: Even though Mesa Intel driver crashes w/ heavy multithreading (Bug 873), it works well w/ our multithreaded GLMediaPlayer.
* Bug 885 - GLMediaPlayer: Allow single threaded mode - Especially where ↵Sven Gothel2013-11-011-3/+6
| | | | | | | | | | | | 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. -
* Add functions for converting to and from binary16 half-precision floating ↵Mark Raynsford2013-10-313-0/+801
| | | | point values. Derived from http://mvn.io7m.com/ieee754b16, of which I am the original author.
* Bug 776 GLContext Sharing: Fix copy-ctor GLArrayDataClient: Create new ↵Sven Gothel2013-10-301-1/+12
| | | | | | instance of GLArrayHandler of same type; Simplify GLArrayHandler inheritance. Refines commit 9f2a9df0a4b7093925c8854b37fba053469a4b35
* Bug 877 Concurrency Discussion: Update doc MultiThreading.txt, volatile ↵Sven Gothel2013-10-291-1/+1
| | | | field usage; GLDrawableImpl: Make read-only fields final.
* Bug 776 GLContext Sharing: Add copy-ctor to GLArrayData* w/ sliced Buffer; ↵Sven Gothel2013-10-293-0/+89
| | | | | | | | | | | Refine GearsObject* GLArrayDataServer copying; GearsES*: Init VBO eagerly Add copy-ctor to GLArrayData* w/ sliced Buffer to allow general sharing of VBO via these high-level types. Refine GearsObject* GLArrayDataServer copying (commit bcfaa149b9803ce33c5a356cbcb45f7dfd3e4361): Utilize new GLArrayData* copy-ctor. GearsES*: Init VBO eagerly, allowing VBO usage after init(..).
* Bug 876: BuildComposablePipeline: getGL*() shall not return ↵Sven Gothel2013-10-291-13/+20
| | | | | | | | | | | | | | | | | | | downstream.getGL*() [TraceGL* / DebugGL*] ; Simplify GLContextImpl's set Debug/Trace Pipeline Regression of commit 0002fccdcd6383874b2813dc6bbe3e33f5f00924: "Trace/Debug shall utilize downstream identification for isGL*() and getGL*() methods." Using the downstream identification commit is right for the isGL*() case, however, getGL*() returned the downstream object which makes the caller loosing the pipeline! Instead, we shall produce !GEN_GL_IDENTITY_BY_ASSIGNABLE_CLASS: "if( isGL<type>() ) { return this; } throw new GLException("Not a <type> implementation");" or for GEN_GL_IDENTITY_BY_ASSIGNABLE_CLASS: "return this;"
* Bug 776 GLContext Sharing: Add GLSharedContextSetter to SWT GLCanvasSven Gothel2013-10-281-37/+146
|
* Bug 776 GLContext Sharing: Add note about driver stability (destruction ↵Sven Gothel2013-10-281-0/+45
| | | | | | | | | | | | | | | | | | | | | order) ; Fix unit tests (Shared Gears, wait for created context and destruction order) - Add note about driver stability (destruction order) - See GLSharedContextSetter: Don't destroy master context before slaves! - Fix spec-overview.html#SHARED links, add link to GLSharedContextSetter in SHARED subsection. - Fix unit tests (Shared Gears, wait for created context and destruction order) - The GearsObject sharing was completly bogus! It simply used the _same_ GLArrayDataServer instance for sharing, but it should use a _copy_ of the shared GLArrayDataServer while only preserving the VBO object! Fixed, while adding required methods to GLArrayDataServer. - Waiting for the created GLContext of a GLAutoDrawable required us to pass the latter _and_ check whether it's GLContext exists and is natively created. - Accomodated the destruction order - see above!
* Bug 776 GLContext Sharing: Refine API for relaxed and lazy GLContext sharing ↵Sven Gothel2013-10-273-19/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ; Fix GLContext memory contract (volatile) (Unit test remarks see below) - Add shared GLContext queries - Refined GLContextShareSet: - Use IdentityHashMap since GLContext's can only be identical w/ same reference (footprint, performance) - Add API doc for clarification - Add methods: - ArrayList<GLContext> getCreatedShares(final GLContext context) - ArrayList<GLContext> getDestroyedShares(final GLContext context) - Use 'final' where possible - Add GLContext methods: - boolean isShared() - List<GLContext> getCreatedShares() - List<GLContext> getDestroyedShares() - Add GLSharedContextSetter interface defining setting a shared GLContext directly (GLContext) or via a GLAutoDrawable: - setSharedContext(GLContext) - setSharedAutoDrawable(GLAutoDrawable) Both cause initialization/creation of GLAutoDrawable's drawable/context to be postponed, if the shared GLContext is not yet created natively or the shared GLAutoDrawable's GLContext does not yet exist. Most of impl. resides in GLDrawableHelper Implemented in: - GLAutoDrawableBase, GLOffscreenAutoDrawable - GLWindow - AWT GLCanvas TODO: - GLJPanel - SWT GLCanvas - GLDrawableFactory: - Add 'GLOffscreenAutoDrawable createOffscreenAutoDrawable(..)' variant w/o passing the optional shared GLContext _and_ specifying lazy GLContext creation. This allows to benefit from GLSharedContextSetter contract. Lazy GLContext creation is performed at 2st display() call at the latest. All JOGL code and unit tests use this new method now. - Mark 'createOffscreenAutoDrawable(..)' w/ shared GLContext argument and immediate GLContext creation deprecated - shall be removed in 2.2.0 - Make reference to GLContext and it's native handle volatile Since we rely on the query 'GLContext.isCreated()' to properly allow GLAutoDrawable's to query whether a shared GLContext is natively created (already), the handle must be volatile since such query and the actual creation may operate on different threads. +++++ - Add/Refine shared GLContext unit tests demonstrating diff. sharing methods. All variants of using shared GLContext: com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBO* Most convenient way to share via setSharedAutoDrawable(GLAutoDrawable): com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2[NEWT|AWT]3 AWT use w/ JTabbedPane using setSharedAutoDrawable(GLAutoDrawable): com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextWithJTabbedPaneAWT
* API doc: GLStateKeeper (wording), GLAutoDrawable (enh. init desc.), ↵Sven Gothel2013-10-271-3/+3
| | | | GLDrawable (Shared Context)
* Fix Bug 872: ES3 and ES3-GLSL Version not properly HandledSven Gothel2013-10-251-5/+20
| | | | | | | | | | | | | | | | GLContext: - Proper API doc for Version* fields - getStaticGLSLVersionNumber(): ES3 -> Version300 - hasGLSL(): Add ES3 ShaderCode: - addDefaultShaderPrecision(): - ES2 default precision: Don't 'tune up' default precision for fragment shader, use 'mediump' - Add ES3 default precision (equal to ES2 default precision) - requiresDefaultPrecision(): Shall returns 'true' for ES3 as well!
* Merge remote-tracking branch 'hharrison/master'Sven Gothel2013-10-258-132/+121
|\
| * jogl: add generics annotations to lists in the waveout codeHarvey Harrison2013-10-231-9/+9
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: add generic annotations to the packed rectangle utility packageHarvey Harrison2013-10-233-51/+47
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: indent trace statements in the Trace pipelines when we hit glBeginHarvey Harrison2013-10-231-0/+3
| | | | | | | | | | | | | | | | | | The indent was being reduced on glEnd/glEndList but was never being incremented. The intent appeared to be to indent all statements between glBEgin/glEnd pairs to show the nested context of those calls. Add the increment after printing the glBegin trace statement. Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: add final to Debug wrapper error code and fix indentationHarvey Harrison2013-10-231-4/+6
| | | | | | | | | | | | Make the indentation consistent in each function wrapper. Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: pass format and arguments directly to the printGLError functionHarvey Harrison2013-10-221-7/+11
| | | | | | | | | | | | | | This saves us a bit more code size as the String.format is now in the common helper rather than in every GL wrapper function. Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: save on class size in the Debug pipelinesHarvey Harrison2013-10-221-11/+22
| | | | | | | | | | | | | | Using a format String and arg list produces smaller class files for the Debug classes as many of the format strings are identical and shared. Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: do not generate an extra String for the Debug pipeline wrappersHarvey Harrison2013-10-221-4/+4
| | | | | | | | | | | | | | | | Build the caller string directly and don't wrap it in an extra constructor. Update the indentation level for the newly added if-block from the previous commit. Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: change code generation for Debug pipelines to avoid building large stringsHarvey Harrison2013-10-221-15/+11
| | | | | | | | | | | | | | | | | | - split the check for a GL error from the output of the error string - only build the caller String when there is an error to report - wrap String building in an if() block rather than using an early return as we don't know the return type in the postDownstreamCallHook Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: use .format() to build the method signature when generating pipeline codeHarvey Harrison2013-10-211-8/+4
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: adapt code generator to output @Override annotations in various placesHarvey Harrison2013-10-211-1/+2
| | | | | | | | | | | | | | This adds the @Override to methods in the GL implementations (debug, trace, etc) for methods implementing a GL Profile. It also adds @Override for the toString() method. Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: enable generics annotations on TextRendererHarvey Harrison2013-10-201-16/+13
| | | | | | | | | | | | These were already here, enable them. Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: remove clone() version that can only ever failHarvey Harrison2013-10-201-17/+0
| | | | | | | | | | | | | | | | | | | | commit: d75835796900cac602f7e5789601ffba0a27efe2 (Graph: More std. functionality (equals, clone) / Better in-place transformation (cubic -> quadratic)) Added a clone method, but did not implement Cloneable, meaning Object.clone() will always throw CloneNotSupportedException. This method never returns anythng but null. Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: replce more unneeded String() constructionHarvey Harrison2013-10-201-1/+1
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
* | JoglVersion: "Default Profiles on device" -> "GLProfiles on device" - Since ↵Sven Gothel2013-10-251-1/+1
| | | | | | | | we do use the named device
* | Bug 867 - OSX 10.9: Recognize OpenGL Core Profile > 3.0 - Add ↵Sven Gothel2013-10-241-15/+84
|/ | | | | | | | | | | | GLRendererQuirks: Quirk GL4NeedsGL3Request and 'sticky device quirks' The 'sticky device quirks' are required to share quirks among devices as collected while mapping the GL versions (audit). Those are context independent and may only be detected for certain contexts. They can be pushed/added to the context's quirks, but also queried at context creation (after mapping) - before the local quirks are being created.
* Fix Bug 827 - ShaderProgam helper class reports errors incorrectlySven Gothel2013-10-191-2/+2
|
* jogl: allow short-circuited comparison in comparisonHarvey Harrison2013-10-181-1/+1
| | | | | | | For this case && and & work equivalently, but using && allows the second comparison to be omitted if the first comparison is false. Likely just a typo. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: fix typo in RandomTileRenderer, range chack was for tY, not tX againHarvey Harrison2013-10-171-1/+1
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* jogl: allow case statements to fall through to same blockHarvey Harrison2013-10-171-2/+0
| | | | | | | | This block is falling through to the next cases where there two variables are set to the same values. Just remove this block and let all cases fall through to the same block. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: add missing @Override annotationsHarvey Harrison2013-10-1758-0/+255
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* jogl: remove all trailing whitespaceHarvey Harrison2013-10-17131-3615/+3615
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Add efficient set(..all..) to Dimension, Insets, Point and Rectangle of ↵Sven Gothel2013-10-162-8/+4
| | | | NativeWindow's util types.
* GLMediaPlayer: Fix CameraInputScheme URI doc and Android test streams (Use ↵Sven Gothel2013-10-151-1/+1
| | | | mp4 instead of webm, fix Camera URI)
* Bug 859: Let TileRenderer detect zero columns and rows in eot() where ↵Sven Gothel2013-10-123-26/+133
| | | | beginTile() throws an EOT IllegalStateException to avoid division by zero