| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
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()
|
|
|
|
| |
(with unit test)
|
| |
|
|
|
|
| |
to all GLEventListeners at destroy()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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).
|
|
|
|
| |
since the drawable may realize itself with the display() call. This situation appears with an AWT GLCanvas
|
|
|
|
| |
desired behavior and is more compliant with other APIs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
robust, doc Java2D/AWT properties.
On X11 disableBackgroundErase() must happen before native peer creation,
this patch issues it before and after super.addNotify().
Make drawable creation more robust, ie only create a drawable in case the size is > 0x0
and do this check/create at display/paint in case size it not yet determined.
Add documentation about Java2D/AWT properties impact on GLCanvas.
Make JUnit tests on AWT/GLProfile's more robust, while adding frame validate()
ensuring 1st paint will have a size, hence will create the drawable.
This is necessary for eg. AMD GPU's and GL context > 3.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
SUCCESS
|
| |
|
|
|
|
|
|
| |
an <init> exception.
Also adding current thread name.
|
| |
|
|
|
|
| |
(boolean)success instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
96af6c9bf2d683115996 moved the creation of the AWTGraphicsConfiguration,
GLDrawable and GLContext to the GLCanvas constructor.
This disabled recreation, removeNotify()/addNotify() after 1st addNotify(),
since the drawable/context were already set to null.
Smart recreation, ie not destroying the resources completly:
1 - drawable
2 - context
3 - AWTGraphicsConfiguration's Device (X11: Display)
is not possible, since removeNotify() is the only destroy notification
we have from AWT, which would leave the above resources open -> leak.
This is especially true for (3), since the device is created 'on the fly'.
In NEWT we use lazy creation/destroy and are able to keep the references alive.
A remodelling of AbstractGraphicsConfiguration would be required,
which indeed would be overkill.
Simple solution is to move the creation block back to addNotify()
but before 'super.addNotify()', since it needs our chosen AWTGraphicsConfiguration.
Also flagging sendReshape in addNotify().
Added test case com.jogamp.test.junit.jogl.awt.TestAWT03GLCanvasRecreate01.
|
|
|
|
| |
pause()/resume() so it becomes a non critical to multithreading, hence display() or state change needs to be synced
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
cause a SIGSEGV at JVM exit.
|
|
|
|
| |
to simplify usage.
|
|
|
|
| |
SIGSEGV on AMD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider use cases with many drawables and no drawables at start,
this had to be reflected all over this patch set, implementation,
usage and test cases.
- GLAnimatorControl
- refine API doc / states
- add 'void remove(GLAutoDrawable drawable);'
- Animator*:
- using RecursiveLock 'stateSync' for all actions out of the big synchronized (animator) block:
- get status methods (thread, isPaused, ..), hence no more synchronized
- display drawables change, utilizing synced ArrayList swap
This removes the need for volatiles usage shouldPause/shouldStop within the display method.
- added blocking wait for state change for add(GLAutoDrawable)/remove(GLAutoDrawable) method
- remove flawed double checked locking in anim thread (pause/idle condition)
- thread is now a daemon thread, hence it won't hinder the JVM from shutdown
-
- Animator use change:
- Always resume after pause, except in case of final destroy -> NEWT invalidate / GLCanvas,
this considers use cases with many drawables and no drawables at start.
- GLDrawableHelper: Don't pause at implicit dispose()
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
| | |
|
|/
|
|
| |
made references created in double checked locks volatile.
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| | |
and getChosenCapabilities() return immutable instances. Add cloneCapabilities() to create a mutable clone of an immutable set of capabilities.
|
| |
| |
| |
| | |
Unregister the shutdown hook if called manually (recommended!).
|
|/
|
|
| |
NEWT WindowsWindow GetRelativeLocation() native implementation to GDI as well.
|
|
|
|
| |
not available ..
|
|
|
|
|
|
|
|
|
|
| |
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
|