summaryrefslogtreecommitdiffstats
path: root/src
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-173-8/+10
|
* 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
* Adding unit tests for ImmModeSink and FixedFunctionPipeline (single & ↵Sven Gothel2012-10-1210-258/+669
| | | | combinations, plus texture usage)
* 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-125-12/+39
| | | | | | | | | 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
|
* TestSWTAccessor03AWTGLn: Add '-time <duration>' commandline optionSven Gothel2012-10-101-1/+7
|
* ImmModeSink: Fix bugs (use glBufferUsage, vboUsage, GL_POLYGON, GL_QUADS) ↵Sven Gothel2012-10-107-267/+799
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* UITestCase: Only print each display/reshape in verbose modeSven Gothel2012-10-101-2/+10
|
* FloatUtil/PMVMatrix/GLUniformData: Move impl. of FloatBuffer matrix ↵Sven Gothel2012-10-104-64/+181
| | | | toString(..) from PMVMatrix to FloatUtil and make it more generic; GLUniformData toString() also dumps it's matrices.
* TestInitConcurrent0[12]NEWT: Reduce test w/ 16 threads to 6 for ARM || ↵Sven Gothel2012-10-092-6/+18
| | | | | | | | | | | WINDOWS if not started from console Sadly it appears that w/ the ATI Catalyst driver, the TestInitConcurrent02NEWT w/ 16 concurrent threads brings down the JVM sometimes. This results in a locked singleton thread and distrubs the whole unit tests session. We are aware of the ATI Catalyst threading bug on Windows and Linux.
* NEWT X11/KeyMap: Add XK_grave -> J_VK_BACK_QUOTESven Gothel2012-10-091-0/+2
|
* 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.
* Raise NEWT MouseButton Maximum from 6 -> 16 (API Change)Sven Gothel2012-10-084-25/+43
| | | | | | | | - Button 9 has been reported to be sent by Olamedia - Rearrange the input bit mask in InputEvent (API Change) - Raise the max. button number to 16
* 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.
* Adding unit test for Bug 605 - WORKSFORME, i.e. no unwanted y-flip, so I can ↵Sven Gothel2012-10-063-27/+393
| | | | just assume it's the SW renderer, flipping.
* 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-052-25/+45
|
* Refine ed7d5f2e3fc696d47b10c8d62a071643bf385588, set and restore FBO caps @ ↵Sven Gothel2012-10-053-28/+48
| | | | | | | 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-054-29/+40
| | | | | | | | | | | | | | | | | 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.
* UITestCase.snapshot: Add Depth and Stencil bits to filenameSven Gothel2012-10-051-2/+4
|
* Use helper.isExternalAnimatorAnimating() instead of ↵Sven Gothel2012-10-053-3/+4
| | | | helper.isAnimatorAnimating() for decision whether to display() now; Minor API comments.
* Fix Bug 572 (2nd time): GLCanvas.validateGLDrawable() @ display() and ↵Sven Gothel2012-10-058-43/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix regression of commit fbe331f013608eb31ff0d8675f4e4c9881c9c48b: X11 ↵Sven Gothel2012-10-051-1/+5
| | | | | | DisplayDriver dispatchMessagesNative() aDevice NPE at finally The aDevice could be pulled via destroy message, hence add check if null.
* Fix SWTEDTUtil bug, where it simply doesn't start by an implicit 'invoke()' ↵Sven Gothel2012-10-052-2/+15
| | | | | | | | | | | | | - No NewtCanvasSWT resize, nor input event delivery. A new EDTUtil instance is not started automatically. Since SWTEDTUtil is attached to the DisplayImpl later in time, i.e. after it's native creation, there is no EDTUtil.invoke(..) call which started it. The not started SWTEDTUtil could not deliver any events. Fix: Start it explicitly - add API doc comment in Display.setEDTUtil(..)
* 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-043-12/+15
| | | | | | compile FixedFuncHook due to removed 'isDirty()' - getModifiedBits() -> getModifiedBits(boolean clear)