| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
dependency (signal is async); X11Util: XSync w/ discard reusable Display when queue-in.
|
|
|
|
| |
server roundtrips.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
locking, resulting in a native-lock-free impl.
The X11 implementation details of NativeWindow and NEWT used the X11 implicit locking facility
XLockDisplay/XUnlockDisplay, enabled via XInitThreads().
The latter useage is complicated within an unsure environment where the initialization point of JOGL
is unknown, but XInitThreads() requires to be called once and before any other X11 calls.
The solution is simple and thorough, replace native X11 locking w/ 'application level' locking.
Following this pattern actually cleans up a pretty messy part of X11 NativeWindow and NEWT,
since the generalization of platform independent locking simplifies code.
Simply using our RecursiveLock also speeds up locking, since it doesn't require JNI calls down to X11 anymore.
It allows us to get rid of X11ToolkitLock and X11JAWTToolkitLock.
Using the RecursiveLock also allows us to remove the shortcut of explicitly createing
a NullToolkitLocked device for 'private' display connections.
All devices use proper locking as claimed in their toolkit util 'requiresToolkitLock()' in X11Util, OSXUtil, ..
Further more a bug has been fixed of X11ErrorHandler usage, i.e. we need to keep our handler alive at all times
due to async X11 messaging behavior. This allows to remove the redundant code in X11/NEWT.
The AbstractGraphicsDevice lifecycle has been fixed as well, i.e. called when closing NEWT's Display
for all driver implementations.
On the NEWT side the Display's AbstractGraphicsDevice semantics has been clarified,
i.e. it's usage for EDT and lifecycle operations.
Hence the X11 Display 2nd device for rendering operations has been moved to X11 Window
where it belongs - and the X11 Display's default device used for EDT/lifecycle-ops as it should be.
This allows running X11/NEWT properly with the default usage, where the Display instance
and hence the EDT thread is shared with many Screen and Window.
Rendering using NEWT Window is decoupled from it's shared Display lock
via it's own native X11 display.
Lock free AbstractGraphicsDevice impl. (Windows, OSX, ..) don't require any attention in this regard
since they use NullToolkitLock.
Tests:
======
This implementation has been tested manually with Mesa3d (soft, Intel), ATI and Nvidia
on X11, Windows and OSX w/o any regressions found in any unit test.
Issues on ATI:
==============
Only on ATI w/o a composite renderer the unit tests expose a driver or WM bug where XCB
claims a lack of locking. Setting env. var 'LIBXCB_ALLOW_SLOPPY_LOCK=true' is one workaround
if users refuse to enable compositing. We may investigate this issue in more detail later on.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
display connections.
This is a regression of JOGL commit f2cfb6119a3663715ed2d572643949b3bef58662 to fix Bug 610.
Commit f2cfb6119a3663715ed2d572643949b3bef58662 closed all open display connections at
JVM shutdown in order of their creation.
This is required IF the driver is the proprietary ATI on X11.
X11Util.setMarkAllDisplaysUnclosable(true) is called in this case.
However, this behavior causes a SIGSEGV for other GPU driver, i.e. Nvidia :)
This fix only closes the pending display connections in their respective order
IF X11Util.getMarkAllDisplaysUnclosable() == true.
Hence the 'new' cleanup as introduced in the offending commit
is only performed on the erroneous ATI driver.
Manually tested w/ TestGearsES2AWT, see it's commandline options for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NativeWindowFactory's TYPE_* strings, not NEWT's; NEWTFactory: Use default NEWT package name if rel. 'path'.
Use relative sub-package names in NativeWindowFactory's TYPE_* strings, not NEWT's
Otherwise NEWT depends solely on NativeWindowFactory strings
- Default subpackages denominate a relative path, i.e. start with a dot: '.egl', '.windows', '.x11'
- Custom name may be absolute, eg: 'my.company.special.drivers.chip4'
NEWTFactory: Use default NEWT package name if relative 'path'.
- If NativeWindowFactory type starts w/ dot (rel. path), simply prepend the default NEWT package prefix
otherwise use complete package name as-is.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
device denominated 'mutable' surfaces (dummy, offscreen, ..)
Fix follows findings of Rob Hatcherson, but instead of parsing the display connection ourself
we use the X11 macro 'DefaultScreen(display)'
See <http://tronche.com/gui/x/xlib/display/opening.html#Display>
"The screen number specified in the display_name argument is returned by the DefaultScreen() macro
(or the XDefaultScreen() function)."
Since I currently have no two-head X11 setup here, only xinerama via virtualbox,
pls test / validate.
Note: One Display connection may span multiple screens, i.e.:
display 'lala:0.1' may span from screen 1 - 3 (non xinerama mode)
Discussion:
[1] How to validate whether a screen number belongs to one display connection ?
We can query ScreenCount(display), however it is not clear what the range would be.
[2] With 1 display connection spanning multiple screens, what is/are the proper connection string[s] ?
[3] After all, it seems this ancient configuration really cannot beat a modern setup w/ XRandR
having Xinerama enabled. The latter is the default anyways.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLOffscreenAutoDrawable.FBO and as an OffscreenLayerSurface's drawable (OSX) - Fix Bugs 569 and 599
Summary:
=========
The new FBObject based GLFBODrawable implementation allows the seamless utilization of
FBO offscreen rendering in single buffer, double buffer and MSAA mode.
The GLFBODrawable uses a parent drawable based on a
dummy surface to allow a GLOffscreenAutoDrawable.FBO creation
or a mutable surface supporting an existing offscreen layer surface (OSX CALayer).
Offscreen GLDrawable's and GLOffscreenAutoDrawable's can be selected via the
GLCapabilities. If simply !onscreen is selected in the caps instance w/o enabling FBO, PBuffer or Bitmap,
the factory will automatically choose regarding availability:
FBO > PBuffer > Bitmap
Double buffering is supported in MSAA more (intrinsic) and explicit in non MSAA.
It is preferred when delivering resources (texture id's or framebuffer names)
to a shared GLContext.
This is demonstrated in (emulates our OSX CALayer implementation):
TestFBOOffThreadSharedContextMix2DemosES2NEWT,
TestFBOOnThreadSharedContext1DemoES2NEWT
and with the OSX JAWT OffscreenLayerSurface itself. FBO is the preferred choice.
+++
Offscreen drawables can be resized while maintaining a bound GLContext (e.g. w/ GLAutoDrawable).
Previously both, drawable and context, needed to be destroyed and recreated at offscreen resize.
Common implementation in GLDrawableHelper is used in the implementations
(NEWT's GLWindow, AWT GLCanvas, SWT GLCanvas).
+++
Tested:
=======
Manually run all unit tests on:
- Linux x86_64 NVidia/AMD/Mesa3d(ES)
- OSX x86_64 NVidia
- Windows x86_64 NVidia
- Android arm Mali-400/Tegra-2
No regressions.
Disclaimer:
===========
This feature is committed almost in one patch.
Both previous commits were introducing / fixing the capabilities behavior:
90d45928186f2be99999461cfe45f76a783cc961
9036376b7806a5fc61590bf49404eb71830de92f
I have to appologize for the huge size and impact (files and platforms) of this commit
however, I could not find a better way to inject this feature in one sane piece.
NativeWindow Details:
=====================
Complete decoupling of platform impl. detail of surfaces
implementing ProxySurface. Used to generalize dummy surfaces and EGL surfaces
on top of a native platform surface.
- ProxySurface.UpstreamSurfaceHook -> UpstreamSurfaceHook
- abstract class ProxySurface -> interface ProxySurface + ProxySurfaceImpl
- Misc. implementations
JOGL Details:
=====================
FBOObject: API Change / Simplification & Usability
- Removed reference counter to remove complexity, allow user to choose.
- Add 'dispose' flag for detachColorbuffer(..), allowing to keep attachment alive
- Fix equals operation of Attachment
- Check pre-exising GL errors
- Interface Colobuffer gets lifecycle methods
- Add static factory methods to create Attachments w/o FBObject instance
- Reset:
- Clip min size to 1
- Keep alive samplingSink, i.e. don't issue resetMSAATexture2DSink(..).
It gets called at syncFramebuffer()/use(..) later on before actual usage.
This allows the consumer to utilize the GL_FRONT buffer until (e.g.) swap.
- misc bugfixes
GLOffscreenAutoDrawable: API Change
- Reloc and interfacing
- class com.jogamp.opengl.OffscreenAutoDrawable -> javax.media.opengl.*
interfaces GLOffscreenAutoDrawable extends GLAutoDrawable
GLOffscreenAutoDrawable.FBO extends GLOffscreenAutoDrawable, GLFBODrawable
- Added general implementation and FBO specialization
- Replacing GLPBuffer (deprecated) .. usable for any offscreen GLDrawable via factory
GLAutoDrawable:
- Add 'GLDrawable getDelegatedDrawable()'
- Refine documentation of setContext(..), remove disclaimer and fixme tags
GLDrawableFactory:
- Refine API doc and it's selection mechanism for offscreen.
- Add createOffscreenDrawable(..)
- Add createOffscreenAutoDrawable(..)
- Add canCreateFBO(..)
- Mark createGLPbuffer(..) deprectated
Mark GLPBuffer deprecated
New: GLFBODrawable extends GLDrawable
GLCanvas (AWT and SWT): Add offscreen resize support w/o GLContext recreation
GLAutoDrawableBase .. GLWindow:
- Add offscreen resize support w/o GLContext recreation
- Remove double swapBuffer call
-
GLBase/GLContext:
- Add:
- boolean hasBasicFBOSupport()
- boolean hasFullFBOSupport()
- int getMaxRenderbufferSamples()
- boolean isTextureFormatBGRA8888Available()
GLContext: Fix version detection and hasGLSL()
- Version detection in setGLFunctionAvailability(..)
- Query GL_VERSION ASAP and parse it and compare w/ given major/minor
- Use parsed version if valid and lower than given _or_ given is invalid.
- Use validated version for caching (procaddr, ..), version number, etc.
- Fix hasGLSL()
Since 'isGL2ES2()' is true if 'isGL2()'
and the latter simply alows GL 1.*, we confine the result to a GL >= 2.0
on desktops. FIXME: May consider GL 1.5 w/ extensions.
- return isGL2ES2();
+ return isGLES2() ||
+ isGL3() ||
+ isGL2() && ctxMajorVersion>1 ;
GLDrawableImpl:
- Add 'associateContext(GLContext, boolean)' allowing impl.
to have a (weak) reference list of bound context.
This is was pulled up from the OSX specific drawable impl.
- swapBuffersImpl() -> swapBuffersImpl(boolean doubleBuffered)
and call it regardless of single buffering.
This is required to propagate this event to impl. properly,
i.e. FBODrawable requires a swap notification.
- Clarify 'contextMadeCurrent(..)' protocol
GLDrawableHelper:
- Add resize and recreate offscreen drawable util method
- Simplify required init/reshape calls for GLEventListener
-
GLGraphicsConfigurationUtil:
- fixWinAttribBitsAndHwAccel: Reflect sharede context hw-accel bits
- OSX has no offscreen bitmap, use pbuffer
- use proper offscreen auto selection if offscreen and no modes are set
EGL Context/Drawable/DrawableFactory: Abstract native platform code out of base classes
- Use EGLWrappedSurface w/ UpstreamSurfaceHook to handle upstream (X11, WGL, ..)
lifecycle - in case the EGL resource is hooked up on it.
Invisible dummy surfaces: All platforms
- size is now reduced to 64x64 and decoupled of actual generic mutable size
- fix device lifecycle, no more leaks
+++
OSX
====
Enable support for GLFBODrawableImpl in offscreen CALayer mode
- NSOpenGLImpl: hooks to calayer native code
- calayer code:
- allows pbuffer and texures (FBO)
- decouple size and draw calls avoiding flickering
- enable auto resize of calayer tree
MacOSXCGLContext:
- NSOpenGLImpl:
- Fix false pbuffer 'usage', validate the pointer
- If !pbuffer, copy other window mode bits of caps
-
MacOSXCGLGraphicsConfiguration:
- Only assume pbuffer if !onscreen
- Remove reference of native pixelformat pointer
Native code:
- use 'respondsToSelector:' query before calling 'new' methods
avoiding an error message where unsuported (prev. OSX versions)
- if monitor refresh-rate is queried 0, set to default 60hz
- add missing NSAutoreleasePool decoration
+++
Android / NEWT:
===============
Issue setVisible(..) w/o wait, i.e. queue on EDT,
@Android surfaceChanged() callback. Otherwise we could deadlock:
setVisible(..) -> EDT -> setVisibleImpl(..) -> 'GL-display'.
the latter may may cause havoc while Android-EDT is blocked [until it's return].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
it to native type) ; OSX Caps selection ; WGL/GDI BITMAP fix
Fix window mode attribute bit FBO_BIT usage in platform dependent code (map it to native type)
All platform dependent winAttrBit mapping: 'nativeType -> winAttrBit' and 'GLCapabilities -> winAttrBits'
shall replace FBO_BIT w/ the native type of the wrapper surface, i.e. WINDOW_BIT (X11, WGL, CGL) or PBUFFER_BIT (EGL).
This condenses to changes in
- EGLGraphicsConfiguration: EGLConfigDrawableTypeBits / GLCapabilities2AttribList
- X11GLXGraphicsConfiguration: FBCfgDrawableTypeBits, XVisualInfo2GLCapabilities / GLCapabilities2AttribList
- WindowsWGLGraphicsConfiguration: AttribList2DrawableTypeBits, PFD2DrawableTypeBits / GLCapabilities2AttribList
- OSX CGL/NS requires changes in MacOSXCGLContext, i.e. fix the surface mode of
NSPixelFormat2GLCapabilities, CGLPixelFormat2GLCapabilities results.
This change is included in the upcoming commit (class is heavily edited).
OSX chooseGraphicsConfigurationStatic: Add missing 'GLGraphicsConfigurationUtil.fixGLCapabilities(..)' call
- all platform impl. require to fix the given user caps due to the new offscreen auto selection mode
WindowsWGLGraphicsConfiguration*: ARB / GDI updateGraphicsConfiguration*()
- ARB method detects early whether it's suitable for given HDC, i.e. in case of BITMAP (it's not here)
- GDI methods detect failure while choosing PFD and doesn't care of DOUBLEBUFFER in case of bitmap (fixes BITMAP usage)
Capabilities/GLCapabilities:
- Fix missing double-buffer check in GLCapabilities.equals()
- add 'copyFrom(..)' method copy all data from give caps
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check for leaked display handles
GLProfile / all shutdown methods: Remove ShutdownType to remove complexity (not required)
Proper shutdown sequence:
GLProfile - GLDrawableFactory+ - GLContext - NativeWindowFactory - [X11Util, OSXUtil, ..]
GLDrawableFactory: Always keep shutdown-hook alive, required for X11Util shutdown (@ JVMShutdown only)
X11Util: Shutdown
- @ JVMShutdown only
- If GL vendor ATI: close pending X11 display connections in proper order of creation.
This finally removes the SIGV when shutting down the JVM on X11 w/ ATI driver.
EGLDisplayUtil: Add shutdown, allowing to validate whether leaked EGL display handles remain.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
availability detection for EGL, WGL and OSX.
Introducing Capabilities 'bitmap' boolean, complementing the offscreen modes FBO and PBuffer.
This allows:
1 - deterministic setting of the offscreen mode
2 - utilizing auto configuration of offscreen mode, if !onscreen !FBO !PBuffer and !Bitmap
3 - adding 'availability' semantic of 'onscreen' boolean,
i.e. if onscree:=1 for a queried instance, the offscreen modes still indicate offscreen
availability - see [4]
4 - avoiding explosion of the availability list due to [3],
one Capability entry reflect on- and offscreen settings.
Add FBO availability detection for EGL, WGL and OSX.
Tested manually w/ 'TestGLCapabilities01NEWT' on X11 [NV, ATI], WGL[NV], OSX[NV].
|
|
|
|
|
|
| |
representation allowing proper use of ref. comparison '==', instead of 'String.equals()'
Also make NativeWindowFactory's instances of nativeWindowingTypePure and nativeWindowingTypeCustom static final.
|
|
|
|
| |
ScreenDriver, WindowDriver] to reduce complexity and programatic selection.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'firstUIActionOnProcess' of initSingleton() method
The notion of changing the threading behavior of native initialization was deprecated for over a year.
The code still contained the bits and pieces, i.e. whether X11Util.initSingletion() is invoked
before or after optional AWT initialization.
This condition has been removed now and behavior is uniform, i.e.
X11Util.initSingletion() is invoked after optional AWT initialization.
- Removed GLProfile.initSingleton(boolean firstUIActionOnProcess), use remaining GLProfile.initSingleton()
- Removed NativeWindowFactory.isFirstUIActionOnProcess()
- Changed NativeWindowFactory.initSingleton(boolean firstUIActionOnProcess) to
NativeWindowFactory.initSingleton()
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EGLDisplay's eglInitialize(..) fails ; Fix EGLDrawableFactory.getEGLSurface()
- EGLDisplayUtil: Workaround (latest) PVR 540 EGL regression where 3nd EGLDisplay's eglInitialize(..) fails
In this case and if eglGetDisplay(..) fails w/ a non EGL_DEFAULT_DEVICE, fall back to EGL_DEFAULT_DEVICE - always.
This workaround actually simplifies handling both cases.
- Fix EGLDrawableFactory.getEGLSurface()
Tests whether a given NativeSurface w/ EGLGraphicsDevice and EGLGraphicsConfiguration
has a valid EGL Surface. Only if true, reuse the whole NativeSurface,
otherwise construct the missing pieces (device, config and use a WrappedSurface for EGL).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
offscreen drawables, reported by Mark Raynsford
New common GLAutoDrawableBase missed to close the AbstractGraphicsDevice
in case it has been created and dedicated for the passed GLDrawable.
This detailed knowledge is only known to the creator, hence it is passed
in the constructor and is being passed through all specializations.
Further more the new X11/GLX impl. of GLDrawableFactory's
'createMutableSurfaceImpl' always creates it's own private X11 display connection
to avoid locking / threading issues. Since the old implementation reused the
shared display connection which is prone to threading issues, this bug was not visible before.
Also fixed the unit test TestNEWTCloseX11DisplayBug565,
now correctly validating that no display connection is left over
after a new cycle of create/destroy of onscreen and offscreen drawables.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NewtCanvasSWT allowing to parent NEWT windows natively.
SWT GLCanvas creates lazy when resource is ready
- Ensures drawable and context are created when size > zero and native visualID is valid.
The latter is platform dependent.
- Note that you cannot utilize custom GLCapabilities w/ this one,
since the configurations is already realized - use NewtCanvasSWT.
Create new NewtCanvasSWT allowing to parent NEWT windows natively:
- Similar to NewtCanvasAWT
- Allows attaching / detaching NEWT windows
NewtCanvasAWT: Public setNEWTChild(..) fixed
Added test cases for the above - tested on Linux, OSX and Windows w/ SWT
Note: As usual for OSX, add -XstartOnFirstThread
Details:
- NEWT Display has new method: 'EDTUtil setEDTUtil(EDTUtil)'
allowing to set a custom event dispatch utility.
We use this to set our SWTEDTUtil for using NEWT w/ SWT
complying w/ SWT threading constraints.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
capabilities-type; Add a pre-set nativeVisualID to chooseGraphicsConfiguration(..)
Map factory to device-type _and_ capabilities-type:
- Allows using different GraphicsConfigurationFactory implementations for different capabilities-types.
Previous impl. failed to use an OpenGL agnostic CapabilitiesImmutable for 'chooseGraphicsConfiguration(..)'
since only the GL aware factory was mapped. The latter failed since it expected a GLCapabilitiesImmutable.
- The passed capabilities-type as well as device-type given at getFactory(..)
is traversed top-to-down to find a most suitable factory:
For-All devT := getTopDownDeviceTypes(deviceType)
For-All capsT := getTopDownCapabilitiesTypes(capabilitiesType)
f = factory.get(devT, capsT);
if(f) { return f; }
end
end
Add a pre-set nativeVisualID to chooseGraphicsConfiguration(..)
- In situations where a native visualID is already chosen [by external means for example],
but we still need to query a matching GraphicsConfiguration - we require to pass
a non VisualIDHolder.VID_UNDEFINED nativeVisualID.
We had a hack implemented before within some implementations and their static calls,
however an agnostic mechanism is required to implement new NativeSurface/Window's
platform agnostic.
- X11GLXGraphicsConfigurationFactory: respect a pre-set xvisualID
- X11GLXDrawableFactory.createProxySurfaceImpl(..) queries the given windowHandle's
visualID and 'chooses' the configuration accordingly. If the visualID is undefined
an exception is thrown, since window is invalid.
These mechanics are implicit for Windows and OSX.
Fix X11GLXGraphicsConfiguration.updateGraphicsConfiguration():
- Skip any action if a valid X11GLCapabilities is already chosen, i.e. w/ visualID.
Otherwise choose a suitable configuration incl. visualID.
The latter is quite impossible and invalid, since visualID must be defined at window creation time
and the update method is issued with a valid window.
X11 - Misc:
- Added 'int jogamp.nativewindow.x11.X11Lib.GetVisualIDFromWindow(..)'
- All returned visualID's are of type 'int'
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use pbuffer (still), don't set FBO (invisible)
- OLS (only impl is JAWTWindow now) stores the attached layer handle
created and attached by the GLContext implementation,
so 'others' may detach it -> NewtCanvasAWT
- NewtCanvasAWT.removeNotify() needs to ask the OLS to detach the layer
since it's parent will be gone.
- MacOSXCGLContext destroy allows a removed OLS (see above)
|
|
|
|
| |
handling w/ non NSView handles (pbuffer)
|
|
|
|
|
|
|
|
|
| |
setting by setSampleBuffers(true) and setBackgroundOpaque(false)
This bug lead to X11 GLCapabilities rgba: 8/8/8/1 - which ofc is invalid. Sideeffect was a bad selected GLXFB configuration
and the GLContext couldn't be made current.
Patch sets alpha bits reflecting reality carefully after opaque/samples. Added API doc note.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- New FBObject implementation handling FBO and it's attachments *** API CHANGE: Util -> Core ***
while it's size and sample-count can be reconfigured on the fly.
- com.jogamp.opengl.util.FBObject -> com.jogamp.opengl.FBObject
- agnostic to texture unit
- separate attachments using OO hierarchy reflecting FBO
- handling MSAA and blitting
- no FBO destruction for reconfig (attach/detach)
- New GLFBODrawableImpl impl. an FBObject based GLDrawable
- Instantiated by a dummy native surface (onscreen and invisible)
hooked up to a dummy GLDrawable, which is the delegation for context creation.
- Utilizies ProxySurface.UpstreamSurfaceHook for dummy surface
avoiding specialization for native platforms.
- TODO: Allow to utilize common surface interface as a
dummy-surface to supporting API seperation of
windowing/GL. The latter allows impl. of createGLDrawable(NativeSurface)
with FBO.
- New OffscreenAutoDrawable (extends GLAutoDrawableDelegate)
for all offscreen drawables. Shall replace GLPbuffer.
- New GLCapabilities*.isFBO() / setFBO(boolean) to request FBO offscreen,
similar to isPBuffer(). Rule: if both are requested, FBO shall be favored.
- GLContext adds raw FBO availability query (min. FBO avail),
FBObject contains fine grained queries (TODO: Move parts to GLContext for efficiency).
- Add framebuffer tracking, allowing fast querying:
- GLBase/GLContext:
public int getBoundFramebuffer(int target);
public int getDefaultDrawFramebuffer();
public int getDefaultReadFramebuffer();
- GLContextImpl
public final void setBoundFramebuffer(int target, int framebufferName)
.. called by GL impl bind framebuffer
- GL: getDefaultDrawFramebuffer(), getDefaultReadFramebuffer()
Adding default framebuffer queries being issued by
GL.glBindFramebuffer(target, 0) w/ a default framebuffer, o.e. zero.
This allows a transparent use of a custom FBO even in case the applications
attempts to reset FBO to zero.
Value flow: GL <- GLContext <- GLDrawable,
- GLCapabilities handle fbo/pbuffer seperate, don't disable the other
- GLContext/GL track read/write framebuffer to be queried by FBObject
to determine whether to bind/unbind a framebuffer
- Test cases for multiple FBO w/ and w/o MSAA
Other Features:
- New interface ProxySurface.UpstreamSurfaceHook,
allowing to hook an upstream surface of unknown type
providing lifecycle and information (size, ..) callbacks.
Used for all new dummy NativeSurface impl and SWT GLCanvas.
- GLContext -> GLDrawable propagation context/drawable lifecycle
via ProxySurface.UpstreamSurfaceHook allowing dynamic resources
to react (create, init, ..)
- contextRealized()
- contextMadeCurrent()
- SurfaceChangeable -> MutableSurface
currently only contains setting the surface handle.
TODO: May need to move ProxySurface.UpstreamSurfaceHook -> MutableSurface.UpstreamSurfaceHook,
allowing other impl. classes (NEWT OffscreenWindow) to utilize the new
upstream hookup mechanism - will allow FBO/Dummy window to work.
- SWT GLCanvas using ProxySurface.UpstreamSurfaceHook for proper size
propagation.
- New GLAutoDrawable::getUpstreamWidget(), allowing GLEventListener
to fetch the owning Java side UI element (NEWT, SWT, AWT, ..).
- GLDrawableFactory: Removed createOffscreenSurface() - unused and not GL related
- EGLDrawableFactory handles device/profile avail. mapping
while actually creating context/drawable.
This allows us to learn whether the ES context is software/hardware as well as FBO avail.
- EGLDrawable: Removed secret buckets of EGL configs :)
Employ native surface (X11, WGL, ..) to EGL 'mapping' in
EGLDrawableFactory utilizing new EGLUpstreamSurfaceHook (implements ProxySurface.UpstreamSurfaceHook).
Other Bugs:
- Add CTX_OPTION_DEBUG to ctx/extension cache key since only a debug ctx
may expose the ARB debug capability.
This bug caused lack of ARB/AMD debug functionality.
- Fix GLProfile deadlock (debug mode, w/ EGL/ES, no X11),
dump availability information _after_ lock.
- ImmModeSink draw(): Use GL's glDrawElements(..), don't cast for GL2ES1.
Fixes use for GL2ES2.
- Fix KeyEvent.getKeyChar() comment (-> only stable for keyTyped(..))
Misc:
- Refined alot of API doc
- New GLExtensions holds commonly used GL extension strings,
allows better referencing and usage lookup.
- Move GL (interface) decl. to GLBase
- GLBuffers: Cleanup API doc (format, types)
- TextureIO: Add PAM and PPM static suffix identifier
- GLCapabilities getNumSamples() returns 0 if sampleBuffers is disabled, this seems to be more natural.
- finalized a lot
|
|
|
|
|
|
|
|
|
|
|
| |
EGLDisplayUtil adds creation of EGLGraphicsDevice.
Due to EGL's location in JOGL, supporting destruction of an EGLGraphicsDevice
is solved (hack) temporary by passing an eglTerminate callback to it's ctor.
Using EGLGraphicsDevice's close() method to also issue eglTerminate() simplifies the code.
In future we shall move EGL to nativewindow!
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
exceptions. Handles also XAWT BadMatch X_SetInputFocus.
X11ErrorHandler code now dumps proper information about the opcode and error message and the running Java thread.
Having propery "nativewindow.debug.X11Util.XErrorStackDump" or "nativewindow.debug=all' set,
a stack trace is dumped.
Since the X11ErrorHandler may catch an XAWT error: BadMatch X_SetInputFocus,
we cannot throw an exception and better keep running.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It works now as follows:
Note: Remote connection tested using ssh to localhost or an actual remote
machine.
Test w/ proper X11 authentication, i.e. DISPLAY and xauth:
> cd projects/JOGL/jogl-bugs/597-headless/
> echo $DISPLAY
localhost:10.0
> xclock
'works'
T1.1 OK> java plop
jogamp.opengl.x11.glx.X11GLXDrawableFactory@f581593
T1.2 OK> java -Djava.awt.headless=true plop
jogamp.opengl.x11.glx.X11GLXDrawableFactory@6f34a7d8
+++
Test _without_ proper X11 authentication, i.e. DISPLAY and xauth:
> xclock
No protocol specified
No protocol specified
Error: Can't open display: :0.0
T2.1 OK> java plop
No protocol specified
No protocol specified
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window
server using ':0.0' as the value of the DISPLAY variable.
(Stack trace from:
GLProfile.initProfilesForDefaultDevices(..) ->
NativeWindowFactory.initSingleton(..) ->
JAWTUtil.<clinit>->
sun.awt.X11.XToolkit.<clinit> ->
sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
T2.2 OK> java -Djava.awt.headless=true plop
No protocol specified
No protocol specified
...
jogamp.opengl.x11.glx.X11GLXDrawableFactory@394a8cd1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
setSwapInterval() deadlock; Reuse JAWT instance; Cleanup
- Fixes
- OSXUtil.CreateCALayer*(..): Pass layer target size (if known).
This fixes Bug #589
- MacOSXWindowSystemInterface-pbuffer.m:
- ALL: displayLink NULL check
- setSwapInterval(..): lock only for variable setting,
could deadlock when start/stop CVDisplayLink
- JAWTWindow.destroy(): use 'surfaceLock' instead of 'synchronized'
- Cleanup / Performance
- JAWTWindow.lockSurface(): Reuse JAWT instance
- MacOSXJAWTWindow: AttachJAWTSurfaceLayer0(..) -> SetJAWTRootSurfaceLayer0(..)
Reflects semantic better.
- DEBUG
- JAWTWindow.updateBounds(..) notify of bounds change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
JAWTUtil.getJAWT(..):
- better local var names
- one time init
- add DEBUG trace
JAWTUtil.<init>:
- add offscreenLayer info
MacOSXWindowSystemInterface-pbuffer.m:
- remove warning: access of protected vars from outside class
- better local var names
- more DEBUG info (pbuffer texture)
|
|
|
|
|
|
|
|
|
| |
- This policy allows more simple destruction handling w/o validating on the top level.
- Hence 'unlockSurface()' shall not throw any exception.
- 'lockSurface()' keeps unchanges, clarified w/ explicit 'throws' declaration,
ie will fail-fast.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CapabilitiesImmutable, Misc ..
- Comparable<CapabilitiesImmutable> to CapabilitiesImmutable:
"interface CapabilitiesImmutable extends VisualIDHolder, WriteCloneable" ->
"interface CapabilitiesImmutable extends VisualIDHolder, WriteCloneable, Comparable<CapabilitiesImmutable>"
- CapabilitiesImmutable and GLCapabilitiesImmutable get-methods final (most)
- GLCapabilitiesImmutable.compareTo: add doubleBuffered (between stereo and samples)
Misc:
- Add @Override
- remove trailing whitespace,
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
834b9e530e652b7ff7c5e222720bce3ad2b11c5f
- adapt to GlueGen Lock cleanup
- remove isSurfaceLocked(), use 'null != getSurfaceLockOwner()' instead
Misc:
- remove unused priv./impl. methods
- add @Override
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Derivation
- Depends on GlueGen commit 9a71703904ebfec343fb2c7266343d37a2e4c3db
JAR file name changes:
ALL JARs:
- jogl.all.jar -> jogl-all.jar
- jogl.all-noawt.jar -> jogl-all-noawt.jar
- jogl.all-mobile.jar -> jogl-all-mobile.jar
- jogl.all-android.jar -> jogl-all-android.jar
- jogl.all-android.apk -> jogl-all-android.apk
Atomic JARs:
- nativewindow.core.jar -> nativewindow-core.jar
- nativewindow.awt.jar -> nativewindow-awt.jar
- nativewindow.os.x11.jar -> nativewindow-os-x11.jar
- nativewindow.os.win.jar -> nativewindow-os-win.jar
- nativewindow.os.macosx.jar -> nativewindow-os-osx.jar
- jogl.core.jar -> jogl-core.jar
- jogl.sdk.jar -> jogl-sdk.jar
- jogl.glmobile.jar -> jogl-glmobile.jar
- jogl.glmobile.dbg.jar -> jogl-glmobile-dbg.jar
- jogl.util.jar -> jogl-util.jar
- jogl.glutess.jar -> jogl-glutess.jar
- jogl.glumipmap.jar -> jogl-glumipmap.jar
- jogl.util.fixedfuncemu.jar -> jogl-util-fixedfuncemu.jar
- jogl.awt.jar -> jogl-awt.jar
- jogl.swt.jar -> jogl-swt.jar
- jogl.util.awt.jar -> jogl-util-awt.jar
- jogl.os.x11.jar -> jogl-os-x11.jar
- jogl.os.win.jar -> jogl-os-win.jar
- jogl.os.osx.jar -> jogl-os-osx.jar
- jogl.os.android.jar -> jogl-os-android.jar
- jogl.gldesktop.jar -> jogl-gldesktop.jar
- jogl.gldesktop.dbg.jar -> jogl-gldesktop-dbg.jar
- jogl.glugldesktop.jar -> jogl-glu-gldesktop.jar
- jogl.util.gldesktop.jar -> jogl-util-gldesktop.jar
- jogl.omx.jar -> jogl-omx.jar
- jogl.cg.jar -> jogl-cg.jar
- newt.core.jar -> newt-core.jar
- newt.ogl.jar -> newt-ogl.jar
- newt.awt.jar -> newt-awt.jar
- newt.event.jar -> newt-event.jar
- newt.driver.x11.jar -> newt-driver-x11.jar
- newt.driver.win.jar -> newt-driver-win.jar
- newt.driver.macosx.jar -> newt-driver-osx.jar
- newt.driver.android.jar -> newt-driver-android.jar
- newt.driver.kd.jar -> newt-driver-kd.jar
- newt.driver.intelgdl.jar -> newt-driver-intelgdl.jar
- newt.driver.broadcomegl.jar -> newt-driver-broadcomegl.jar
Test JARs:
- jogl.test.jar -> jogl-test.jar
- jogl.test-android.jar -> jogl-test-android.jar
- jogl.test-android.apk -> jogl-test-android.apk
|
|
|
|
| |
'List<? extends CapabilitiesImmutable> l'
|
|
|
|
| |
ClassLoader to find JNI native libraries
|
|
|
|
| |
instead of static final int values.
|
|
|
|
| |
allowing to remove EGL/ES based factory
|
|
|
|
| |
Capabilities/GLContext API 'toString(StringBuilder)'
|
|
|
|
|
|
|
| |
through transparency flag from higher API
The above is necessary to reflect transparency in chosen Capabilities from a higher level API (native windowing)
in case the EGL impl. does not (buggy). This is currently true for Android.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Threading*:
- add invoke(..) generalizing the Therading decision
GLCanvas:
- remove 'manual' Threading decision, simply call Threading.invoke(..)
- use anonymous Runnable instances
- remove drawable lock, drawable is volatile instead
GLJPanel:
- remove 'manual' Threading decision, simply call Threading.invoke(..)
- use anonymous Runnable instances
- DEBUG: Use getThreadName() prefix
GLContextImpl:
- Remove GLWorkerThread idle command on makeCurrent(),
no holding of context in worker thread while idle.
- DEBUG: Use getThreadName() prefix
X11GLXContext:
- DEBUG: Use getThreadName() prefix
TODO: Validate whether it's OK for GLCanvas and GLJPanel to set Threading.Mode.MT as the default mode!
|
|
|
|
| |
or a stack trace may be helpful.
|
|
|
|
| |
f4ac27e177f6deb444280d3b375e7d343e38bd080 and eedb4b530fb83fc59a26962bcf7847a1404092a0
|
|
|
|
| |
Correct classname AWTGraphicsDevice (NW reorg).
|
|
|
|
| |
LOCK_SURFACE_CHANGED); ProxySurface.lockSurface() +LOCK_SURFACE_CHANGED
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
proper utilization.
- VisualIDHolder: Update documentation (Exception case, etc)
- NativeVisualID -> VisualIDHolder (public)
- incl. generic Comparator
- better doc and enum values
- VID_UNDEFINED == 0
- methods shall not throw exception, but return UNDEFINED
- CapabilitiesImmutable extends VisualIDHolder
- All Capabilties impl.
- use VID_UNDEFINED for undef. value
- use final private (immutable) fields
- AbstractGraphicsConfiguration extends VisualIDHolder
- X11 CreateDummyWindow takes (int) visualID
|
|
|
|
| |
(javax.media.nativewindow.<impl> -> com.jogamp.nativewindow.<impl>) 2/3
|
|
|
|
| |
(javax.media.nativewindow.<impl> -> com.jogamp.nativewindow.<impl>) 1/2
|
|
|
|
|
|
|
|
|
|
|
|
| |
90c46b1ef1f199ceb63e85c85e9ebeb919d49c4a) ; Using plain X11 Capabilities
In case X11GLXGraphicsConfigurationFactory and hence X11GLCapabilities (glx) is not being used,
the X11GraphicsConfigurationFactory used plain Capabilities object for the chosen caps.
The latter is not derived from NativeVisualID.
- Added X11Capabilities supporting NativeVisualID to fit our needs.
- X11Capabilities.XVisualIDComparator uses NativeVisualID.NVIDType.X11_XVisualID
- *Capabilities have better unique names in toString()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*GraphicsConfiguration) ; ...
NativeVisualID: New interface for Capabilities implementations,
allowing retrieval of the native 'visual id'.
Impl. by WGL, X11 and EGL.
JAWTWindow.lockSurface()
- Detect surfaceHandle change an return LOCK_SURFACE_CHANGED (see: LOCK_SURFACE_CHANGED)
EGLDrawable:
- Impl. updateHandle() (see: LOCK_SURFACE_CHANGED)
- use NativeVisualID for EGLGraphicsConfiguration selection to respect a native 'visual id'
EGLContext.createContextImpl: Use NIO for attributes
EGLDisplayUtil: Enhance eglGetDisplay w/ DEBUG code and NativeSurface / EGL_DEFAULT_DISPLAY variation
EGL, XGL, WGL GraphicsConfiguration:
- Don't set ALPHA_SIZE and STENCIL_SIZE if not requested in attribute list
for context creation.
- toString() shows proper identification, eg.: egl, x11, win32 ..
EGLGraphicsConfigurationFactory:
Daisy chain GraphicsConfigurationFactory for native device type (currently only X11).
This allows choosing the EGLGraphicsConfiguration and hence native visual id based on EGL
when invoked via the factory model (generic).
In case EGLGraphicsConfigurationFactory is not suitable or doesn't produce a native visual id,
it falls back the the original one.
X11AWTGraphicsConfigurationFactory and X11Window:
Use generic NativeVisualID which allows EGLGraphicsConfiguration implicit.
*GraphicsConfiguration's DEBUG flag is pushed up to DefaultGraphicsConfiguration
LOCK_SURFACE_CHANGED:
- commit 006e9fe402a0a47b45fd2c4af51296aef895e8b5
- commit a0177c8a1048683e5d43f4712f8f9e37091d4e85
Impact:
- Fixes EGL/GLES (wrapper/native) usage on X11, proper Xvisual selection w/ EGL
- Fixes EGL/GLES (wrapper/native) usage on Windows, ANGLE works w/ NEWT and forced ES2
|