| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
GL_ARB_ES3_2_compatibility -> [GL|GLContext].isGLES32Compatible()
|
|
|
|
|
|
|
|
|
| |
GL_EXT_direct_state_access
We cannot subsume/rename even parts of GL_EXT_direct_state_access,
since it is explcit stated in the spec that no assumption
shall be made in regards compatibility and interaction.
Hence we add both, GL 4.5 DSA and GL_EXT_direct_state_access.
|
|
|
|
|
|
|
|
|
|
|
|
| |
DelegateImplementation/ReturnsOpaque (Bug 1144)
Using GlueGen's new DelegateImplementation/ReturnsOpaque feature (Bug 1144)
allows us to drop manually C implementation stubs, while simply delegating
into the renamed private generated variant using the manual stub.
Completed glBufferStorage and glNamedBufferStorage for GL 4.4
while subsuming DSA's of GL 4.5 and GL_EXT_direct_state_access
(only the single functions, otherwise extension is not compatible).
|
|
|
|
| |
GL 4.5
|
| |
|
|
|
|
| |
mis-interpretation alike Version130 -> [ 1.3.0 | 1.30.0 ] ?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed Deprecated Class:
- com/jogamp/opengl/util/TGAWriter.java
- Use TextureIO w/ .tga suffix
- com/jogamp/opengl/util/awt/Screenshot.java
- Use:
- com.jogamp.opengl.util.GLReadBufferUtil, or
- com.jogamp.opengl.util.awt.AWTGLReadBufferUtil
The latter for reading into AWT BufferedImage
See: TestBug461FBOSupersamplingSwingAWT, TestBug605FlippedImageAWT
- javax/media/opengl/GLPbuffer.java
- Use:
caps.setPBuffer(true);
final GLAutoDrawable pbuffer = GLDrawableFactory.getFactory( caps.getGLProfile() ).createOffscreenAutoDrawable(null, caps, null, 512, 512);
- See: TestPBufferDeadlockAWT, ..
Removed Deprecated Methods:
- Constructor of AWT-GLCanvas, SWT-GLCanvas, AWT-GLJPanel
with argument 'final GLContext shareWith'
See GLSharedContextSetter, i.e. glCanvas.setSharedContext(..) !
- GLDrawableFactory.createOffscreenAutoDrawable(..)
with argument 'final GLContext shareWith'
See GLSharedContextSetter, i.e. offscreenAutoDrawable.setSharedContext(..) !
- GLDrawableFactory.createGLPbuffer(..),
see above!
- com.jogamp.opengl.util.av.AudioSink 'enqueueData(AudioDataFrame audioDataFrame)',
use 'enqueueData(int, ByteBuffer, int)'
- GLSharedContextSetter.areAllGLEventListenerInitialized(),
migrated to GLAutoDrawable !
- GLBase's
- glGetBoundBuffer(int), use getBoundBuffer(int)
- glGetBufferSize(int), use getBufferStorage(int).getSize()
- glIsVBOArrayBound(), use isVBOArrayBound()
- glIsVBOElementArrayBound(), use isVBOElementArrayBound()
- NEWT MouseEvent.BUTTON_NUMBER, use BUTTON_COUNT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
synchronized and secure [1/2]
GLBufferSizeTracker becomes GLBufferObjectTracker
and tracks the buffer's data store, GLBufferStorage, accurately, synchronized and secure.
Synchronization is required, since the GLBufferStorage can be
shared across many GLContext on multiple threads.
This requires all GLBufferStorage lifecycle affecting GL functions
to utilize synchronized GLBufferObjectTracker methods
while passing a native GL-func callback.
These GL functions are:
- glBufferData, glBufferStorage (GL 4.4), glNamedBufferDataEXT
Creating the GLBufferStorage object
- glMapBuffer, glMapBufferRange, and their *Named*EXT variants
- glUnmapBuffer, glUnmapNamedBufferEXT
'glDeleteBuffers' can simply notify the GLBufferObjectTracker
No more HashMap is required to associate the mapped buffer address
to the mapped ByteBuffer.
GLBufferObjectTracker simply utilizes a
buffer-name (int) -> GLBufferStorage
map.
+++
The security aspect shall be implemented by validating all arguments
whether they match the required GL constraints,
as well as validating tracked states like 'size'.
The following functions will throw an GLException accordingly:
- glBufferData, glNamedBufferDataEXT
* @throws GLException if size is less-than zero
* @throws GLException if a native GL-Error occurs
- glBufferStorage (GL 4.4)
* @throws GLException if size is less-or-eqaul zero
* @throws GLException if a native GL-Error occurs
- glMapBuffer, and it's *Named*EXT variant
* @throws GLException if buffer is not bound to target
* @throws GLException if buffer is not tracked
* @throws GLException if buffer is already mapped
* @throws GLException if buffer has invalid store size, i.e. less-than zero
- glMapBufferRange, and it's *Named*EXT variant
* @throws GLException if buffer is not bound to target
* @throws GLException if buffer is not tracked
* @throws GLException if buffer is already mapped
* @throws GLException if buffer has invalid store size, i.e. less-than zero
* @throws GLException if buffer mapping range does not fit, incl. offset
- glMapBufferRange, and it's *Named*EXT variant
Only clear mapped buffer reference of GLBufferStorage
if native unmap was successful.
Further more special error handling shall be applied to:
- glMapBuffer, and it's *Named*EXT variant,
glMapBuffer, and it's *Named*EXT variant
- A zero GLBufferStorage size will avoid a native call and
returns null
- A null native mapping result indicating an error will
not cause a GLException but returns null
This allows the user to handle this case.
|
|
|
|
|
|
| |
and GLBufferSizeTracker (simplification)"
This reverts commit 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLBufferSizeTracker (simplification)
Due to future mapped buffer tracking, the GLBufferStateTracker instance shall be shared
across shared GLContextImpl instances similar to GLSizeStateTracker!
This allows us to merge GLSizeStateTracker code into GLBufferStateTracker
to simplify the implementation.
+++
Clear the GLBufferStateTracker (@destruction) only if no more
created shares are left!
+++
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(spec doesn't mention it, and it does not show results w/ CPU sourced rendering) ; Clean up GLBuffer*Tracker
+ * Note that VAO initialization does unbind the VBO .. since otherwise they are still bound
+ * and the CPU_SRC test will fail!<br/>
+ * The OpenGL spec does not mention that unbinding a VAO will also unbind the bound VBOs
+ * during their setup.<br/>
+ * Local tests here on NV and AMD proprietary driver resulted in <i>no ourput image</i>
+ * when not unbinding said VBOs before the CPU_SRC tests.<br/>
+ * Hence Bug 692 Comment 5 is invalid, i.e. <https://jogamp.org/bugzilla/show_bug.cgi?id=692#c5>,
+ * and we should throw an exception to give users a hint!
Leaving uncommented code in GLBufferStateTracker ..
+++
- Clean up GLBuffer*Tracker
- Use final
- Use static final keyNotFound value.
|
|
|
|
| |
GLContext: isCPUSourcedAvail() -> isCPUDataSourcingAvail()
|
|
|
|
| |
GL_DRAW_INDIRECT_BUFFER, add VBO variant and range-check
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reflect semanics - Also fix the exception message (enabled/disabled -> bound/unbound)
Reason of change: Avoid confusion and point to the cause!
API change:
glIsVBOArrayEnabled() -> glIsVBOArrayBound()
glIsVBOElementArrayEnabled() -> glIsVBOElementArrayBound()
glIsPBOPackEnabled() -> glIsPBOPackBound()
glIsPBOUnpackEnabled() -> glIsPBOUnpackBound()
Exception message change:
"must be enabled to call this method" -> "must be bound to call this method"
"must be disabled to call this method" -> "must be unbound to call this method"
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getDownstreamGL()/getRootGL(); GLContext.isGL* added proper API doc., isGL3core()/hasNoDefaultVAO() and getDefaultVAO().
- Fix BuildComposablePipeline's isGL*/getGL* (regression of commit 3a0d7703da32e9a5ddf08a334f18588a78038d880)
- GLBase: getDownstreamGL()/getRootGL()
Allows user traversing through pipelined GL instances.
Also added getRootGL() to GLContext.
- GLContext.isGL* added proper API doc.: We test the actual context, not the profile.
- GLContext isGL3core()/hasNoDefaultVAO() and getDefaultVAO()
- Move isGL3code() def. back to pre 3a0d7703da32e9a5ddf08a334f18588a78038d880, i.e. Includes [ GL4, GL3 ] w/o GLES3.
- Added hasNoDefaultVAO() and getDefaultVAO() .. incl. [ GL4, GL3, GLES3 ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ES3 / GL4.3:
- Update all EGL, GLX, WGL and GL (desktop and mobile) khronos headers to latest version.
- GL3/gl3* -> GL/glcorearb*
- Explicitly preserve ES2_compatibility and ES3_compatibility in header,
most extension grouping was removed in new headers.
- Always load all GLHeader to ensure proper extension association across all profiles.
- Unified method signatures
- Added GL_EXT_map_buffer_range to core
- Using common 'glMapBufferImpl(..)' for all glMapBuffer(..) and glMapBufferRange(..) impl.
- Init necessary fields of GL instances via 'finalizeInit()' called by reflection, if exist.
This allows removing initialization checks, i.e. for all buffer validations.
- BuildStaticGLInfo: Can handle new GL header structure, i.e. one CPP extenstion block incl. define + funcs.
- GLJavaMethodBindingEmitter: Simply print the
- No GL duplication due to new intermediate interfaces, see below
- OO lineare inheritance (Added GL2ES3, GL3ES3 and GL4ES3 intemediates):
GLBase - GL - GL2ES2 - GLES2
GLBase - GL - GL2ES2 - GL2GL3 - [ GL2, GL3 ]
GLBase - GL - GL2ES2 - GL2ES3 - GL3ES3 - [ GL3 ]
GLBase - GL - GL2ES2 - GL2ES3 - GL3ES3 - GL4ES3 - [ GLES3, GL4, .. ]
- Expose 'usable' intermediate interfaces GL3ES3 and GL4ES3 in GLBase/GLProfile/GLContext
via is*() and get*().
- GLContext*:
- isGL3core() is true if [ GL4, GL3, GLES3 ] (added GLES3)
- Added ctxProfile argument to allow handling ES versions:
- getMaxMajor(..), getMaxMinor(..), isValidGLVersion(..) and decrementGLVersion(..)
- mapGLVersions(..) prepared for ES ARB/KHR validation
- EGLContext checks ES3 (via old ctx's GL_VERSION)
- ExtensionAvailabilityCache adds GL_ES_Version_X_Y for ES.
- Prelim tests w/ Mesa 9.1.3
GL Version 3.0 (ES profile, ES2 compat, ES3 compat, FBO, hardware) - OpenGL ES 3.0 Mesa 9.1.3 [GL 3.0.0, vendor 9.1.3 (Mesa 9.1.3)]
- TODO:
- Use KHR_create_context in EGLContext.createContextARBImpl(..)
- More tests (Mobile, ..)
+++
Misc:
- GLContext*:
- Complete glAllocateMemoryNV w/ glFreeMemoryNV.
|
|
|
|
| |
names, e.g. Version31 -> Version310. ; Trim GLVersionNumber string.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLProfile and GLContext*
GLProfile: Enhance bootsrapping performance of loading GL*Impl class
- Offthread classloading of all GL*Impl via reflection at startup
reduces startup time here around 12% (800ms down to 700ms).
GLContext*: Enhance bootsrapping performance of querying available GL profiles
- Add PROFILE_ALIASING mode, defaults to true - can be disabled w/ property 'jogl.debug.GLContext.NoProfileAliasing'
- PROFILE_ALIASING:
If true (default), bootstrapping the available GL profiles
will use the highest compatible GL context for each profile,
hence skipping querying lower profiles if a compatible higher one is found.
Linux x86_64 - Nvidia: 28%, 700ms down to 500ms
Linux x86_64 - AMD : 40%, 1500ms down to 900ms
- GL*Impl:
- make fields final: glProfile, _context, buffer*Tracker and glStateTracker
- allow null _context/glProfile in initialization (bootstrapping)
- JoglVersion.getDefaultOpenGLInfo(..)
- add arg: 'boolean withCapabilitiesInfo', allowing to suppres the list of caps
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GearsES1/ES2)
rename/reloc:
- javax.media.nativewindow.util:
DimensionReadOnly -> DimensionImmutable
PointReadOnly -> PointImmutable
RectangleReadOnly -> RectangleImmutable
unified 'immutable' name as used within jogamp already
- remove array handler from public API
com.jogamp.opengl.util.GL*ArrayHandler -> jogamp.opengl.util.GL*ArrayHandler
- GLArrayData: Clarify method names
getComponentNumber() -> getComponentCount()
getComponentSize() -> getComponentSizeInBytes()
getElementNumber() -> getElementCount()
getByteSize() -> getSizeInBytes()
- FixedFuncPipeline: Moved def. array names to GLPointerFuncUtil
enhancement:
- GLArrayDataServer: Add support for interleaved arrays/VBO
- GLArrayData*.createFixed(..) remove 'name' argument (non sense for fixed function)
- PMVMatrix:
- one nio buffer
- removed 'Pmv' multiplied matrix
- removed 2x2 cut down 'Mvi' normal matrix (use 4x4 Mvi)
-
tests:
- RedSquare -> RedSquareES1/RedSquareES2
- Gears ES1 fixed + ES2 added. Both work properly and share common Gears VBO construction
- Added TestMapBuffer01NEWT, testing glMapBuffer
|
|
|
|
|
|
|
|
|
|
| |
- Moved implementation of prev GL imageSizeInBytes(..) -> GLBuffers.sizeof() for all GL profiles
- GLBuffers.*: Added missing formats and types (GL2.1, GL3.3 and GL4.1)
- GLBuffers.sizeof(): Fail fast if format/type is unhandled, or alignment invalid
- Added unit test for GLBuffers.sizeof()
|
|
|
|
|
|
|
|
|
|
| |
target, comments, names)
VBO target: Allowing ELEMENT_VERTEX_ARRAY w/o corresponding GLSL/Fixed attribute
Names: Clarified method named.
Comments: Added and fixed comments
|
|
|
|
|
|
|
|
|
|
| |
fail-fast hash cache, ..
Relates to GlueGen 6b6b9b3b81cdc85b7260664ebec547756a6be5d7, branch sgothel_wip_fixes01.
Memory object size is ptrdiff_t, hence long (64bit).
The hash value must include size as well, otherwise boundaries cannot be verified. (security)
Double check hash collisions while adding a new MemoryObject.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Update header:
- GL/glext.h to khronos 2010-08-03
- GL3/gl3.h to khronos 2010-08-03
- Move platform code to
GL/glplatform.h
GL3/glplatform.h
- Unify 64bit typedefs: gl-64bit-types.h
- Move GL 3.[123] and 4.[01] complete subsumed extension
enums and functions into their extension spec and just reference them.
This ensures proper extension availability
via lower OpenGL profiles, hence a proper GL2GL3 interface.
- GL3/GL4 cleanup:
- make-glextension-depignore.sh:
determine required GL version for extensions
for proper positioning, ie GL2GL3 or GL3 or GL4
via gluegen IgnoreExtension commands.
- use ARB_ES2_compatibility for common GL2ES2 methods,
if available
- consolidated gl2-gl4 subsumed extension to gl-common.cfg
- Missing GL3/GL4 Functions:
glMultiDrawElementsBaseVertex
glDebugMessageCallbackARB
glDebugMessageCallbackAMD
- TODO (new feature integration):
- ARB_ES2_compatibility / ARB_get_program_binary for com/jogamp/opengl/util/glsl, ie
- store binaries com/jogamp/opengl/util/glsl/sdk/CompileShader*
- query supported binary formats (enums ?)
- optional prio binaries
- ARB_ES2_compatibility, if available GLES2/GL2ES12 would be available
- ARB_separate_shader_objects for com/jogamp/opengl/util/glsl, ie
- swizzle vertex/fragment shader in programs
- ..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
glMap*Buffer*; GLX/WGL/CgGL: All runtime dynamic; Misc ..
TODO: Compile and test on MacOSX ..
Fix:
=====
Multithreading/Locking:
See jogl/doc/Implementation/MultiThreading.txt
- Locking layer is not platform agnostic, ie GLContextImpl, GLDrawableImpl, ..
and NEWT: Window/Display
- No more use of JAWT global lock necessary, removed.
- No need for X11 Display lock, on the contrary,
this made the NV driver hang.
- Use common window/surface lock
- All NativeWindow surfaceLock's are recursive now
glMapBuffer: If size is 0, don't do cont with the native call.
glMapBufferRange: Fix capacity.
glNamedBufferDataEXT: Track the size.
glMapNamedBufferEXT: Manual impl. - use the tracked size
glXGetVisualFromFBConfig, glXChooseFBConfig, glXChooseVisual: Instead of
ignoring and implement a renamed version (*Copied), we just use ManualImplementation
for the proper copy-result code.
DesktopGLDynamicLookupHelper: Initialize _hasGLBinding* attributes
in the determing loadGLJNILibrary() method, which is called by super().
Otherwise static init will overwrite them after the super() call.
X11GLXDrawableFactory: Don't release anything at shutdown (removed sharedContext.destroy()),
since this caused a freeze/SEGV sometimes.
Fixed NEWT's reparentWindow() functionality incl NewtCanvasAWT usage.
- Native: if not visible, don't focus, etc
- NewtCanvasAWT: Use the container size to start with
- Run the command on the EDT
Using GlueGen's new DynamicLibraryBundle utility:
- X11, Windows and MacOSX OpenGL adapted to DynamicLibraryBundleInfo.
- X11GLXDynamicLookupHelper -> X11GLXDynamicLibraryBundleInfo
- Remove all path from lib names.
- GL order: libGL.so.1, libGL.so, GL
- shallLinkGlobal: true -> to server some 'old' DRI systems
-> http://dri.sourceforge.net/doc/DRIuserguide.html
- shallLookupGlobal: false
- Try both : glXGetProcAddressARB and glXGetProcAddress
- Using bootstrap: GLX.glXGetProcAddress(long glxGetProcAddressHandle, String glFuncName)
Found the issue with LIBGL_DRIVERS_PATH, ie if not set
no valid GL instance can be found (ie ATI fglrx/DRI).
This may happen if using a differen user than the desktop user
for whom the env var is set within some /etc/X11/Xsession.d/ script.
Enhancements:
=============
GLBufferSizeTracker: Use IntIntHashMap and add DirectState size tracking.
GLBufferStateTracker: Use IntIntHashMap.
GLStateTracker: Use IntIntHashMap.
GLDynamicLookupHelper: More generic (global loading/lookup and GetProcAddress function name list),
remove redundant code.
FIXME:
MacOSXCGLDynamicLookupHelper:
- Not tested
- Not using NSImage lookup anymore as recommended by OSX API Doc,
so dlsym is used always (to be tested)
WindowsWGLDynamicLookupHelper:
- Not tested
GLX/WGL/CgGL is all runtime-dynamic as now, ie loaded and looked-up at runtime,
no compile time dependencies to GL anymore, nor a need to specify CgGL.
Split up WGL in GDI and WGL, to allow proper dynamic runtime linkage of OpenGL32
while using static binding to GDI32
NEWT events generated by native code are enqueued and not send directly.
This should ease locking mechanisms .. if any are necessary.
NEWT: More platform specific code moved to *Impl method,
simplifying the generic code of the superclass and impl protocol.
Cleanup:
=========
Replace all InternalBufferUtil's with com.jogamp.common.nio.Buffers
Removed all InternalBufferUtil's from repository
Removed GLContextImpl notion of 'optimized' surface locking,
where the surface gets unlocked during makeCurrent/release.
This just makes no sense and would impact multithreading in a horrible way.
|
|
- All available OpenGL versions (native/platform) are verified at GLProfile
initialization and can be queried ..
A mapping of major,compat -> major,minor,options is created.
- Removal of temp context creation, when creating a context.
This was necessary to query general availability of ARB_create_context.
Due to the shared context of X11GLXDrawableFactory and WindowsWGLDrawableFactory,
this is no more necessary.
Due to the version mapping, the ARB_create_context paramters are known.
- NativeWindow X11Lib: Added X11ErrorHandler, throwing a RuntimeException.
Necessary to catch BadMatch .. etc X11 errors, eg for glXCreateContextAttribsARB
Hence all X11 calls are covered now.
- X11DummyGLXDrawable needs to use an own Window, otherwise GLn n>2 fails
- Flattening the desktop GL* implementation,
all use GL4bcImpl, which reduces the footprint dramatically.
- GL*Impl.isGL*() (desktop) utilizes the GLContext.isGL*(),
hence the results reflect the actual native context version.
- GLContextImpl makeCurrent/create: Added workflow documentation,
clarified code, defined abstract methods to have a protocol.
- Removed moved files (from here to gluegen),
see gluegen a01cb3d59715a41153380f1977ec75263b762dc6
- NativeLibLoader -> <TYPE>JNILibLoader
- Fixed Exception Handling (as in gluegen bce53b52c8638729750c4286dbc04cb14329fd34),
ie removed empty catch Throwable ..
- GLContext.setSwapInterval(): Nop in offscreen case, otherwise X11IOError (NVIDIA Bug)
Test:
Tests
- Junit
- demos.gears.Gears
- demos.jrefract.JRefract
Platforms
- Linux 64/32 ATI/NVidia
- MacOsX
- Windows (virtualbox 3.1.6, offscreen failed)
TODO/BUGS:
- FIXME ATI GLn n>2 with AWT, can't make context current, works well on NVIDIA though
- FIXME GL3GL4: Due to GL3 and GL4 implementation bugs, we still choose GL2 first, if available!
- Add GL 3.3 to GL3/gl3ext.h
- Add GL 4.0 to GL3/gl3ext.h and fix the GL3/GL4 seperation
- Rename jogl.gl2.jar -> jogl.gldesktop.jar (as done with it's native lib already)
|