Summary: | Allow re-association of GLContext/GLEventListener to a GLDrawable, allowing GLContext/GLEventListener survival of GLDrawable/Surface Destruction | ||
---|---|---|---|
Product: | [JogAmp] Jogl | Reporter: | Brice Figureau <brice.figureau> |
Component: | core | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | gouessej, sgothel |
Priority: | --- | ||
Version: | 2 | ||
Hardware: | All | ||
OS: | all | ||
Type: | --- | SCM Refs: |
jogl b738983638703bb721ee4c9820c8ef43e2252e73
jogl 7fd5f76e1eb4bbf93fe9b1171744bd755d8f96e4
jogl 2fe180fbee15b82e2ae14fe3c95887db246c874d
jogl c225285e09f0a29fca418601bf1aa07cafb54339
jogl e2506d7663b752f00f0a98f793ebad52e65bd1e3
|
Workaround: | --- |
Description
Brice Figureau
2013-01-08 16:48:38 CET
Will refine the whole GLContext.setDrawable(..), i.e. GLContext<->GLDrawable association to allow an unbound GLContext. The latter is ofc to be treated very carefully, i.e. no method shall be called until re-associated w/ GLDrawable. Then .. when passing unit tests etc., we can have an option in e.g. NewtBaseActivity to flag GLContext survival .. part 1 - see commit message .. Achieved: New test case w/ GLContext surviving GLAutoDrawable destruction and re-association (X11, Windows and OSX w/ NEWT). Tackling EGL derived surface case w/ commit 7fd5f76e1eb4bbf93fe9b1171744bd755d8f96e4, not complete yet. Bug 665 (part 3) - Add EGL/ES2 tests, attempt to fix wrapped EGL case - Add EGL/ES2 tests in - TestGLContextDrawableSwitch01NEWT - TestGLContextDrawableSwitch11NEWT - Attempt to fix wrapped EGL case (incomplete) - Using EGL/ES w/ non native EGL device/surface, but natively wrapped instances (most of the cases), a 'complicated' delegation of Native-Upstream -> EGL-Proxy -> EGL-Instance is being used heavily relying on the objects lifecycle. GLEventListenerState tries to roll back the realized state and even sets the upstream device handle, but this doesn't seem to be sufficient on X11. Discussion: It might turn out that we only can implement the survival of GLContext and it's display device reliable w/ EGL within the GLAutoDrawable implementation, which can hold the previous not destructed instances. Part 4: http://jogamp.org/git/?p=jogl.git;a=commit;h=c225285e09f0a29fca418601bf1aa07cafb54339 Part 5: http://jogamp.org/git/?p=jogl.git;a=commit;h=e2506d7663b752f00f0a98f793ebad52e65bd1e3 Part 6 http://jogamp.org/git/?p=jogl.git;a=commit;h=3ad03e41a0cda81119c23f350c00b064a4de70c2 Part 7 (Android Specific) http://jogamp.org/git/?p=jogl.git;a=commit;h=d514ecbf052d013ea8c0982c490757678075a9ea Tested manually on Android devices, i.e. when pressing HOME and returning to application, the state has been preserved (no dispose/init on GLEventListeners and same GLContext is being used .. etc). This is visible when the 'gears' for example return in the same [rotational] state when left .. GLEventListenerState handling is described w/ interface GLStateKeeper to be used and queried by any platform if desired. |