| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Macro redefine 'texture2D -> texture'
was added _after_ the custom texture lookup insertion
causing GL3-core to fail.
|
|
|
|
| |
SAMPLE_COUNT is of type 'int'
|
|
|
|
| |
OpenAL/JOAL (works using openal-soft default on all platforms now)
|
|
|
|
|
| |
NullAudioSink shall return the last enqueued PTS in getPTS()
not causing a-v delta measure based on lagging audio in player.
|
|
|
|
|
| |
The texture unit has to be updated always,
since program maybe used by multiple regions and diff. texUnits
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
surface DPI ; Add NEWT Window.getPixelsPerMM(..) to query surface DPI
With HiDPI and surface scale, we need knowledge of the native surface's pixel-scale
matching the monitor's pixel-per-millimeter value.
Preserving the queried native pixel-scale and exposing it via
ScalableSurface.getNativeSurfaceScale(..) to compute surface DPI.
Add NEWT Window.getPixelsPerMM(..) to query surface DPI.
Surface DPI is demonstrated in GraphUI's GPUUISceneGLListener0A .. and TestRulerNEWT01, etc ..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
entry, fixed NewtCanvasAWT use-case
We require the requested pixelScale in NewtCanvasAWT if the NEWT window (child)
is not yet realized, so the JAWTWindow can receive the request,
since realized/current pixelScale is still 1.
Remove return value (requested pixel scale):
- public int[] setSurfaceScale(final int[] result, final int[] pixelScale);
+ public void setSurfaceScale(final int[] pixelScale);
Add API hook to query requested pixel scale:
+ int[] getRequestedSurfaceScale(final int[] result);
Unique name for get[Current]*:
- public int[] getSurfaceScale(final int[] result);
+ public int[] getCurrentSurfaceScale(final int[] result);
|
|
|
|
|
|
|
|
|
|
|
|
| |
which also fixed JAWTWindow getSurfaceScale() issue on Windows
Let setSurfaceScale(..) return the validated requested values
and getSurfaceScale(..) always the current values.
This removes complication and solves a bug w/ JAWTWindow on Windows,
where we used 'drawable' as an indicator for 'previous locked' state.
The latter is not true since on Windows 'drawable' is set to null in unlock,
getWindowHandle() should be taken instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OSX impl.
Add ScalableSurface interface
- To set pixelScale before and after realization
- To get pixelScale
- Implemented on:
- NEWT Window
- Generic impl. in WindowImpl
- OSX WindowDriver impl.
- Also propagetes pixelScale to parent JAWTWindow if offscreen (NewtCanvasAWT)
- AWT WindowDriver impl.
- JAWTWindow / OSXCalayer
- AWT GLCanvas
- AWT GLJPanel
- NEWTCanvasAWT:
- Propagates NEWT Window's pixelScale to underlying JAWTWindow
- WrappedSurface for pixelScale propagation
using offscreen drawables, i.e. GLJPanel
- Generic helper in SurfaceScaleUtils (nativewindow package)
- Fully implemented on OSX
- Capable to switch pixelScale before realization,
i.e. native-creation, as well as on-the-fly.
- Impl. uses int[2] for pixelScale to support
non-uniform scale.
Test cases:
- com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT
- com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT
- com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT
- com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT
- Press 'x' to toggle HiDPI
- Commandline '-pixelScale <value>'
- Added basic auto unit test (setting pre-realization)
|
|
|
|
| |
EGLUpstreamSurfaceHook) to generalize ProxySurfaceImpl.getUpstreamSurface()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NativeWindow; [AWT|SWT]NewtEventFactory use NativeSurfaceHolder as source, fixes pixel unit conversion
- Add new NativeSurfaceHolder interface to GLDrawable and NativeWindow, allowing NativeSurface access (pixel unit conversion)
A NativeSurfaceHolder is e.g.:
- NativeWindow (is-a)
- NEWT [GL]Window
- GLDrawable (has-a)
- [AWT|SWT]GLCanvas
- [AWT|SWT]NewtEventFactory use NativeSurfaceHolder as source, fixes pixel unit conversion
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if possible (ES3 spec requirement)
Make FBObject's sampling sink format compatible w/ sampling source if possible,
i.e. for all GL profiles but ES1 and ES2.
This is an ES3 spec requirement:
For ES3, sampling-sink colorbuffer format must be equal w/
the sampling-source Colorbuffer.
ES3 BlitFramebuffer Requirements: OpenGL ES 3.0.2 p194: 4.3.2 Copying Pixels:
If SAMPLE_BUFFERS for the read framebuffer is greater than zero, no copy
is performed and an INVALID_OPERATION error is generated if the formats of
the read and draw framebuffers are not identical or if the source and destination
rectangles are not defined with the same (X0, Y 0) and (X1, Y 1) bounds.
Texture and Renderbuffer format details:
ES2 Base iFormat: OpenGL ES 2.0.24 p66: 3.7.1 Texture Image Specification, Table 3.8
- ALPHA, LUMINANCE, LUMINANCE_ALPHA, RGB, RGBA
ES3 Base iFormat: OpenGL ES 3.0.2 p125: 3.8.3 Texture Image Specification, Table 3.11
- ALPHA, LUMINANCE, LUMINANCE_ALPHA, RGB, RGBA
DEPTH_COMPONENT, STENCIL_COMPONENT, RED, RG
ES3 Required Texture and Renderbuffer iFormat: OpenGL ES 3.0.2 p126: 3.8.3 Texture Image Specification
- RGBA32I, RGBA32UI, RGBA16I, RGBA16UI, RGBA8, RGBA8I,
RGBA8UI, SRGB8_ALPHA8, RGB10_A2, RGB10_A2UI, RGBA4, and
RGB5_A1.
- RGB8 and RGB565.
- RG32I, RG32UI, RG16I, RG16UI, RG8, RG8I, and RG8UI.
- R32I, R32UI, R16I, R16UI, R8, R8I, and R8UI.
+++
Our implementation shall attempt to use the same format
for the sampling-source and -sink
wherever possible, e.g. GL2ES3 (excluding ES1 and ES2)!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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!
|
|
|
|
| |
API stability
|
|
|
|
|
|
|
|
| |
TextureSequence's fragment shader hash-code
Adding TextureSequence.getTextureFragmentShaderHashCode() allowing to use a cached hash-code (performance, interface usability).
Implemented in GLMediaPlayerImpl and ImageSequence.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
| |
method from TextureIO
|
|
|
|
| |
validation (libavutil)
|
|\ |
|
| |
| |
| |
| |
| |
| | |
pspec is never initialized, this would have always crashed.
Signed-off-by: Harvey Harrison <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Harvey Harrison <[email protected]>
|
|/
|
|
| |
test-ntsc01-28x16.png asset ; Generalize TextureSequenceDemo01 -> SingleTextureSeqFrame ; Unit tests use test-data, not assets.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
clarity and unique method naming
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
added; ShaderCode.addDefaultShaderPrecision(..): Branch GLES3 before GLES2, since gles2.isGLES2() == true
|
| |
|
|
|
|
| |
when source becomes ready
|
|
|
|
|
|
|
| |
incl. getNormal*(..) and getPlane*(..)
AABBox.getRayIntersection(..) provides the intersecting coordinates,
where the fast alternative AABBox.intersectsRay(..) does not.
|
|
|
|
| |
setting identity
|
|
|
|
| |
(UIShape blend clear-color, RegionRenderer initialized) ..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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, ..
|
|
|
|
| |
seems to be down / Use h264 stream for 'desktop' as well
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove 'const' qualifier in shader graph code for non 'absolute' const values
- Use extension directive OES_standard_derivatives only for ES2.0, not ES3.0 (graph shader)
- Compare float w/ float literals, not int literals!
- Android Demo NEWTGraphUI2pActivity:
- Is a VBAA example, hence disable scene MSAA!
|
|
|
|
| |
Reduce text contrast by 1/10th allowing better AA ; GPUUISceneGLListener0A uses proportional window height font size and one label w/ 10pt
|
| |
|