aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
Commit message (Collapse)AuthorAgeFilesLines
...
* ImmModeSink: Add glColor3ub(), glColor4ub(); Add proper value conversion of ↵Sven Gothel2012-10-182-103/+174
| | | | imm. gl* functions; Default color padding is 1f; Make fields private.
* FixedFuncPipeline/Hook: Add glColor4ub() w/ value conversion, make ↵Sven Gothel2012-10-182-9/+24
| | | | glColor4f() more efficient, use pre-alloc NIO buffer
* Minor NEWT Display/Screen API docSven Gothel2012-10-171-2/+2
|
* Path2D: Reuse 'contains(..)' method, footprintSven Gothel2012-10-161-6/+1
|
* Merge remote-tracking branch 'hharrison/master'Sven Gothel2012-10-163-3/+8
|\
| * jogl: fix bad format string in PngChunkTIMEHarvey Harrison2012-10-151-1/+1
| | | | | | | | | | | | Missing format specifier for the first argument would lead to this throwing IllegalFormatException. Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: remove infinite loop in Path2D.contains(AABBox)Harvey Harrison2012-10-151-1/+6
| | | | | | | | | | | | | | | | | | It is impossible to use this method as it will get into an infinite loop as it just calls itself. Base the implementation on the contains method shortly before this method. As this method is impossible to actually use, it could also just be removed. Signed-off-by: Harvey Harrison <[email protected]>
| * jogl: fix bit shift error in LEDataInputStreamHarvey Harrison2012-10-151-1/+1
| | | | | | | | | | | | | | | | The readlong() method is attempting to build a 64bit value from two 32 bit reads. The problem is that shifting an int only uses the lower 5 bits of the shift value, so << 32 is the same as << 0. Cast to long and restore the original intention. Signed-off-by: Harvey Harrison <[email protected]>
* | ImmModeSink: Fix buffer grow (+1 element @ named buffer), enable DEBUG_* via ↵Sven Gothel2012-10-162-58/+81
|/ | | | properties, drawIndices QUAD w/ proper range and add uint; FixedFunctionHook: drawIndices QUAD w/ proper range and add uint
* FixedFuncColorTexture.fp: Remove unused local varSven Gothel2012-10-151-2/+0
|
* FixedFuncPipeline: Use ES2/GL2 prelude and set default precision. Shader ↵Sven Gothel2012-10-146-37/+49
| | | | code: Remove precision for default precision types.
* FixedFuncPipeline: Use resource efficient texture shader in AUTO mode as wellSven Gothel2012-10-141-2/+18
|
* FixedFuncPipeline: Optimize shader resource, if preset != ↵Sven Gothel2012-10-138-84/+214
| | | | ShaderSelectionMode.AUTO (good for mobile); Lazy shader instantiation.
* FBO ResetQuirk: Dump only brief information (OS, GL, JOGL sha1), the latter ↵Sven Gothel2012-10-132-5/+28
| | | | becomes public method to JoglVersion
* Fix Windows ANGLE Workaround Regression of commit ↵Sven Gothel2012-10-135-62/+66
| | | | | | | | | | | | | | | | 923d9dd7f1d40db72d35ca76a761ca14babf147f We are aware that Google's ANGLE (Windows EGL/ES2 impl. based on D3D) crashes using eglInitialize(..) w/ EGL_DEFAULT_DISPLAY. Commit 923d9dd7f1d40db72d35ca76a761ca14babf147f moved the EGL device initialization into the EGLDrawableFactory ctor and hence slipped out ANGLE workaround to disable it per default. - Moving property static flags from GLProfile -> GLDrawableFactory - Moving ANGLE workaround right into EGLDrawableFactory (where it belongs) - Moving optional EGL/ES disable code to GLDrawableFactory (where it belongs) Tested on Windows w/ Java-32bit and latest Chrome ANGLE DLLs
* GLCanvas: Avoid NPE in debug mode @ reshape (duh)Sven Gothel2012-10-121-1/+3
|
* FixedFuncHook: Add ES2 alignment of certain GL functions, i.e. ↵Sven Gothel2012-10-122-5/+52
| | | | GL_QUAD_STRIP/GL_POLYGON/GL_QUADS mapping, glTexImage2D internalformat/format match.
* GLArrayDataClient.bindBuffer(gl, bind=true): checkSeal and init_vbo if ↵Sven Gothel2012-10-121-0/+5
| | | | required (similar sanity checks as enableBuffer())
* GLArrayData* VBO binding: Properly document and impl. bindBuffer(..) in ↵Sven Gothel2012-10-1211-120/+175
| | | | | | | | | detail w/ data sync within GLArrayHandle, which also removed redundant code (VBO data sync and binding). Refines commit 8582ece7dc7f65271b3184261697a542766d9864 and f49f8e22953ed2426fd4264ee407e2dc3fc07cfc
* Enhance FixedFuncPipeline: Multi-Texture, Tex-Env, Alpha-Test, Lighting ↵Sven Gothel2012-10-1214-311/+957
| | | | | | | | | (fix, incomplete still), ShaderSelectionMode, Fix default values Besides the above mentioned additional features towards completness of the FFP emu, the ShaderSelectionMode allows fixating a shader program configuration, i.e. AUTO switch (default) or choosing a static shader program to avoid heavy program switches incl. uniform/attribute updates.
* ShaderState: Clean-up debug / verbose output. attachShaderProgram(..) still ↵Sven Gothel2012-10-121-41/+70
| | | | | | | issues UseProgram is enable==true, but no program switch. More versatile toString(StringBuilder sb, boolean alsoUnlocated), by default don't dump uniforms/attributes w/o valid location.
* GLArrayData* VBO binding: Adding explicit bindBuffer(..) method, since VBO ↵Sven Gothel2012-10-124-8/+35
| | | | | | | | | is not more bound after enableBuffer(); Fix unit test (test VBO bound). Explicit bindBuffer(..) is required now, since enableBuffer() doesn't leave it bound. See fixed VBORegion* patch for use case, i.e. using a VBO index buffer for glDrawElements(). Complets commit 8582ece7dc7f65271b3184261697a542766d9864.
* Simplify GLArrayHandler and reduce VBO sideffectsSven Gothel2012-10-1010-118/+77
| | | | | | | | | | VBO: Always unbind VBO ASAP after data transfer (glBufferData()) and assignment (glVertexPointer(..), glVertexAttribPointer()). It's a bug to leave it bound .. due to redundancy and other calls which could have change the VBO binding. Removed syncData(..), now it's only issued at enable and hence migrated into the enable method.
* GLUniformData.toString() matrix: Add matrix offset ..Sven Gothel2012-10-101-1/+1
|
* GLUniformData: add null format string to Buffers.toString()Sven Gothel2012-10-101-1/+1
|
* ImmModeSink: Fix bugs (use glBufferUsage, vboUsage, GL_POLYGON, GL_QUADS) ↵Sven Gothel2012-10-103-254/+431
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and add API docs. (API Change) - Changed create*(..) factory methods (API Change) - Drop passing GL instance, not needed - allows creation of ImmModeSink as final field w/o GL context - Use 'glBufferUsage' to determine whether to use VBO or not ( 0 == glBufferUsage ) - Use glBufferUsage in glBufferData(..) call (oops) - Toggle vboUsage per object ( 0 == glBufferUsage ? nonVBO : VBO ) remove static VBO usage flag - Fix render mode - GL_POLYGON -> GL_TRIANGLE_FAN (not GL_LINES) - GL_QUADS -> Looped GL_TRIANGLE_FAN (is !GL2) in draw(..) w/ and w/o indices - Buffer usage - documented - allow creating sink w/ all components (vertices, color, normal and texCoords) bit render and grow only used parts. This allows proper usage of sink where it is not known which types are being used. - Added test case - Manually tested w/ Jake2 ES1 Jake2 uses the FFP immediate mode rendering, where we utilize this sink w/o rendering artifacts.
* GLBuffers.slice: Preserve parent buffer position/limit and the parent's ↵Sven Gothel2012-10-101-8/+19
| | | | byte-order for sliced result
* FloatUtil/PMVMatrix/GLUniformData: Move impl. of FloatBuffer matrix ↵Sven Gothel2012-10-103-60/+113
| | | | toString(..) from PMVMatrix to FloatUtil and make it more generic; GLUniformData toString() also dumps it's matrices.
* Refine GLDrawable.swapBuffer() fix (AWT/SWT GLCanvas and GLAutoDrawableBase) ↵Sven Gothel2012-10-083-3/+9
| | | | | | of commit 455fed40391afe10ce5ffb9146ca325af63b0a49 Add drawable null check before using.
* Fix GLDrawable.swapBuffer() implementation in AWT/SWT GLCanvas and ↵Sven Gothel2012-10-083-36/+13
| | | | | | GLAutoDrawableBase Simply lock drawable and issue drawable.swapBuffers(), no need to make context current.
* Fix Bug 617 (part2): Workaround buggy GPU driver where FBO reattachment of ↵Sven Gothel2012-10-062-23/+47
| | | | | | | | | | | | | | | | | | | Colorbuffer w/ diff size leads to GL_FRAMEBUFFER_UNSUPPORTED. This occured at least on: - OS X 10.6.8 - GL_RENDERER NVIDIA GeForce 7300 GT OpenGL Engine - GL_VERSION 2.1 NVIDIA-1.6.36 Remedy is to catch the exception @ GLFBODrawableImpl.reset(..) and switch over to fallback 'reset' method: FBO reattachment -> FBO complete recreation Of course, the FBO recreation is noticable slower, but at least it seems to work on the offending system. Not tested on the offending system, but manually provoked GLException on FBOObject to trigger fallback, which is working here.
* Refine a3cb6bb14f410f67fccf5ccd4cd7ecc66f448389, fix deadlock (regression)Sven Gothel2012-10-051-19/+27
| | | | | | | | The lock being claimed at validateGLDrawable() is 'offthread', i.e. may fight w/ AWT / Animator at reshape/display. Locking is moved 'down' to AWT runnable 'setRealizedOnEDTAction', which also double checks the drawable [again].
* EGL/X11 DummySurfaceHook: Lock display device at creation/destructionSven Gothel2012-10-051-11/+21
|
* Refine ed7d5f2e3fc696d47b10c8d62a071643bf385588, set and restore FBO caps @ ↵Sven Gothel2012-10-052-8/+15
| | | | | | | setRealized(true/false) already, refine at initialize(true) Allowing to validate the on-/offscreen state after setRealized(true). Adding comment in GLFBODrawable.
* FBO/Offscreen: Use most simple GLCapabilities for GLFBODrawableImpl's ↵Sven Gothel2012-10-053-26/+36
| | | | | | | | | | | | | | | | | underlying dummy surface/drawable If stencil or MSAA has been selected, the underlying dummy drawable doesn't need to have this configuration, i.e. doesn't need to waste the resources. - Creation of the dummy surface/drawable uses a simple GLCapabilities - Requested FBO GLCapabilities is being passes down to the dummy drawable - GLFBODrawableImpl ctor leaves caps untouched - GLFBODrawableImpl.initialize(boolean realize) - realize == true: using the requested FBO caps and setting it in the parent dummy drawable - realize == false: restore the original caps of dummy drawable
* Fix FBObject DEPTH_STENCIL renderbuffer usageSven Gothel2012-10-051-38/+46
| | | | | | If DEPTH_STENCIL was selected, recreate destroyed the common buffer when stencil was being 'reset'. To unify and simplify code, if DEPTH_STENCIL stencil == depth reference.
* Use helper.isExternalAnimatorAnimating() instead of ↵Sven Gothel2012-10-052-3/+3
| | | | helper.isAnimatorAnimating() for decision whether to display() now; Minor API comments.
* Fix Bug 572 (2nd time): GLCanvas.validateGLDrawable() @ display() and ↵Sven Gothel2012-10-053-33/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | reshape() ; GLCanvas.reshape() only if drawble valid ; GLCanvas.validateGLDrawable() also test isDisplayable() ; Fix size validation ; resizeOffscreenDrawable(..) don't validate 'safe' size 1x1 - GLCanvas.validateGLDrawable() @ display() and reshape() To help users using GLCanvas w/ having a realized GLCanvas/Drawable, validateGLDrawable() is also called at reshape(). This shall ensure a valid drawable after even a non AWT-EDT issued first setVisible(). - GLCanvas.reshape() only if drawble valid Otherwise offscreen reshape attempts would happen even on unrealized drawable, which is not necessary. - GLCanvas.validateGLDrawable() also test isDisplayable() To make sure the native peer is valid, also test isDisplayable() - Fix size validation Since we have experienced odd size like 0 x -41 test each component, i.e. 0 < width && 0 < height. This is done through all JOGL/NEWT components. - resizeOffscreenDrawable(..) don't validate 'safe' size 1x1 In case method is called w/ odd size, i.e. 0 x -41, the safe size 1x1 is used. However, we cannot validate this size. Dump WARNING if odd size is detected.
* OSX Context: Fix caps determination for on-/offscreen since pformat's ↵Sven Gothel2012-10-041-22/+14
| | | | NSOpenGLPFAPixelBuffer is ambiguous
* Fix regression of commit a644d779ab19cb1d200ae4ba567b9c042c34b337, cannot ↵Sven Gothel2012-10-042-7/+10
| | | | | | compile FixedFuncHook due to removed 'isDirty()' - getModifiedBits() -> getModifiedBits(boolean clear)
* FixedFuncPipeline: Cleanup warnings ..Sven Gothel2012-10-041-7/+7
|
* ShaderState: Adding Class API doc and removing attached object w/ 'int' key, ↵Sven Gothel2012-10-041-22/+12
| | | | similar to GLContext change 6d241fc2a46413ee478985d676d2481c5a7ed119
* Update PMVMatrix/GLMatrixFunc API doc and refine PMVMatrix update / ↵Sven Gothel2012-10-043-265/+719
| | | | | | | | | | | | | | | | | | | | | | get-Mvi/Mvit-Matrix operation. (Minor API change) Using bitmask for requested Mvi and Mvit matrices, same as dirty-bits to ease matching and update operation. Update of Mvi and Mvit will be performed only if it's dirty-bit and request-bit set within update(). The individual dirty bit is cleared only if it's matrix update is performed. Update is also issued at get-Mvi/Mvit-Matrix operations to ensure proper values w/o update call w/o clearing the modified-bits. update() returns true if the Mvi or Mvit matrix got updated _or_ one of the modified bits is set. update() clears the modified-bits. Adding explicit getModifiedBits() to get and clear it's state. Adding unit test. Lots of API docs ..
* Fix regression of fbe331f013608eb31ff0d8675f4e4c9881c9c48b [Remove ↵Sven Gothel2012-10-021-12/+2
| | | | | | | | | XInitThreads()] NativeWindowFactory.getDefaultToolkitLock() is no more a global singleton, but an instance which has to track/lock a single resource. Hence the decoration w/ it in GLDrawableFactory is useless and applying lock/unlock on a new instance also a bug/regression.
* NativeWindowFactory: Remove 'remedy' of Bug 613 Commit ↵Sven Gothel2012-10-021-16/+4
| | | | | | 92398025abdabb2fdef0d78edd41e730991a6f94 GlobalToolkitLock for create/destroy Turns out on it has no effect and ATI prop. driver still has XCB failures at this point.
* Misc: Add commented-out NEWT X11/XCB-Event and X11ScreenRandR1[13] ↵Sven Gothel2012-10-021-1/+1
| | | | | | | | | | compilation ; ... Adding [dead] native source files for NEWT/X11: - X11Event and XCBEvent - X11ScreenRandR11 X11ScreenRandR13 They are currently excluded from compilation, however I like do version them for later use.
* GLRendererQuirks.NoDoubleBufferedPBuffer: Set if ( mesa || gallium ) && hwAccelSven Gothel2012-10-022-5/+14
|
* FBObject/GLFBODrawable: Debug / glError detectionSven Gothel2012-10-022-12/+21
| | | | | | | - Enh. Debug output a bit - FBObject: Detect glError @ syncFramebuffer MSAA blit, throw GLException if glError to fail-fast - TODO: May add Mesa NoFBOMSAA Quirk to disable even trying it ..
* Relax Bug 613 workaround of commit 92398025abdabb2fdef0d78edd41e730991a6f94Sven Gothel2012-10-027-50/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | Utilizing a GlobalToolkitLock in general to lock the display connection results in deadlock situations where locked surfaces signal other [offscreen] surfaces to render. We have to see whether we find a better solution, for now sporadic XCB assertion still happen. But it is preferrable to point to the root cause, then to jumping through hoops to complicate locking or even to deadlock. Locking: - X11GLXGraphicsConfigurationFactory add missing device locking in: - getAvailableCapabilities - chooseGraphicsConfigurationStatic - Newt/X11Window: Discard display events after window close. Relax ATI XCB/threading bug workaround: - ToolkitProperties: requiresGlobalToolkitLock() -> hasThreadingIssues() - NativeWindowFactory: Don't use GlobalToolkitLock in case of 'threadingIssues' the impact is too severe (see above) - NativeWindowFactory: Add getGlobalToolkitLockIfRequired(): To be used for small code blocks. If having 'threadingIssues' a GlobalToolkitLock is returned, otherwise NullToolkitLock. - X11GLXContext: [create/destroy]ContextARBImpl: Use 'NativeWindowFactory.getGlobalToolkitLockIfRequired()' for extra locking Misc Cleanup: - *DrawableFactory createMutableSurface: Also create new device if type is not suitable - *DrawableFactory createDummySurfaceImpl: Pass chosenCaps and use it (preserves orig. requested user caps)
* Workaround for Bug 623: Sporadic XCB assertion failures w/ ATI proprietary ↵Sven Gothel2012-09-301-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver and w/o native X11 locking The proprietary ATI X11 driver does not handle multi-threaded [GL] clients well, i.e. triggers an XCB assertion 'from time to time'. It almost seems like that the driver either: - aliases all display connections to it's connection name, i.e. server; or - utilizes a build-in display connection w/o locking, used for some reason +++ - X11Lib: Add QueryExtension(dpy, name) allowing early driver determination w/o GL - X11Util detects 'requiresGlobalToolkitLock' and 'markAllDisplaysUnclosable' via X11 extensions. In case certain ATI extensions are available, both are set to true. - X11GLXDrawableFactory: Dropped setting 'markAllDisplaysUnclosable', using X11Util's detection (see above). - New GlobalToolkitLock to satisfy certain driver restrictions (ATI's XCB multithreading bug) - NativeWindowFactory handles new property requiresGlobalToolkitLock, in which case the new GlobalToolkitLock is being used instead of ResourceToolkitLock. - JAWTUtil ToolkitLock locks GlobalToolkitLock 1st to match new 'requiresGlobalToolkitLock' property. - Document static method requirement of X11Util, GDIUtil and OSXUtil via marker interface ToolkitProperties - ToolkitLock: New method 'validateLocked()', allowing use to validate whether the device/toolkit is properly locked and hence to detect implementation bugs. See unit test class: ValidateLockListener