summaryrefslogtreecommitdiffstats
path: root/make/stub_includes
Commit message (Collapse)AuthorAgeFilesLines
* Fixed and Changed NVidia Windows Driver Threaded optimization bug workaround ↵Sven Gothel2014-07-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b Commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b added a workaround for the NVidia driver 260.99 for Window from 2010-12-11 issue. [1] The workaround sets a process affinity while JOGL initialization to mitigate NVidia driver's 'Threaded optimization := On' race conditions. The process affinity is reset reset after initialization. [2] The process affinity reset code had a bug, i.e. instead to restore the original process's affinity mask, we restored the system's default affinity mask. [3] Further more, there seem to be issues with changing a process affinity mask regarding the process group. This patch: - Solves issue [2] by using the original process affinity mask - Solves issue [3] by allowing a custom affinity mode via the property 'jogl.debug.windows.cpu_affinity_mode': - 0 - none (default, no affinity required for Windows NV driver >= 266.58 from 2011-01-24) - 1 - process affinity (was required w/ Windows NV driver 260.99 from 2010-12-11, see commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b) - 2 - thread affinity (experimental) Hence the workaround is disabled by default, since the crash as dicumented in commit 5166d6a6b617ccb15c40fcb8d4eac2800527aa7b could not be reproduced with NV driver 266.58 from 2011-01-24.
* Bug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units; ↵Sven Gothel2014-05-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add HiDPI for AWT GLCanvas w/ OSX CALayer Core API Change: To support HiDPI thoroughly in JOGL (NativeWindow, JOGL, NEWT) we need to separate window- and pixel units. NativeWindow and NativeSurface now have distinguished access methods for window units and pixel units. NativeWindow: Using window units - getWindowWidth() * NEW Method * - getWindowHeight() * NEW Method * - getX(), getY(), ... NativeSurface: Using pixel units - getWidth() -> getSurfaceWidth() * RENAMED * - getHeight() -> getSurfaceHeight() * RENAMED * GLDrawable: Using pixel units - getWidth() -> getSurfaceWidth() * RENAMED, aligned w/ NativeSurface * - getHeight() -> getSurfaceHeight() * RENAMED, aligned w/ NativeSurface * Above changes also removes API collision w/ other windowing TK, e.g. AWT's getWidth()/getHeight() in GLCanvas and the same method names in GLDrawable before this change. +++ Now preliminary 'working': - AWT GLCanvas - AWT GLJPanel Tested manually on OSX w/ and w/o HiDPI Retina: java com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT -manual -noanim -time 1000000 java com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT -manual -noanim -time 1000000 +++ TODO: - NEWT - Change Window.setSize(..) to use pixel units ? - OSX HiDPI support - Testing .. - API refinement
* FFMPEGMediaPlayer / FFMPEGv10Natives: Fix libav-10 and ffmpeg-2.x version ↵Sven Gothel2014-05-0963-0/+0
| | | | validation (libavutil)
* Libav/FFMpeg: Bump headers of final version libav-10 / ffmpeg-2.2Sven Gothel2014-05-0929-283/+1120
|
* Bug 867 - OSX: Allow core >=4 if isMavericksOrLater; Use ↵Sven Gothel2013-10-241-1/+2
| | | | [kCGLOGLPVersion_GL4_Core, kCGLOGLPVersion_GL3_Core] for major==4 depending on sticky GLRendererQuirks.GL4NeedsGL3Request
* Enhance GLMediaPlayer: Full FFMPeg support, 'dshow' camera support on ↵Sven Gothel2013-08-2963-0/+15424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | windows, 2 more pixel formats, fail-safe data handling - add support for ffmpeg 2 / libav 10 -> lavc55_lavf55_lavu52_lavr01 - add support for ffmpeg libswresample (similar to libavresample) - handle BGRA (GL type) and BGR24 (texture shader) - Change Camera URI semantics, drop 'host' and use 'path' for camera ID and use 'query' for options. - add support for Window's DShow camera selection - our camera id -> index of list of video-input devices, this gives us same behavior as w/ Linux - requires windows libs: strmiids, uuid, ole32, oleaut32 - Compiles w/ MingW64, works w/ libav/ffmpeg - TODO: test compilation w/ MingW 32bit ! - don't push data to texture if (linesize <= 0) this may happen due to buggy decoder / setup .. Tested manually on GNU/Linux x64 and Windows x64: - GNU/Linux libav 0.8, libav 9, libav 10, ffmpeg 1.2, ffmpeg 2.0 - Windows libav 0.8, libav 9, ffmpeg 2.0 - videos and camera
* Fix libav/ffmpeg compilation: Use 'dot less' dir/file names; Compile ffmpeg ↵Sven Gothel2013-08-28105-0/+0
| | | | | | | | | | | version dependent c-files individually and inject object files. ; ffmpeg *register_all() at setStream0(..) - Use 'dot less' dir/file names - Compile ffmpeg version dependent c-files individually and inject object files. - ffmpeg *register_all() at setStream0(..) - Only register devices if available _and_ camera is requested.
* Fix libav/ffmpeg compilation across platforms: Remove symbolic linksSven Gothel2013-08-2714-14/+0
|
* Fix libav/ffmpeg compilation across platforms: Move header back to ↵Sven Gothel2013-08-27119-0/+27966
| | | | 'stub_includes'
* libav/ffmpeg: Compile/Link 2 versions of native FFMPEGMediaPlayer methods ↵Sven Gothel2013-08-26100-27244/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FFMPEGNatives -> FFMPEGv08Natives + FFMPEGv09Natives Enables FFMPEGMediaPlayer to work w/ either ffmpeg/libav version 8 or 9 w/ same JOGL binary Same C source code is compiled against 1: version 0.8 FFMPEGv08Natives lavc53.lavf53.lavu51 2: version 0.9 FFMPEGv09Natives lavc54.lavf54.lavu52.lavr01 FFMPEGv08Natives and FFMPEGv09Natives implements FFMPEGNatives, native C code uses CPP '##' macro concatenation to produce unique function names. To enable 'cpp' to find the libav* header files matching the desired version, we have placed them in the c-file's folder, issued '#include "path/file.h" and added symbolic links to allow finding same module and 'sister modules': ls -l libavformat/ .. lrwxrwxrwx 1 sven sven 13 Aug 26 12:56 libavcodec -> ../libavcodec lrwxrwxrwx 1 sven sven 14 Aug 26 12:56 libavformat -> ../libavformat lrwxrwxrwx 1 sven sven 12 Aug 26 12:57 libavutil -> ../libavutil .. At static init FFMPEGDynamicLibraryBundleInfo, determines the runtime version and instantiates the matching FFMPEGNatives, or null if non matches. FFMPEGMediaPlayer still compares the compile-time and runtime versions. FFMPEGMediaPlayer passes it's own instance to FFMPEGNatives for callbacks.
* ffmpeg/libav: remove unsued header filesSven Gothel2013-08-261-416/+0
|
* ffmpeg/libav: lavc54.lavf54.lavu52 -> lavc54.lavf54.lavu52.lavr01: Adding ↵Sven Gothel2013-08-2653-0/+0
| | | | libavresample of version 9
* libav/ffmpeg: Move current lavc53.lavf53.lavu51 (version 8) header files to ↵Sven Gothel2013-08-25101-0/+14180
| | | | | | | | | | their sub-folders; Add lavc54.lavf54.lavu52 (version 9) header files lavc54.lavf54.lavu52: - Begin testing w/ version 9 - Header files are binary incompatible (data types) Default is still lavc53.lavf53.lavu51
* API doc: Add old glext-20130207.h header for complete extension association. ↵Sven Gothel2013-07-171-0/+13142
| | | | Fix GL* API doc header, align w/ spec-overview.
* Fix regressions of commit 3a0d7703da32e9a5ddf08a334f18588a78038d88: Avoid ↵Sven Gothel2013-07-154-4/+26
| | | | CPP redefinitions
* Add Support for GL 4.3 (Bug 716) and ES 3.0 (Bug 717)Sven Gothel2013-07-1529-14298/+15350
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Bug 714: Add GL_COPY_READ_BUFFER_BINDING and GL_COPY_WRITE_BUFFER_BINDING, ↵Sven Gothel2013-04-062-0/+4
| | | | which were added to spec post release.
* OSX CGL: Don't issue [NSOpenGLContext clearDrawable] for [NSOpenGLContext ↵Sven Gothel2013-03-181-0/+1
| | | | setView: view] which breaks pbuffer; Add [NSOpenGLContext clearDrawable].
* Add proper copyright header w/ all remarks regarding re-distribution etc, ↵Sven Gothel2013-02-171-15/+33
| | | | similar to other JNI headers
* Fix Bug 691 (part-3): NSOpenGLLayer::openGLContextForPixelFormat(..) on ↵Sven Gothel2013-02-161-0/+1
| | | | | | | | | | | | | | | | | | | | main-thread deadlock'ed due to locked shared context NSOpenGLLayer::openGLContextForPixelFormat(..) is performed on main-thread at 1st NSOpenGLLayer display method. This happened irregulary, i.e. sometimes (T0) right after NSOpenGLLayer creation and attachSurfaceLayer()/AddCASublayer(..), sometimes later (T1). NSOpenGLLayer::openGLContextForPixelFormat(..) uses the passed shared user context. The shared user context is locked at NSOpenGLLayer's creation (T0) and if performed at this early time the call deadlocks due to pthread_mutex wait for the shared user context. This fix performs NSOpenGLLayer creation and layer attachment while the shared user context is kept unlocked and enforces NSOpenGLLayer display and hence NSOpenGLLayer::openGLContextForPixelFormat(..). Added CGL.setNSOpenGLLayerEnabled(..) to enable/disable NSOpenGLLayer - currently not used. - Passed AddRemove tests for GLCanvas/Swing and GLWindow/NewtCanvasAWT w/ 100 loops on Java6 and Java7 on OSX. - Passed Instruments Leaks test w/ 10 loops on Java6 and Java7
* Bug632: Test NEWT Child Window Translucency (X11/Windows) ..Sven Gothel2012-12-301-1/+4
| | | | | | | | | | | | | - Windows: Child window is not translucent at all - X11: Child window is translucent to parent's background, however - parents content is _not_ 'composed in'. - TODO: Find whether there is a solution or not. - Note: The child window does not change it's rel. position if parent moves! This is a feature, since we don't have impl. a layout.
* MacOSXCGLContext[NSOpenGLLayer/NSView]: Propagate drawable changeSven Gothel2012-11-041-0/+1
| | | | | | | Propagate drawable change to MacOSXCGLContext where either context/NSView or context/NSOpenGLLayer association needs to get updated. Fixes drawable/context switch.
* Add OSX CALayer OpenGL 3 (core) support: Derive pixelformat from parent ↵Sven Gothel2012-10-311-3/+3
| | | | | | | | (GL3), use GL3.2 compatible shader; Use VBO in general. Covered by: Auto unit tests: TestOffscreenLayer01GLCanvasAWT, TestOffscreenLayer02NewtCanvasAWT Manual: TestGearsES2AWT '-gl3 -layered'
* Misc X11: Add GLX_MESA_swap_control; GLXExtensions (private); X11GLXContext ↵Sven Gothel2012-09-291-0/+10
| | | | commented out GLX_MESA_swap_control; native test of Mesa context-retarget bug, cannot reproduce yet.
* OSX CALayer / MacOSXCGLContext: Remove pbuffer swap garbage; Split ↵Sven Gothel2012-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | pbuffer/FBO revalidation/redraw; Don't sync @ needsDisplay Simplified pbuffer replacement: Simply keep holding the pbuffer reference in native code until receiving newPBuffer @ swap. The newPBuffer will be established @draw method. This allows removing interaction at destroy pbuffer, which caused garbage and crash. Remove pbuffer swap garbage See above. Split pbuffer/FBO revalidation/redraw Don't sync @ needsDisplay - No need to sync @ repaint command setNSOpenGLLayerNeedsDisplay* since we use volatiles and all lifecycle action is done @draw -> faster
* Fixes Bug 615 - X11: Use proper screen index/name for shared resources and ↵Sven Gothel2012-09-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | device denominated 'mutable' surfaces (dummy, offscreen, ..) Fix follows findings of Rob Hatcherson, but instead of parsing the display connection ourself we use the X11 macro 'DefaultScreen(display)' See <http://tronche.com/gui/x/xlib/display/opening.html#Display> "The screen number specified in the display_name argument is returned by the DefaultScreen() macro (or the XDefaultScreen() function)." Since I currently have no two-head X11 setup here, only xinerama via virtualbox, pls test / validate. Note: One Display connection may span multiple screens, i.e.: display 'lala:0.1' may span from screen 1 - 3 (non xinerama mode) Discussion: [1] How to validate whether a screen number belongs to one display connection ? We can query ScreenCount(display), however it is not clear what the range would be. [2] With 1 display connection spanning multiple screens, what is/are the proper connection string[s] ? [3] After all, it seems this ancient configuration really cannot beat a modern setup w/ XRandR having Xinerama enabled. The latter is the default anyways.
* OSX: Capture 'invalid drawable' message cause by ↵Sven Gothel2012-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | NSOpenGLContext::setView(NULL || incomplete-view) ; Add missing [ctx release] in MyNSOpenGLLayer ; Misc NSOpenGLContext::setView(NULL || incomplete-view) was called on 2 occasions: [1] - MacOSXCGLContext native createContext [2] - NSOpenGLLayer internals For [1], we simply don't call setView(..) ourselfs in case view is NULL or incomplete (invisible) For [2], we need to wrap the class 'MyNSOpenGLContext:NSOpenGLContext' and capture setView(NULL) ++ Add missing [ctx release] in MyNSOpenGLLayer, otherwise resource won't get dealloc'ed +++ Misc: - MacOSXCGLContext. contextRealized(true): set pbuffer -> ctx, otherwise 1st makeCurrent call will not catch it - MacOSXOnscreenCGLContext: don't add ContextUpdater to invisible ProxySurface's (dummy window)
* Seamless Integration of an FBObject based GLFBODrawable as ↵Sven Gothel2012-09-151-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLOffscreenAutoDrawable.FBO and as an OffscreenLayerSurface's drawable (OSX) - Fix Bugs 569 and 599 Summary: ========= The new FBObject based GLFBODrawable implementation allows the seamless utilization of FBO offscreen rendering in single buffer, double buffer and MSAA mode. The GLFBODrawable uses a parent drawable based on a dummy surface to allow a GLOffscreenAutoDrawable.FBO creation or a mutable surface supporting an existing offscreen layer surface (OSX CALayer). Offscreen GLDrawable's and GLOffscreenAutoDrawable's can be selected via the GLCapabilities. If simply !onscreen is selected in the caps instance w/o enabling FBO, PBuffer or Bitmap, the factory will automatically choose regarding availability: FBO > PBuffer > Bitmap Double buffering is supported in MSAA more (intrinsic) and explicit in non MSAA. It is preferred when delivering resources (texture id's or framebuffer names) to a shared GLContext. This is demonstrated in (emulates our OSX CALayer implementation): TestFBOOffThreadSharedContextMix2DemosES2NEWT, TestFBOOnThreadSharedContext1DemoES2NEWT and with the OSX JAWT OffscreenLayerSurface itself. FBO is the preferred choice. +++ Offscreen drawables can be resized while maintaining a bound GLContext (e.g. w/ GLAutoDrawable). Previously both, drawable and context, needed to be destroyed and recreated at offscreen resize. Common implementation in GLDrawableHelper is used in the implementations (NEWT's GLWindow, AWT GLCanvas, SWT GLCanvas). +++ Tested: ======= Manually run all unit tests on: - Linux x86_64 NVidia/AMD/Mesa3d(ES) - OSX x86_64 NVidia - Windows x86_64 NVidia - Android arm Mali-400/Tegra-2 No regressions. Disclaimer: =========== This feature is committed almost in one patch. Both previous commits were introducing / fixing the capabilities behavior: 90d45928186f2be99999461cfe45f76a783cc961 9036376b7806a5fc61590bf49404eb71830de92f I have to appologize for the huge size and impact (files and platforms) of this commit however, I could not find a better way to inject this feature in one sane piece. NativeWindow Details: ===================== Complete decoupling of platform impl. detail of surfaces implementing ProxySurface. Used to generalize dummy surfaces and EGL surfaces on top of a native platform surface. - ProxySurface.UpstreamSurfaceHook -> UpstreamSurfaceHook - abstract class ProxySurface -> interface ProxySurface + ProxySurfaceImpl - Misc. implementations JOGL Details: ===================== FBOObject: API Change / Simplification & Usability - Removed reference counter to remove complexity, allow user to choose. - Add 'dispose' flag for detachColorbuffer(..), allowing to keep attachment alive - Fix equals operation of Attachment - Check pre-exising GL errors - Interface Colobuffer gets lifecycle methods - Add static factory methods to create Attachments w/o FBObject instance - Reset: - Clip min size to 1 - Keep alive samplingSink, i.e. don't issue resetMSAATexture2DSink(..). It gets called at syncFramebuffer()/use(..) later on before actual usage. This allows the consumer to utilize the GL_FRONT buffer until (e.g.) swap. - misc bugfixes GLOffscreenAutoDrawable: API Change - Reloc and interfacing - class com.jogamp.opengl.OffscreenAutoDrawable -> javax.media.opengl.* interfaces GLOffscreenAutoDrawable extends GLAutoDrawable GLOffscreenAutoDrawable.FBO extends GLOffscreenAutoDrawable, GLFBODrawable - Added general implementation and FBO specialization - Replacing GLPBuffer (deprecated) .. usable for any offscreen GLDrawable via factory GLAutoDrawable: - Add 'GLDrawable getDelegatedDrawable()' - Refine documentation of setContext(..), remove disclaimer and fixme tags GLDrawableFactory: - Refine API doc and it's selection mechanism for offscreen. - Add createOffscreenDrawable(..) - Add createOffscreenAutoDrawable(..) - Add canCreateFBO(..) - Mark createGLPbuffer(..) deprectated Mark GLPBuffer deprecated New: GLFBODrawable extends GLDrawable GLCanvas (AWT and SWT): Add offscreen resize support w/o GLContext recreation GLAutoDrawableBase .. GLWindow: - Add offscreen resize support w/o GLContext recreation - Remove double swapBuffer call - GLBase/GLContext: - Add: - boolean hasBasicFBOSupport() - boolean hasFullFBOSupport() - int getMaxRenderbufferSamples() - boolean isTextureFormatBGRA8888Available() GLContext: Fix version detection and hasGLSL() - Version detection in setGLFunctionAvailability(..) - Query GL_VERSION ASAP and parse it and compare w/ given major/minor - Use parsed version if valid and lower than given _or_ given is invalid. - Use validated version for caching (procaddr, ..), version number, etc. - Fix hasGLSL() Since 'isGL2ES2()' is true if 'isGL2()' and the latter simply alows GL 1.*, we confine the result to a GL >= 2.0 on desktops. FIXME: May consider GL 1.5 w/ extensions. - return isGL2ES2(); + return isGLES2() || + isGL3() || + isGL2() && ctxMajorVersion>1 ; GLDrawableImpl: - Add 'associateContext(GLContext, boolean)' allowing impl. to have a (weak) reference list of bound context. This is was pulled up from the OSX specific drawable impl. - swapBuffersImpl() -> swapBuffersImpl(boolean doubleBuffered) and call it regardless of single buffering. This is required to propagate this event to impl. properly, i.e. FBODrawable requires a swap notification. - Clarify 'contextMadeCurrent(..)' protocol GLDrawableHelper: - Add resize and recreate offscreen drawable util method - Simplify required init/reshape calls for GLEventListener - GLGraphicsConfigurationUtil: - fixWinAttribBitsAndHwAccel: Reflect sharede context hw-accel bits - OSX has no offscreen bitmap, use pbuffer - use proper offscreen auto selection if offscreen and no modes are set EGL Context/Drawable/DrawableFactory: Abstract native platform code out of base classes - Use EGLWrappedSurface w/ UpstreamSurfaceHook to handle upstream (X11, WGL, ..) lifecycle - in case the EGL resource is hooked up on it. Invisible dummy surfaces: All platforms - size is now reduced to 64x64 and decoupled of actual generic mutable size - fix device lifecycle, no more leaks +++ OSX ==== Enable support for GLFBODrawableImpl in offscreen CALayer mode - NSOpenGLImpl: hooks to calayer native code - calayer code: - allows pbuffer and texures (FBO) - decouple size and draw calls avoiding flickering - enable auto resize of calayer tree MacOSXCGLContext: - NSOpenGLImpl: - Fix false pbuffer 'usage', validate the pointer - If !pbuffer, copy other window mode bits of caps - MacOSXCGLGraphicsConfiguration: - Only assume pbuffer if !onscreen - Remove reference of native pixelformat pointer Native code: - use 'respondsToSelector:' query before calling 'new' methods avoiding an error message where unsuported (prev. OSX versions) - if monitor refresh-rate is queried 0, set to default 60hz - add missing NSAutoreleasePool decoration +++ Android / NEWT: =============== Issue setVisible(..) w/o wait, i.e. queue on EDT, @Android surfaceChanged() callback. Otherwise we could deadlock: setVisible(..) -> EDT -> setVisibleImpl(..) -> 'GL-display'. the latter may may cause havoc while Android-EDT is blocked [until it's return].
* SWT Update: SWT GLCanvas creates lazy when resource is ready; Create new ↵Sven Gothel2012-07-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | NewtCanvasSWT allowing to parent NEWT windows natively. SWT GLCanvas creates lazy when resource is ready - Ensures drawable and context are created when size > zero and native visualID is valid. The latter is platform dependent. - Note that you cannot utilize custom GLCapabilities w/ this one, since the configurations is already realized - use NewtCanvasSWT. Create new NewtCanvasSWT allowing to parent NEWT windows natively: - Similar to NewtCanvasAWT - Allows attaching / detaching NEWT windows NewtCanvasAWT: Public setNEWTChild(..) fixed Added test cases for the above - tested on Linux, OSX and Windows w/ SWT Note: As usual for OSX, add -XstartOnFirstThread Details: - NEWT Display has new method: 'EDTUtil setEDTUtil(EDTUtil)' allowing to set a custom event dispatch utility. We use this to set our SWTEDTUtil for using NEWT w/ SWT complying w/ SWT threading constraints.
* Bug 599 - FBObject / Offscreen Support - Part 1Sven Gothel2012-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Completing swap-interval implementation for OSX's CALayer usage. Closing Bug 555Sven Gothel2012-04-221-1/+4
| | | | | | | | | | | | - Based on Andres Colubri's initiative and commit 218d67fc0222d7709b21c45792d44501351939c4. - Reading real screen refresh rate ('stolen' from NEWT) - Properly handling swap-interval and vsync-to in native code - Increasing accuracy vsync-to to microseconds Tested manually w/ TestGearsES2AWT.
* Adding libav (ffmpeg) header file, allowing upcoming dynamic linked ↵Sven Gothel2012-04-1648-0/+13480
| | | | | | | | | | | GLMediaPlayer impl. to be compiled (LGPL terms) Libav header: libavutil 51.22.1 libavformat 53.21.0 libavcodec 53.35.0 .. just to ease our compile time setup.
* Fix EGL/ES types GLeglImageOES, EGLImageKHR & EGLClientBuffer - and ↵Sven Gothel2012-04-095-11/+13
| | | | | | | | | | functions: eglCreateImageKHR, eglCreatePbufferFromClientBuffer Unique typedef for: EGLConfig, EGLContext, EGLDisplay, EGLSurface, EGLNativeDisplayType, EGLNativeWindowType, EGLNativePixmapType, EGLImageKHR, GLeglImageOES and EGLSyncKHR allowing to render them individually opaque (long) and keep EGLClientBuffer as NIO buffer.
* NativeWindow: Relax Xinerama dependency / Rename Windows impl subfolder to ↵Sven Gothel2012-02-271-3/+2
| | | | | | | common name win32 (same as stub_include) Utilizing dlopen/dlsym in an efficient way relaxes the platform requirement of having Xinerama available. This allows using Nokia N9 MeeGo out of the box.
* OpenGL EGL, ES1 and ES2 Header Sync incl. subsuming common extensions.Sven Gothel2012-02-155-192/+729
| | | | | | | | | | | | | | | | | | | | | - New EGL/ES headers from 2012-01-xx - Subsuming ES extensions to core, allowing aliasing of more enums/funcs to GL or GL2ES1/GL2ES2: GL_EXT_color_buffer_half_float GL_EXT_occlusion_query_boolean GL_EXT_robustness GL_ARB_robustness GL_EXT_separate_shader_objects GL_EXT_shadow_samplers GL_EXT_sRGB GL_EXT_texture_array GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_NV_draw_buffers GL_NV_fbo_color_attachments GL_EXT_packed_float GL_EXT_texture_storage
* OpenGL 4.2 functional support (GL header sync)Sven Gothel2012-02-143-34/+999
| | | | | | | | | Note: EXT_shader_image_load_store is dropped to favor ARB_shader_image_load_store Since no new (4.2) extension still does not require >= 3.1 all extensions are visible within the common profile GL2GL3. Please review!
* Dispatch the '5' GDI/WGL functions and allow using their 'wgl' variants. GDI ↵Sven Gothel2012-01-094-170/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | is the default. The following 5 GDI functions have their 'wgl' counterparts which 'shall' being used in case the OpenGL DLL is being loaded dynamically. (So reads the documentation & FAQ). This seems to be required only in case the std. opengl32.dll is not being used. This use case is called GDI/ICD. If using a non std. OpenGL DLL, is called MCD. We dynamically load the OpenGL DLL and fetch the address pointer. Since we generally use the std. opengl32.dll, our use of the GDI callbacks seems to be legal. However, to test using the 'wgl' method WGLUtil is introduced. You can test using the 'wgl' variants by defining the property: 'jogl.windows.useWGLVersionOf5WGLGDIFuncSet'. In case you have troubles, ie crashes within pixelformat setup etc, it might be interesting if this may impact your behavior. - ChoosePixelFormat(long, PIXELFORMATDESCRIPTOR) - DescribePixelFormat(long, int, int, PIXELFORMATDESCRIPTOR) - GetPixelFormat(long) - SetPixelFormat(long, int, PIXELFORMATDESCRIPTOR) - SwapBuffers(long)
* Move manual GDI utils to GDIUtil ; Minor cleanup.Sven Gothel2011-12-011-0/+2
| | | | | | RegisteredClassFactory: Reference the factories itself instead of the RegisteredClass. This enables the shutdown hook to clear the factories state, which is required for proper recreation.
* MacOSX: Expose CGL's CGLLockContext(..) and CGLUnlockContext(..) - to ↵Sven Gothel2011-11-291-0/+2
| | | | provide required locking in multithreading environment
* OS X Layered View: Part2 Java/Native MacOSXCGLContext / MacOSXPbufferCGLContextSven Gothel2011-11-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | Undo 368cbf4462d7f3635c1ef4497424c360b5ccc203: - "use SurfaceUpdateListener() to notify layer", simply use MacOSXCGLContext's swap impl. MacOSXCGLContext: - NSOpenGLImpl.create(): - issues createNSOpenGLLayer() using tex-size (maybe POT) as args - attaches the NSOpenGLLayer to the JAWT layered surface host - NSOpenGLImpl.setSwapInterval() propagates interval to our NSOpenGLLayer impl. - NSOpenGLImpl.swapBuffer() (layer case): - waits for v-sync if enabled (v-sync), or until native 'draw' is finished (tearing) using our pthread/ NSOpenGLLayer synchronization. The latter uses CADisplayLink or CVDisplayLinkRef for v-sync synchronization. - flushes our local ctx - triggers our NSOpenGLLayer to 'draw' - MacOSXPbufferCGLContext create() sets the texture size independently of pbuffer size (POT/NPOT)
* OS X Layered View: Use pbuffer method (pbuffer w/ dbl buffer)Sven Gothel2011-11-061-3/+4
| | | | | | | | | - attributes +NSOpenGLPFANoRecovery +NSOpenGLPFAAccelerated - use SurfaceUpdateListener() to notify layer - swapBufferImpl() adapt to 0038e2d41825c22bdd18a7b86a8229a3fab674a3 - pbuffer: don't enforce POT tex-size to surface size, but pbuffer only - FIXME: Check POT pbuffer/tex-size for X11/Win32/.. ! -
* OSX: CGL type cleanup ; layeredSurface impl.Sven Gothel2011-11-057-45/+61
| | | | | | | | | - Use proper OSX types for NS/CGL prototypes (gluegen) and impl. - Impl layeredSurface (native): - OSXUtil: NSView backing creation - OSXUtil: AttachJAWTSurfaceLayer - CGL: NSOpenGLLayer type impl. and hook
* MacOsX/JAWT_SurfaceLayers/CALayers: Kick off / JAWT_getAWT() CALAYER version ↵Sven Gothel2011-10-291-1/+19
| | | | support.
* OSX: Enable OpenGL profile support, ie OpenGL 3.2 -> GL3 for OSX >= 10.7Sven Gothel2011-10-261-1/+11
|
* Proper self containing NV Cg locationSven Gothel2011-10-229-8/+8
|
* Fix Solaris gcc args ; Cleanup dependencies and linker args; Adding JVM arch ↵Sven Gothel2011-10-181-32/+1
| | | | | | | | flags (-d32/-d64) ; glxext.h uses 'gl-64bit-types.h' Cleanup dependencies and linker args - JOGL/NEWT: remove Xxf86vm dependency - NativeWindow Solaris: Use std 'Xinerama' and 'xf86vmode'
* MacOSX: Fix shared ctx release [onMainThread]; Make GLContextShareSet ↵Sven Gothel2011-10-131-1/+1
| | | | | | | | | | | | | | | | | lifecycle deterministic; Remove warnings Fix shared ctx release [onMainThread] - Releasing the shared contexts caused a freeze of about 10s from one of the shared release operations. [NSOpenGLContext release] - Thorough triage concluded the workaround to release the shared ctx on the main thread. - Using enhanced GLContextShareSet, see below Make GLContextShareSet lifecycle deterministic - Programmatically control the lifecycle of tracked shared ctx allows us using 'hard' references. - Features queries for isShared() and ofc unregister a share set if all are destroyed. Remove warnings - MacOSXWindowSystemInterface.m used 'long', where 'GLint' was requested.
* JOGL/OSX: Properly utilize NSOpenGLContext update() via ContextUpdater, ↵Sven Gothel2011-10-131-0/+1
| | | | | | | | | | | | | | | which only holds the 'update' state now. Avoid calling updater() for every makeCurrent(), but if view's frame has changed only. This solves the pixel flickering experienced on OSX. - GLContextImpl:update() -> drawableUpdatedNotify() w/ comments - ContextUpdater holds context, view, old view frame and the update state. It doesn't issue NSOpenGLContext update() by itself, but allows querying and clearing the update flag. - MacOSXOnscreenCGLContext impl drawableUpdatedNotify() - register via ContextUpdater, and use it if available.
* NEWT/JOGL: MacOSX UpdateSven Gothel2011-09-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Feature related: - Added always-on-top - Added translucency - Child Window Position - AWT parent: manual traverse up the tree and calc position on screen (Problem: the parent view rect is not at the proper position, but covers the whole frame) EDTUtil related: - Works now w/ AWT ot headless (again) - OSX native JNI callbacks gathering JNIEnv properly and attaches/detaches thread. - AWT case: using AWT-Event which properly dispatches our cocoa events - MainThread (headless) case: Fork off thread w/ main class and kick off NSApp run(). This leads to same behavior as w/ AWT case. - Using DefaultEDTUtil - Cleanup MainThread (implements EDTUtil) - Currently not used as EDTUtil (osx), just as launcher - Removed EDTUtil impl code, reuse DefaultEDTUtil - Cleanup AWTEDTUtil (implements EDTUtil) - Currently not used as EDTUtil (osx)
* Complete translucency support for Win32 - tested w/ NEWTSven Gothel2011-09-043-0/+36
| | | | | | | https://jogamp.org/bugzilla/show_bug.cgi?id=517 - Adding some Windows DWM entries to GDI (manual) for translucency support - Add translucency setting in WindowsWGLGraphicsConfiguration*