aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Bug 741 HiDPI: Refine Monitor/Screen [virtual] Viewport Definition / Add ↵Sven Gothel2014-05-2660-799/+1550
| | | | | | | | | | | | | | | | | | | | NEWT Support / Fix JAWT getPixelScale deadlock - NativeWindow/Surface/NEWT API DOC: Define Coordinate System of Window and Screen - OSXUtil: Add getPixelScale(..) via Screen index and 'windowOrView' - JAWTWindow/JAWTUtil.getPixelScale(..): Use pre-fetched AWT GraphicsConfiguration to solve AWT-TreeLock (deadlock) - [Virtual] Viewport of MonitorDevice and Screen: - Properly calculate and expose [virtual] viewport in window and pixel units - OSX Monitor viewports in pixel units are 'reconstructed' - Window/Viewport to Monitor selection shall be perfomed via window units (unique) - OSX NEWT Window create/init (native): Use given size and coordinates even in fullscreen mode Don't override by quering NSScreen coordinates, trust given values. - Fix test cases, i.e. usage of pixel- and window-units
* Bug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units: ↵Sven Gothel2014-05-2328-451/+589
| | | | | | | | | | | | | | | Refine commit fb57c652fee6be133990cd7afbbd2fdfc084afaa - NEWT Screen, Monitor, MonitorMode, .. - All Units are in pixel units, not window units! - On OSX HiDPI, we report the current scaled monitor resolution, instead of the native pixel sized. Need to filter out those, i.e. report only native unscaled resolutions, since out MonitorMode analogy is per MonitorDevice and not per window! - Fix usage (one by one) of - Screen and Monitor viewport usage
* Bug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units: ↵Sven Gothel2014-05-2265-362/+548
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-21161-762/+1147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bug 742 HiDPI: Add prelim HiDPI support to GLJPanel w/o API change and w/o ↵Sven Gothel2014-05-202-20/+55
| | | | | | | fixing AWTPrintLifecycle DPI evaluation We also have to re-validating AWTPrintLifecycle's DPI semantics, since we currently are based on pixel dimension w/ 72 dpi!
* Bug 742 HiDPI: Add access to private HiDPI in AWT pixelScale value in ↵Sven Gothel2014-05-202-3/+87
| | | | JAWTUtil and JAWTWindow
* 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-204-4/+52
| | | | | | | | 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.
* Bug 801: Fix RegionRenderer's TextureSequence shader program selection ↵Sven Gothel2014-05-191-1/+10
| | | | | | | | | | (recognize diff. TextureLookupFragmentShader and TextureSampler2DType) Fix RegionRenderer's TextureSequence shader program selection, i.e. TextureLookupFragmentShader and TextureSampler2DType are considered in the ShaderProgram hash key selector. Now the proper ShaderProgram for different TextureSequence objects will be selected, e.g. diff video pixel formats and/or texture sampler types.
* Bug 801: Split GraphUI's TextureButton: TextureSeqButton (Base) and it's ↵Sven Gothel2014-05-1913-243/+638
| | | | | | | | | | | | | | | | | | | | | | derivations ImageSeqButton + GLEventListenerButton + MediaPlayerButton Split GraphUI's TextureButton to TextureSeqButton (Base) and it's derivations: - ImageSeqButton - displays an ImageSequence - GLEventListenerButton - displays any GLEventListener as rendered into FBO as an ImageSequence - MediaPlayerButton - displays movies - Added public ImageSequence impl. TextureSequence, was private SingleTextureSeqFrame. - Demo GPUUISceneGLListener0A shows: - MediaPlayerButton w/ Big Buck Bunny film - GLEventListenerButton w/ GearsES2 - ImageSeqButton w/ 2 textures (pressed/released)
* Minor edits: Fix comments / API-docsSven Gothel2014-05-196-7/+33
|
* Texture/TextureIO: Make 'wrapping' Texture ctor public, remove same factory ↵Sven Gothel2014-05-193-50/+35
| | | | method from TextureIO
* TestVersionSemanticsNOUI: Derive from JunitTracerSven Gothel2014-05-141-2/+2
|
* Unit Test: Added Semantic Version Test (Current version agains v2.1.5)Sven Gothel2014-05-136-16/+144
| | | | | | | See GlueGen commits: - c06288d2a12586ab8df3715cf130549fdd7499fb - 64615f17a8c63f692159235e169dbdd14d30b737 - 1a504fa682e6f28c5543da4d5885c7f2ff4ed3f1
* JAWTWindow: Non intrusive workaround for Bug 1004 and providing ↵Sven Gothel2014-05-123-8/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AppContextInfo to mitigate related bugs, e.g. Bug 983 Bug 1004, as well as Bug 983, are caused by issueing certain AWT tasks from a Thread which ThreadGroup is not mapped to a valid sun.awt.AppContext (AppContext). The 'certain AWT tasks' are all quering the current EventQueue instance, which is associated to the AppContext. This operation will fail and cause a NullPointerException. This workaround simply gathers a ThreadGroup which is mapped to the desired AppContext. This AppContext ThreadGroup is being used to launch a new Thread which is then mapped to an AppContext and hence can issue all AWT commands. +++ In the Bug 1004 scenario, JAWTWindow is constructed from within the AWT EDT, which ThreadGroup does belong to the AppContext. Here the issue is that an AWT operation was invoked from the OSX main thread, which itself does not belong to the AppContext. The workaround as described above solves this issue. +++ For Bug 983 the scenario is different, since JAWTWindow is _not_ constructed from a thread which ThreadGroup is mapped to the AppContext. [It is also not constructed on the AWT-EDT]. It is recommended to have Java3D gathering the AppContextInfo itself early and issues the JAWTWindow creation on an eligible thread using AppContextInfo.invokeOnAppContextThread(..) similar to JAWTWindow.attachSurfaceLayer(..). This will allow removing the more intrusive remedy of Java3D commit bdda2ac20bfef85271da764d1989ec3434d5c67a and simply issuing the crucial commands on a proper thread. +++ The more intrusive workaround of above commit does not work in general at least for Bug 1004 (OSX and Applets). While forcing the mapping of the 'alien' thread-group to the AppContext work for the 1st launch w/ the 1st AppContext, a second launch w/ a new AppContext will fail. Here we did update the new AppContext knowledge in AppContextInfo, however a NPE is received in getEventQueue() .. since the AppContext is gathered after patching, but the EventQueue is still null. Further more, using static knowledge of AppContext/ThreadGroup mapping violates at least the Applet lifecycle. Here we can have one ClassLoader with multiple AppContext - i.e. Applets.
* Add generic manual build script to test against distribution's default ↵Sven Gothel2014-05-091-0/+29
| | | | openjdk + ant
* FFMPEGMediaPlayer / FFMPEGv10Natives: Fix libav-10 and ffmpeg-2.x version ↵Sven Gothel2014-05-0969-17/+25
| | | | validation (libavutil)
* Libav/FFMpeg: Bump headers of final version libav-10 / ffmpeg-2.2Sven Gothel2014-05-0929-283/+1120
|
* Fix MovieCube/MovieSimple Graph-Text Usage: Add Alpha Blending otherwise ↵Sven Gothel2014-05-092-4/+4
| | | | shader cannot work properly
* manual tests: Add exp. gluegen-rt-alt.jar to 'ALT' classpathSven Gothel2014-05-092-1/+6
|
* Fix some unit tests: Add ant-junit4.jar to classpathSven Gothel2014-05-091-6/+13
|
* HowToBuild: ant 1.8.2 ; Complete GNU/Linux dependencies w/ openjdk, ant and ↵Sven Gothel2014-05-091-5/+27
| | | | p7zip, refine Debian 7 and 8 i386 on amd64 details
* Manual test scripts: Pass classpath via '-cp' instead of env CLASSPATHSven Gothel2014-05-093-30/+31
|
* 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-109-52/+54
|/ | | | test-ntsc01-28x16.png asset ; Generalize TextureSequenceDemo01 -> SingleTextureSeqFrame ; Unit tests use test-data, not assets.
* Bug 801: Introd. RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED hinting to ↵Sven Gothel2014-04-109-7/+47
| | | | | | | | | | | | deal w/ GL_DEPTH_TEST accordingly Fixes VBORegion2PMSAAES2 no-depth-buffer usage and allows user to control behavior w/o quering GL state. If BITHINT_GLOBAL_DEPTH_TEST_ENABLED set: - RegionRenderer.defaultBlendEnable: glDepthMask(false) - RegionRenderer.defaultBlendDisable: glDepthMask(true) - VBORegion2PMSAAES2 enables/disables GL_DEPTH_TEST, otherwise MSAA is corrupt.
* GraphUISceneDemo Applet: Add JOAL for GLMediaPlayer usageSven Gothel2014-04-105-0/+10
|
* build-test.xml: Handle hs_err_pid*.log files, i.e. clean-up and archiveSven Gothel2014-04-091-0/+8
|
* Bug 801: LabelButton uses DEFAULT_2PASS_LABEL_ZOFFSET in any mode, due to ↵Sven Gothel2014-04-093-38/+23
| | | | disabled depth buffer in blend mode
* NEWT MouseEvent: Decouple pointerIds from single-pointer button, i.e. always ↵Sven Gothel2014-04-093-114/+100
| | | | | | | | | | | | | | use proper pointerId >= 0 In case of single-pointer mouse events, always use pointerId 0, don't derive from button name. Multiple pointer events still derive button name from the 'action' pointerId. This allows applications to utilize pointerId equally for single and multiple pointer events. Passed all 'junit.run.newt.event' unit tests
* VectorUtil: Fix method names, i.e. use type-suffix in end of function for ↵Sven Gothel2014-04-096-128/+128
| | | | clarity and unique method naming
* Bug 801: Region Dirty Update; TextureSequence GLMediaPlayer Fix; Blending Fix ;Sven Gothel2014-04-0922-379/+828
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Region Dirty Update - Split dirty -> ShapeDirty + StateDirty, where StateDirty forces re-rendering content w/o geometry update as req. for 2-pass mode. - Fix TextureSequence (GLMediaPlayer) usage in RegionRenderer / GLRegion* - handle GL_TEXTURE_EXTERNAL_OES incl. Android ES3 bug - inject TextureSequence's shader stubs - shader: Use abstract lookup 'texture2D' -> 'gcuTexture2D' - flip scaled colorTexBBox if TextureSequence 'tex.getMustFlipVertically()' - TODO: Handle multiple TextureSequence shader programs! - Fix Blending: GLRegion* / RegionRenderer / RenderState - Disable/Enable depth-writing w/ blending - Region impl. sets proper glBlendFunc*(..), i.e. 2-pass: - render2FBO: glClearColor(0f, 0f, 0f, 0f) glBlendFuncSeparate(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA, GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA) - renderFBO: glBlendFunc(GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA) - User code shall not set glClearColor(..) for 2-pass anymore - Graph-UI Demo - UIShape: - Add MouseGestureListener, combining MouseListener + GestureListener - EventDetails -> PointerEventInfo - PointerEventInfo contains objPos (ray-intersection) and glWin-pos - Toggle: - Separate color (on/off) if enabled - Toggle on click if enabled - SceneUIController - Use PinchToZoomGesture and propagete same gesture to UIShape - Use AABBox.getRayIntersection(..) using 'real' shape coordinates for 1st picking. - Use shape PMV for secondary picking (drag, zoom 2-pointer, etc), see windowToShapeCoords(..) - Sort shapes according to z-value (render: ascending; picking: descending) - Only 'drag' if pointerId matches 1st pressed pointer
* Fix ShaderCode.insertShaderSource(..): Return 'position' if nothing has been ↵Sven Gothel2014-04-091-7/+7
| | | | added; ShaderCode.addDefaultShaderPrecision(..): Branch GLES3 before GLES2, since gles2.isGLES2() == true
* FFMPEGMediaPlayer: Use 'const' qualifier in shader stubSven Gothel2014-04-091-4/+4
|
* PinchToZoomGesture: Add 'delta' value [-1..1], move 'InputEvent trigger' up ↵Sven Gothel2014-04-092-12/+44
| | | | to GestureHandler
* Add TextureSequence.isTextureAvailable(), allowing triggering action only ↵Sven Gothel2014-04-093-0/+14
| | | | when source becomes ready
* Add AABBox.getRayIntersection(..), VectorUtil.line2PlaneIntersection(..) ↵Sven Gothel2014-04-094-2/+319
| | | | | | | incl. getNormal*(..) and getPlane*(..) AABBox.getRayIntersection(..) provides the intersecting coordinates, where the fast alternative AABBox.intersectsRay(..) does not.
* Fix Quaternion.rotateByEuler(..): Zero rotation shall lead to NOP instead of ↵Sven Gothel2014-04-091-2/+2
| | | | setting identity
* NEWT Events: Use final .. (minor edit)Sven Gothel2014-04-059-48/+52
|
* Bug 801: Fix regressions from 9c71f276d1fcc87b69b413847fd1da34b30d0932 ↵Sven Gothel2014-04-044-17/+19
| | | | (UIShape blend clear-color, RegionRenderer initialized) ..
* Bug 801: Cleanup shader-program location/data update ; Add COLORTEXTURE + ↵Sven Gothel2014-04-0438-430/+873
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TextureSequence to Region (Demo: TextureButton) Cleanup shader-program location/data update - GLUniformData: - Allow lazy data setup, as used for RenderState.ProgramLocal, see below - RenderState - Separate data (pmv, weight, colorStatic) from program-local uniforms -> add class ProgramLocal. Reduces uniform location lookups, since ProgramLocal is bound to Region impl. - ProgramLocal.update(..) needs to write uniform data always, since data is being used in multiple programs! - No 'dirty' tracking possible, removed - see above. - RegionRenderer - Fix shader-selection: 2-pass programs differ from 1-pass! - No shader-setup at init +++ Add COLORTEXTURE + TextureSequence to Region - Create color-texture coords in vertex-shader via region's bounding box (pass-1) - Use color-texture unit in pass-1 if enabled (own shader program) - Use TextureSequence in Region impl. providing all required data (unit + texture-name) - Demo: TextureButton (a UIShape)
* Bug 801: Reduce temp. object creation, i.e. GC loadSven Gothel2014-04-0218-238/+283
|
* Bug 801: WIP 2/2 - Add color attribute; Switch Shader instead of branching ↵Sven Gothel2014-04-0241-605/+529
| | | | | | | | | | | | | | in shader; Update attributes and uniforms manually, drop ShaderState; - Due to shader-switching, 'renderModes' are now local to Region, e.g. UIShape etc - Remove RegionRenderer.renderModes - VBORegion2P*: - Use simple 2x float matrix for orthogonal P+Mv - Cleanup shader
* Merge branch 'master' into graph-wipSven Gothel2014-04-0110-21/+19
|\
| * X11/WGL GLContext Impl: setGLFunctionAvailability(..) w/ ↵Sven Gothel2014-04-014-5/+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.
| * Cleanup *GraphicsDevice: Use 'final' for ctor parameter; ↵Sven Gothel2014-04-016-16/+15
| | | | | | | | DefaultGraphicsDevice.getUniqueID(..) shall perform 'intern()' only once.
* | Bug 801: WIP 1/2 - Add color attribute; Switch Shader instead of branching ↵Sven Gothel2014-04-0185-1785/+2513
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in shader; Update attributes and uniforms manually, drop ShaderState; - ShaderCode - add int insertShaderSource(int shaderIdx, int position, Class<?> context, String path) - insertShaderSource(..): pos==-1 -> append code - VectorUtil - add isVec3InTriangle3(..., float epsilon) - add testSeg2SegIntersection(..., float epsilon) - add testTri2SegIntersection(..., float epsilon) - AffineTransform: Return result for chaining - Font - Add pixel precise 'getPointsBounds(final AffineTransform transform, CharSequence string, float pixelSize)' - Rename getString*() -> getMetric*() - OTGlyph: Release _points field, no more used - - Graph Triangulation - Count additional vertices in: Triangulator, CDTriangulator2D - OutlineShape: - Allow skipping of 'transformOutlines2Quadratic', i.e. allow tagging OutlineShape to be quadratic_nurbs via 'setIsQuadraticNurbs()' - Clarify cleanup ot outlines in same method 'cleanupOutlines()' - Count additional vertices .. - Graph Shader: - Start splitting and segmenting shader code for: - pass1 / pass2 - features, i.e. sampleCont, color-channel, ..