| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
public use
|
|
|
|
| |
VersionNumber instead of null, it's get*string returns a zero length string instead of null.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WindowsWGLDrawableFactory Quirks to GLRendererQuirks (NeedCurrCtx4ARBPixFmtQueries, NeedCurrCtx4ARBCreateContext); Bug 706: Confine NeedCurrCtx4ARBCreateContext to [Windows, ATI, driver < 12.102.3); Avoid possible NPE @ GLContext.getGLVendorVersionNumber()
- Simplify GLDrawableFactory's SharedResource Query Methods
- Moving common methods to GLDrawableFactory/GLDrawableFactoryImpl
while reusing common methods to SharedResourceRunner.Resource.
- All factories SharedResources impl. SharedResourceRunner.Resource.
- Move WindowsWGLDrawableFactory Quirks to GLRendererQuirks (NeedCurrCtx4ARBPixFmtQueries, NeedCurrCtx4ARBCreateContext)
- For better maintenance, move the mentioned quirks from the windows factory to our common place,
being detected within GLContextImpl after each context creation.
- Bug 706: Confine NeedCurrCtx4ARBCreateContext to [Windows, ATI, driver < 12.102.3)
- Before we added this quirk if [Windows, ATI],
however, we have hopes that the new drivers will suffice for all
as tested successful on my test machine (AMD Radeon HD 6300M Series, amd_catalyst_13.5_mobility_beta2).
- Avoid possible NPE @ GLContext.getGLVendorVersionNumber()
- GLContext.getGLVendorVersionNumber() never returns 'null' but a zero version instance instead!
- Add API doc.
- Use mixed case names in GLContextImpl.setRendererQuirks(..).
|
|
|
|
|
|
|
|
| |
when calling wglCreateContextAttribsARB (Windows)
See discussion at
https://jogamp.org/bugzilla/show_bug.cgi?id=520
https://jogamp.org/bugzilla/show_bug.cgi?id=706
|
| |
|
|
|
|
| |
for null against a temp variable to narrow races
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Harvey Harrison <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
glXCreateContextAttribsARB(..) - Mitigate driver bugs
Ensures the error handler is in place and previous X11 cmds are being executed before the 'critical' glXCreateContextAttribsARB(..)
call which might lead to erroneous behavior w/ buggy drivers.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
surface.lock[ modify ] ]
GLEventListenerState:
New model for GLEventListenerState's transaction safety:
- Z Decorate-1: Animator.pause [ X ] Animator.resume
- X Decorate-2: Surface.lock [ Y ] Surface.unlock
- Instead of setting AbstractGraphicsDevice, just swap the handle and ownership.
- Issuing setRealized(..) only if required, i.e. having an upstream-surface (EGL..) depending on used device
- Utilizing setRealized(..) on the GLAD's delegated 'real' drawable, avoiding optional GLAD locking.
- Cleanup and above changes shall render impl. easier to read.
GLEventListenerState Unit Tests:
- If swapping/moving from AWT -> NEWT, use a NEWT dedicated Display
avoiding ATI driver XCB crash - read comment.
|
|
|
|
| |
DisposeGLEventListenerAction.run() ; Make 'backend' volatile due to possible multi-threading access.
|
|
|
|
|
|
|
|
|
| |
ASAP at Ctor instead of setRealized(true); WindowsWGLContext: Exclude ARB creation for BITMAP
Unit Test TestGLAutoDrawableFactoryGLnBitmapCapsNEWT added using BITMAP on GLProfile.getDefault()
Also:
X11GLXContext, WindowsWGLContext: Cleanup formatting in createImpl(..)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(Windows Vista does report BITMAP w/ ARB PFD)
On Windows Vista machines, ARB PFD selection reports BITMAP which is attempted to be used.
Excluse updateGraphicsConfigurationARB(..) from BITMAP query, similar to getAvailableGLCapabilitiesARB()
from commit 61a47e07975eb2fd8b1f5f60552935c993a6eef6.
TODO: Re-evaluate commit db24615ebaebcda88ffb7275d3a60e6400226099
|
|
|
|
|
| |
On Windows Vista machines, using alpha, i.e. RGB8888 failed to SetPixelFormat(..),
hence only allow RGB888.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug 719 - Windows BITMAP Offscreen Orientation is not propagated through API
Fix Bug 719 - Windows BITMAP Offscreen Orientation is not propagated through API
Depends on Bug 720, since cleaning up GLContextImpl* is required to move
property 'GLContext.isGLOrientationFlippedVertical()'
to 'GLDrawable.isGLOriented()' where it belongs!
Windows BITMAP GLDrawable impl. isGLOriented() shall return false,
while we keep the BITMAPINFOHEADER's height field negative
to remove the need for vertical flip when used w/ AWT or Windows, ..
Then property 'GLDrawable.isGLOriented()' has to be recognized throughout the
utility functions, i.e. TextureData's mustFlipVertically and hence TextureIO writer.
Fix Bug 720: Unify all platform specific GLContextImpl specializations
GLContextImpl shall have only _one_ unique platform derivative
to allow proper swapping of GLDrawables of any type via:
- 'GLAutoDrawable.setContext(GLContext newCtx, boolean destroyPrevCtx)', which calls
- 'GLContext.setGLDrawable(GLDrawable readWrite, boolean setWriteOnly)'
Exception: External context may be specialized.
All drawable specific property handling shall be provided
and implemented (if possible) via GLDrawable specializations.
- GLContext.isGLOrientationFlippedVertical() -> GLDrawable.isGLOriented()
- PNGImage.createFromData() takes 'isGLOriented' to properly handle vertical flipping simply by line ordering
- TextureIO's PNG writer passes TextureData's getMustFlipVertically() as isGLOriented to PNGImage.createFromData()
- GLReadBufferUtil respects GLDrawable's isGLOriented() when creating TextureData instance.
- Screenshot respects GLDrawable's isGLOriented()
- Screenshot is deprecated, use GLReadBufferUtil.
- Removed all PBuffer attributes, i.e. floatingPoint, RenderToTexture and RenderToTextureRectangle.
- Allows removal of special pbuffer handling in GLContext* implementations.
- Removed also from GLCapabilities*
- Removed from deprecated GLPbuffer
Impact:
- Low, users who desire to render into a texture shall use our FBO GLOffscreenDrawable.
- Only use case was the deprecated GLPbuffer
- floating point framebuffer technology is still patented anyways :)
- Removed Java2DGLContext, which was only used for OSX's GLJPanel Java2D bridge,
which is no more supported anyways.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Filter invalid PFD configs
- Filter invalid PFD configs
- WindowsBitmapWGLDrawable: Clip chosenCaps to RGBA888[0|8]
- WindowsBitmapWGLDrawable: Only use BITMAPINFOHEADER.BiBitCount=24
- WindowsWGLGraphicsConfiguration: Only allow GDI BITMAP PFD's w/ RGB888 w/ alpha <= red, others may fail
- WindowsWGLGraphicsConfigurationFactory.getAvailableGLCapabilities()
- Fetch ARB caps w/o BITMAP
- Concat GDI [BITMAP] caps
|
|
|
|
| |
getExclusiveWinAttributeBits(..); WGLGLCapabilities: Add PFD2String(..)
|
|
|
|
| |
has set 'markAllDisplaysUnclosable' (Down -> Upstream)
|
|
|
|
|
|
| |
Mesa >= 8.0
Tested w/ kubuntu 12.04, Mesa 8.0.4 (glx/dri/gallium and X11 SW rasterizer)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
5b47372590ec715647ebbd75d70c41ec7a64485a ; Close X11 Display in isDeviceSupported()
- Moved GL vendor version parsing to GLVersionNumber
- Moved X11Util.markAllDisplaysUnclosable() trigger into SharedResource creation of
- X11GLXDrawableFactory
- EGLDrawableFactory
- GLProfile is back to pre 5b47372590ec715647ebbd75d70c41ec7a64485a,
i.e. contains no quirk artifact (clean)
- Close X11 Display in X11GLXDrawableFactory.isDeviceSupported()
Regression of 9a4fcc7ea4ec61e4ceed791acced734ac04ea270
- TODO: Remove X11Util markAllDisplaysUnclosable detection code ?
Notes to Martin:
- Use TAB == 4 SPACES
- No author names into source code, git commit log is enough.
- No need to tag your edits, the diff is enough.
|
|
|
|
| |
DontCloseX11DisplayConnection
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Prevent division and multiplication by zero errors in native code
after mpeg video seek caused by type truncation.
Signed-off-by: Xerxes Rånby <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
bound non default VAO to pass VBO enabled test, even if VBO is disabled.
VAO is available if: GL >= 3.0 or is having GL_ARB_vertex_array_object extension.
checkBufferObject(..) checks whether VERTEX_ARRAY_BINDING has a non default VAO bound in case
no VBO is being bound and VAO is allowed.
glBindVertexArray(int) is being tracked, i.e. on state VERTEX_ARRAY_BINDING
|
| |
| |
| |
| | |
GLFBODrawableImpl.contextMadeCurrent(ctx, true): Throw exception if !initialized
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add drawable size validation before attempt to create context; MacOSXCGLContext: Explicit exception for Null AttachGLLayerCmd.
GLContextImpl:
- destroy():
- Fix null drawable check
Only if the GLContext isCreated(), we require a drawable to be set.
- Proper name of associateDrawable Exception
- makeCurrentWithinLock():
- Add drawable size validation before attempt to create context.
- 'makeCurrent()' shall never be called w/o proper sized drawable, i.e. > 0x0.
- returns CONTEXT_NOT_CURRENT, if drawable size is <= 0x0
MacOSXCGLContext:
- Explicit exception for Null AttachGLLayerCmd.
In case context creation has failed via makeCurrent(),
AttachGLLayerCmd may never been issued and hence maybe NULL.
Catch this case and send a meaningful exception,
which is catched and fwd in GLContext.destroy().
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Harvey Harrison <[email protected]>
|
| |
| |
| |
| | |
!realized] and makeCurrent() failure.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
createHandle()/destroyHandle(); Handle LOCK_SURFACE_CHANGED in lockSurface() ; GLContextImpl.makeCurrent(): Fix drawable handle validation.
GLDrawable: Refine API doc (realized/handle)
- Lifecycle of the drawable handle was not clear
- Ephasizing handle's dependency on NativeSurface's lock state and drawable's realization
GLDrawableImpl: Balance createHandle()/destroyHandle()
- updateHandle() -> createHandle()
- ensure both are balance, see below
GLDrawableImpl: Handle LOCK_SURFACE_CHANGED in GLDrawableImpl's lockSurface()
- call destroyHandle() and createHandle()
GLContextImpl.makeCurrent(): Validate drawable handle if realized only.
- it is valid to have an invalid drawable handle if not realized (see above)
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
JogampRuntimeException at *DrawableFactory* instantiation trial
In case EGL is not completly installed, EGLDisplayUtil.eglGetDisplayAndInitialize(..)
will throw a GLExeception which was not catched in GLDrawableFactory.
The latter only catched JogampRuntimeException caused by ReflectionUtil due to n/a classes,
but the actual initialization code is capable to throw others.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Main-Thread
Previous code created, set and unset the root CALayer on the current thread,
which lead to a very delayed destruction of the root CALayer w/.
With Java7 this lead to a possible resource starvation in certain situations,
since Java7 uses an CAOpenGLLayer.
Similar w/ f354fb204d8973453c538dda78a2c82c87be61dc,
creation, set and unset is operated on main-thread.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Original JavaScript code from <https://github.com/notmasteryet/jpgjs/blob/master/jpg.js>,
author 'notmasteryet' <async.processingjs at yahoo.com>.
Ported to Java.
Enhancements:
* InputStream instead of memory buffer
* User provided memory handler
* Fixed JPEG Component ID/Index mapping
* Color space conversion (YCCK, CMYK -> RGB)
* More error tolerant
+++
Features:
JOGL AWT
RGB ok ok
YCCK ok Exception
CMYK ok Exception
YUV Store ok n/a
Need Y-Flip no yes
+++
Benchmark: TestJPEGJoglAWTBenchmarkNewtAWT
JOGL.RGB Loops 100, dt 1199 ms, 11.99 ms/l
JOGL.YUV Loops 100, dt 351 ms, 3.51 ms/l
AWT..... Loops 100, dt 2144 ms, 21.44 ms/l
File: jogl/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/j1-baseline.jpg
Machine: GNU/Linux PC (AMD 8 core), JavaSE 6 (1.6.0_38)
.++++ UITestCase.setUp: com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTBenchmarkNewtAWT - benchmark
libEGL warning: DRI2: failed to authenticate
0: JPEGImage[261x202, bytesPerPixel 3, reversedChannels false, JPEGPixels[261x202, sourceComp 3, sourceCS YCbCr, storageCS RGB, storageComp 3], java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]]
0: TextureData[261x202, y-flip false, internFormat 0x1907, pixelFormat 0x1907, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 0, buffer java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]
JOGL.RGB Loops 100, dt 1199 ms, 11.99 ms/l
0: JPEGImage[261x202, bytesPerPixel 3, reversedChannels false, JPEGPixels[261x202, sourceComp 3, sourceCS YCbCr, storageCS YCbCr, storageComp 3], java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]]
0: TextureData[261x202, y-flip false, internFormat 0x1907, pixelFormat 0x1907, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 0, buffer java.nio.DirectByteBuffer[pos=0 lim=158166 cap=158166]
JOGL.YUV Loops 100, dt 351 ms, 3.51 ms/l
0: TextureData[261x202, y-flip true, internFormat 0x1907, pixelFormat 0x80e0, pixelType 0x1401, border 0, estSize 158166, alignment 1, rowlen 261, buffer java.nio.HeapByteBuffer[pos=0 lim=158166 cap=158166]
AWT..... Loops 100, dt 2144 ms, 21.44 ms/l
++++ UITestCase.tearDown: com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTBenchmarkNewtAWT - benchmark
|
| |
|
|
|
|
| |
SharedResourceRunner.Impl.createSharedResource(..): isGLXAvailableOnServer(..) call redundant since checked upfront at isDeviceSupported(..)
|
|
|
|
| |
thread, allowing a more gracefull detection of n/a GLX on X11
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
destroys ; Recognizing all GLAutoDrawable's GLAnimatorControl for pause/resume ; Use GLAnimatorControl instead of Animator
- Add Support for GLStateKeeper
If !isFinishing() (HOME button), preserve the GLEventListener if an GLStateKeeper instance
- onPause() always destroys
onDestroy() is too late, i.e. surfaceDestroyed() already called
- Recognizing all GLAutoDrawable's GLAnimatorControl for pause/resume
pause/resume the GLAnimatorControl of all GLAutoDrawable instances
- Use GLAnimatorControl instead of Animator
We used an Animator reference .. duh!
Note: The EGL native WindowDriver (Android and BCM.IV) must retain their own copy of EGLGraphicsDevice,
which preserves the EGLDisplay handle due to EGLDisplayUtil reference counting per nativeHandleID.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
restauration for GLAutoDrawable
- New GLStateKeeper interface, package com.jogamp.opengl
Implemented by:
- GLAutoDrawableBase
Currently supported by:
- NEWT GLWindow
- GLEventListenerState package move:
com.jogamp.opengl.util -> com.jogamp.opengl
|
|
|
|
| |
main-thread, drawable maybe null already
|
|
|
|
| |
DEBUG property 'jogl.debug.PNGImage'
|