| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
jogamp.<module> (1/2) - rename task
- com.jogamp.opengl.impl -> jogamp.opengl
- com.jogamp.opengl.util.glsl.fixedfunc.impl -> jogamp.opengl.util.glsl.fixedfunc
- com.jogamp.nativewindow.impl -> jogamp.nativewindow
- com.jogamp.newt.impl -> jogamp.newt
This sorts implementation details from the top level, ie skipping the public 'com',
allowing a better seperation of public classes and implementation details
and also reduces strings.
This approach of public/private seperation is also used in the OpenJDK.
|
|
|
|
| |
due to possible diff function ptr of sw impl (NV/Win7)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scenario
- NV / Win7 driver version 266.58's
- Caps: on-scr, rgba 8/8/8/0, accum-rgba 0/0/0/0, dp/st/ms: 16/8/0, dbl, mono
The above 'wglChoosePixelFormatARB' impl returns an array of pixelformats,
where the 1st entry is not hardware accelerated!
This should be considered a bug in NV's driver, since the array should return
a list ordered from 'best' to 'worst'.
Workaround trying explicit hw acceleration 1st, then generic, then software.
|
|
|
|
|
|
| |
Allows TestBug461OffscreenSupersamplingSwingAWT to pass on NV/Win7.
Root cause was using the requested unfixed caps (onscreen, !pbuffer)
instead of the fixed ones.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WindowsWGLGraphicsConfiguration.create(..) ->
WindowsWGLGraphicsConfiguration.createFromCurrent(..) emphasizing that
all resources are 'current' ie locked and available.
This method is used for the external context/drawable creation only, called
while they are current.
Hence this method no more makeCurrent/release, which interfered with the
current external context state.
WindowsWGLGraphicsConfigurationFactory: Move surface locking to the right
(common) place.
|
|
|
|
| |
GL2ES2, GLES2, GL2ES1, GLES1
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WGL and EGL)
- GLDrawableFactory exposes:
public final List/*GLCapabilitiesImmutable*/ getAvailableCapabilities(AbstractGraphicsDevice device)
- GLCapabilities platform specialization containing native ids (XVisual/FBConfig, PFD, EGLConfig, ..)
- GLCapabilities setPbuffer(true) disables onscreen
- Capabilities setOnscreen(true) disables pbuffer
- Capabilities implements Comparable
- *Capabilities: enhanced 'toString(..)'
- CapabilitiesChooser.chooseCapabilities:
'CapabilitiesImmutable[] available' -> 'List /*<CapabilitiesImmutable>*/ available'
- VersionApplet, GLCanvas.main, GLWindow.main, GLProfile/debug: dumps all available GLCaps
- WGLGLCapabilities: proper non-displayeble (pbuffer) pfdid handling
TODO: ES/EGL test with emulation
|
|
|
|
| |
(96a0e0706258824c1dd524d4cbd7682a904b84f4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows for javaws/applets.
It has been observed that for some combinations, eg:
- Windows 7 64bit (other variants may apply too)
- NVIDIA 8600M GT
- 260.99
the NVIDIA setting of 'Threaded optimization' := 'auto' (default) causes the JVM to simply crash
in case of javaws and [jnlp] applets.
'Threaded Optimization' := 'off' works reliable
'Threaded Optimization' := 'on' never works with javaws and applets on the above configuration
A user could workaround this by setting 'Threaded Optimization' := 'off',
however, this would disable many users on the spot,
since you cannot ask the average user for such a task, if she only wants to see a web page.
This patch 'fixes' the 'auto' mode by running the eager GL profile initialization
within a block of single CPU affinity:
SetProcessAffinityMask(pid, 1);
try {
initProfilesForDeviceImpl(device);
} finally {
SetProcessAffinityMask(pid, sysValue);
}
Hopefully we can remove this hack with a driver fix.
However this workaround is as little invasive as possible.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In conjunction with the gluegen investigation (gluegen: fbdedff789077b5ffa07811590f771b6f9a4f3a7),
on Windows the type LONG is always 32bit, hence we have to declare:
typedef __int32 LONG;
Besides, WGL_DRAW_TO_PBUFFER_ARB and WGL_DRAW_TO_BITMAP_ARB were missing in the
WGL/ARB attribute query, and the latter was not set in caps -> attributes.
Added fail safe exception for null chosen caps, if X11/WGL algo fails to determine.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This solves the issue when an applet is started/stop and started again,
or another applet runs in the same JVM.
Also soves the issue for multiple JVMs.
RegisteredClassFactory can be instanced to manage one shared window class,
currently in use for GDI's dummy window and NEWT.
A class base name and a window proc handle must be passed in the factory cstr.
Before registering, the class is tested if already exists,
eg another applet in the same JVM.
If registration fails, the class name will iterate until successful or MAX_INT reached,
eg if multiple JVMs are running.
Added NativeWindow Common Native Code.
|
|
|
|
|
| |
It seems necessary to use off thread shared resources (dummy window, drawable and context)
to keep them alive in Java Webstart.
|
|
|
|
| |
redundant, since it's static DC
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- AWT/WGL:
- Using sun.awt.Win32GraphicsConfig via reflection, if supported, else we may fail.
- Preselection of PFD as follows:
- 1st choice is to create our own AWT GraphicsConfig (GC) based on PFD/GLCaps,
ignoring WGL_SUPPORT_GDI_ARB, PFD_SUPPORT_GDI
- 2nd choice is to use AWT PFD pool of GC's
- else we fail -> use NewtCanvasAWT instead (TODO: Other JDK/AWT implementations ?)
- Set PFD will be performed at setRealized(..)
- SharedContext (X11/WGL) is synchronized to allow multithreaded access, if required
- Simplified and unified (X11/WGL) GraphicsConfigurationFactory
- WGL 'external' drawables will be determined with given arguments right away
|
|
|
|
|
|
|
|
|
| |
key for cached table, since
the GLX/WGL/etc function entry pointers are GL profile agnostic.
Hence createContextARBImpl(..) (WGL/GLX) does not need a sharedContext,
but just can issue the inexpensive updateGLXProcAddressTable(..) call.
|
|
|
|
| |
release HDC
|
| |
|
|
|
|
|
|
|
|
| |
WindowsWGLGraphicsConfiguration:
If updateGraphicsConfigurationARB fails, continue with updateGraphicsConfigurationGDI
WindowsDummyWGLDrawable:
Utilize proper GraphicsConfiguration selection using updateGraphicsConfiguration()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Finish API change using the AbstractGraphicsDevice, which denotes the target device
for the desired NativeSurface / GLDrawable.
The AbstractGraphicsDevice argument may be null to reflect the platform's default device.
Clarified API documentation.
This move is necessary to make the API coherent.
- createOffscreenDrawable(..) may create a Pbuffer drawable if caps and supported.
This unifies the functionality with createGLDrawable(..).
Further more, a Pbuffer drawable is an offscreen as well.
- added createOffscreenSurface(..) following the same behavior as createOffscreenDrawable(..),
this is a convenient native offscreen surface factory entry.
- removed createGLPbufferDrawable(..), use createOffscreenDrawable(..),
since it is redundant!
Implementation Details:
- EGLDrawableFactory holds a shared native EGLGraphicsDevice,
being used by the offscreen EGL drawable (no more multiple creation).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Read Drawable feature reflects the make context current API
having a seperate read drawable next to the write drawable (default).
glXMakeContextCurrent(write, read, ..)
On X11 a ready drawable is only supported for GLX >= 1.3,
on Windows only if extension WGL_ARB_make_current_read is available,
on EGL it's always supported, on OSX not at all.
API cleanup GLContext:
changes: setGLDrawableRead(GLDrawable) -> setGLReadDrawable(GLDrawable)
new: isGLReadDrawableAvailable()
new: getGLExtensionsString();
Access qualifier cleanup.
GLContextImpl: GLVersionNumber moved out.
|
| |
|
| |
|
|
|
|
| |
SUCCESS
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
429, 428 and 405
Fixes bugs WGL pixelformat related bugs:
http://jogamp.org/bugzilla/show_bug.cgi?id=397
http://jogamp.org/bugzilla/show_bug.cgi?id=410
http://jogamp.org/bugzilla/show_bug.cgi?id=429
http://jogamp.org/bugzilla/show_bug.cgi?id=428
http://jogamp.org/bugzilla/show_bug.cgi?id=405
Tested on Window7-x86 (amd/nvidia), WinXP-x32-VirtualBox.
Solution:
Cleaned up X11/GLX code to use it as a correct boilerplate
for the new WGL selection, which now duplicates the same behavior.
X11/GLX and WGL follow the common logic:
- 1st try:
- get GLCapabilities based on users GLCapabilities
- setting recommendedIndex as preferred choice
- 2nd try:
- get all GLCapabilities available
- no preferred recommendedIndex available
If no recommendedIndex has been selected and no chooser has been passed,
we use the DefaultGLCapabilitiesChooser.
Choose the GLCapabilities if a chooser is given (or see above).
|
|
|
|
| |
class HINSTANCE is acquired at static initialization
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for Canvas. ; Adding FSAA test.
Canvas/X11:
The Canvas GraphicsConfiguraton should be chosen before the native peer is being created.
Choosing AWT GraphicsConfiguration (all platforms):
Don't filter our capabilities with 'AWTGraphicsConfiguration.setupCapabilitiesRGBABits(capsChosen, gc)',
not necessary (see above) and it would remove ourrequired alpha channel.
Canvas display():
Don't render if drawable is not realized (yet).
|
| |
|
|
|
|
| |
NEWT WindowsWindow GetRelativeLocation() native implementation to GDI as well.
|
|
|
|
|
|
|
|
|
|
| |
Preparation to support multiple devices on one machine,
hence adding the unitID a unique ID/index of the associated GPU, or GPU affinity.
Adding getUniqueID() to return a cached semantic unique string id for the device.
This was removed from the temp. impl in JOGL's GLContext, added unitID.
All other changes just adapt to the above.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
device.
AbstractGraphicsDevice's 'connection' and 'type' attribute is used as a unique key
to map GLProfiles and GLContext's major/profile -> major/minor/profile mapping.
Eager initialiaztion as well as lazy is supported to maintain a simple API.
This is currently tested on X11, where one app display NEWT/GL window and content
on the local and remote device.
See TestRemoteWindow01NEWT.java and TestRemoteGLWindows01NEWT.java
|
|
|
|
|
|
|
|
|
|
| |
support multi devices & displays.
Currently only the X11 Display connection is implemented to support multiple device connections.
Other platforms may follow.
This allows correct mapping and caching of higher level resources,
eg. ProcAddressTable, GL version mapping etc with respect to the display device.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix context scanning
---------------------
Ie on 3.0 NVidia systems, trying to create a 4.1 context leads
to a BadAlloc X11 error.
A prev patch disabled the X11 error handler, to reduce sideeffects.
In case AWT is not being used, the BadAlloc isn't catched and the JVM freezes
within the native function call.
Decorating context scanning with NativeWindow's 'setX11ErrorHandler' solves this issue.
Simplifications
-----------------
X11: always try a direct context. If this is not possible due to the display connection,
an indirect is being used anyways. Hence 'createContext(boolean direct)' -> 'createImpl()'.
X11/WGL: Simplify the context creation logic a bit.
|
|
|
|
| |
.. and a little cleanup in the X11 SharedResourceRunner
|
|
|
|
|
|
|
| |
Reduce (performance/footprint) overhead of ProcAddressTable recreation,
instead use a hashmap (major, minor, profile) -> ProcAddressTable.
Remove GL2ES12 implementation profile, redundant.
|
|
|
|
|
| |
Each GLDrawableFactory implementation provides a shutdownInstance() method,
issued by GLProfile.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changed GLProfile/NativeWindowFactory/.. initialization methodology:
GLProfile:
public static synchronized void initSingleton(final boolean firstUIActionOnProcess);
NativeWindowFactory:
public static synchronized void initSingleton(final boolean firstUIActionOnProcess);
+++
Introducing NativeWindow ToolkitLock, implementations are
NullToolkitLock
JAWTToolkitLock
X11JAWTToolkitLock
X11ToolkitLock
AbstractGraphicsDevice provides generic global toolkit locking methods,
implemented by the ToolkitLock interface.
ToolkitLock's are aggregated in NativeWindow's DefaultGraphicsDevice
to implement it's superclass lock()/unlock() methods.
This enables a device specific locking strategy, ie on X11/AWT utilizing
JAWT && X11 locking, and maybe none for others (NEWT).
No locking is required for X11 / AWT, in case the above mentioned
initialization happened as a 'firstUIActionOnProcess'.
The ToolkitLock factory is currently a hardcoded part of NativeWindowFactory.
We may have to allow 3rd party NativeWindow implementations
to register custom ones.
+++
com.jogamp.opengl.impl.GLDrawableImpl cleanup:
Dealing with all locking code, providing all public methods. Exceptions are commented.
Specializations x11/windows/.. only contains platform code.
Pulled down access qualifiers if possible public -> protected.
com.jogamp.nativewindow.impl.x11.X11Util
Wrapping all X11Lib method with the new locking code.
com.jogamp.nativewindow.impl.jawt.JAWTUtil
Utilize global SunToolkit.awtLock() is available,
the fallback to global JAWT.lock().
The latter just invokes the first.
javax.media.nativewindow.awt.AWTGraphicsDevice
setHandle(long handle) -> setSubType(String type, long handle)
which also resets the ToolkitLock respecting the new type.
This ensures correct locking after the sub type has been determined,
ie AWT using an X11 peer.
+++
Misc Changes done on the way ..
GLCanvas:
Fixed inversed this.drawableHelper.isExternalAnimatorAnimating() condition,
which disabled normal repaint.
GLJPanel:
Removed drawableHelper.isExternalAnimatorAnimating() condition,
which disabled painting, since the animation thread just updates the source image.
NEWT WindowImpl:
When reparenting back to parent and 'refit' child if it's size exceeds it's parent.
More 'Fix: Memory consumption' commit 6ced17f0325d5719e992b246ffd156e5b39694b4.
NEWTEvent:
Removed code to evaluate the 'system event' attribute, need to find a better approach.
|
| |
|
|
|
|
|
|
|
| |
sharedContext lock/release
Unsynchronized lead to an 'context already locked by another thread' exception
at initialization time (Windows: in general; X11: ATI and pbuffer drawable).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NativeWindow/NativeSurface Refactoring
- Using NativeSurface interface
- NativeWindow extends NativeSurface, adds getLocationOnScreen(Point)
- NativeWindow add: getParent()
- NativeWindow/Surface: Removed 'invalidate()', use 'destroy()' if you must.
- NullWindow -> ProxySurface impl NativeSurface
- JOGL: Uses NativeSurface only.
- GLDrawable.getNativeWindow() -> GLDrawable.getNativeSurface()
Added mouseClick NEWT/AWT unit test
JOGL:
- GLAnimatorControl add: resetCounter()
-
NEWT:
- GLWindow counters: return GLWindow counters always
- WindowImpl
- requestFocus() wait until done
- reparent: readded requestFocusImpl(true),
native impl skips java focusAction if reparented
- X11Window: Add XRaiseWindow() in requestFocus()
|
|
|
|
|
|
|
|
| |
- www/index.html: absolute local refs -> relative
- Platform GLContextImpl specialisations: remove local overriding drawable instance
- X11ExternalGLXDrawable: Remove dead code, left over.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is redundant due to COPYRIGHT notice in LICENSE.txt.
It's product usage terms are no more applicable,
since our repository is not used by Sun Microsystems to deliver a product.
LICENSE.txt changes:
- Updated SGI FreeB license reference from 1.1 to 2.0
- Dropped Sun alternative license, which is redundant
due to the FreeB 2.0 license.
- Added JogAmp Community and common denominator:
New BSD 3-clause license
README:
- Added contacts
- Sun -> JogAmp
- Added Michael Bien
Changed 'Sven Gothel' and 'Michael Bien' New BSD 3-clause license
to 'JogAmp Community' Simplified BSD 2-clause license.
|
| |
|