aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph
Commit message (Collapse)AuthorAgeFilesLines
* More shader fixes for core (GLSL 150): texture2D -> texture, texture3D is ↵Sven Gothel2013-07-172-0/+2
| | | | deprecated in 130 and removed in 150.
* Adapt to GlueGen commit 1a01dce6c42b398cdd68d405828774a3ab366456Sven Gothel2013-06-111-1/+1
|
* Fix regression of commit b2802021acf8aa9b363ebef383c8dc8c8079ffa4 (Bug 711): ↵Sven Gothel2013-05-187-8/+9
| | | | | | | | | | varying in/out mapping is different in vertex/fragment shader! Vertex shader: varying -> out Fragemnt shader: varying -> in NV GLSL compiler ignored in/out direction, where ATI GLSL compiler failed (could not find gcu_Weight, due to dead code).
* Fix Bug 711: Align Graphs's Curve Shader programmatically to used GL/GLSL ↵Sven Gothel2013-05-1721-193/+75
| | | | version, following all other internal GLSL usage utilizing ShaderCode.
* jogl: remove executable bit from some java files and a pngHarvey Harrison2013-04-092-0/+0
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Reorganize math code into: com.jogamp.opengl.math and ↵Sven Gothel2012-11-1111-17/+14
| | | | | | | | | | | | | | | | | | | | | | | com.jogamp.opengl.math.geom packages Note: WIP - We may relocate / reorg math package. Public relocations: com.jogamp.opengl.util -> com.jogamp.opengl.math - FixedPoint - FloatUtil com.jogamp.graph.math -> com.jogamp.opengl.math - Quaternion - VectorUtil com.jogamp.graph.geom -> com.jogamp.opengl.math.geom - AABBox VectorUtil: Introducing Vert2fImmutable and Vert3fImmutable interfaces, allowing graph Vertex instances to be used 'graph' agnostic and to document 2d/3d use-cases.
* Merge MathFloat into FloatUtilSven Gothel2012-11-113-62/+18
|
* *FontLoader: Order fields in init-order, make private.Sven Gothel2012-10-312-11/+11
|
* ShaderProgram: Program name is valid if non zero; Add init(GL) return value ↵Sven Gothel2012-10-312-2/+6
| | | | for success.
* Graph Shader: Using default precision values (VP: highp, FP: mediump), ↵Sven Gothel2012-10-296-9/+9
| | | | except for sampler2D (mediump instead of lowp)
* Path2D: Reuse 'contains(..)' method, footprintSven Gothel2012-10-161-6/+1
|
* 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]>
* GLArrayData* VBO binding: Properly document and impl. bindBuffer(..) in ↵Sven Gothel2012-10-122-17/+11
| | | | | | | | | detail w/ data sync within GLArrayHandle, which also removed redundant code (VBO data sync and binding). Refines commit 8582ece7dc7f65271b3184261697a542766d9864 and f49f8e22953ed2426fd4264ee407e2dc3fc07cfc
* GLArrayData* VBO binding: Adding explicit bindBuffer(..) method, since VBO ↵Sven Gothel2012-10-122-4/+10
| | | | | | | | | 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.
* Bug 599 - FBObject / Offscreen Support - Part 1Sven Gothel2012-07-191-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Adapt to GlueGen commit 1468286bf569a493e4fdb887d5f3732f88c8cec3 ↵Sven Gothel2012-06-161-1/+1
| | | | (IOUtil.createTempFile(..) change)
* Java Source Files: dos -> unix formatSven Gothel2012-05-154-434/+434
|
* graph/font: Add "public float getAdvanceWidth(int i, float pixelSize);"Sven Gothel2012-05-152-1/+6
| | | | | Font::getAdvancedWidth(..) allows applications to query a glyphs width with a given pixel size, as it is being used for rendering.
* Graph/Glyph: Clarify public Font.Glyph and private FontInt.GlyphIntSven Gothel2012-05-153-11/+7
|
* API Change ShaderCode/ShaderUtil: Enable optional mutable shader source / ↵Sven Gothel2012-04-162-8/+8
| | | | | | | | | | | | | | | | | | | | | | generalize shader source storage type to CharSequence[] Benefits: - Allows code injection and general shader source editing (before compilation) - Uses mutable StringBuilder only if editing is intended, hence reduces memory footprint and String conversion at compilation in such case. - ShaderCode.create(..) factory methods add nw attribute 'mutableStringBuilder' if true method returns a mutable StringBuilder instance which can be edited later on at the costs of a String conversion when passing to 'glShaderSource(int, int, String[], IntBuffer)'. If <code>false</code> method returns an immutable <code>String</code> instance, which can be passed to {@link GL2ES2#glShaderSource(int, int, String[], IntBuffer)} at no additional costs. - New 'edit' methods in ShaderCode: ' - int insertShaderSource(int shaderIdx, String tag, int fromIndex, CharSequence data); - int insertShaderSource(int shaderIdx, int position, CharSequence data);
* StringBuffer -> StringBuilder (Local objects, no concurrency) ; Impacts: ↵Sven Gothel2012-04-1637-53/+53
| | | | Capabilities/GLContext API 'toString(StringBuilder)'
* GLArrayData: Fix 'growBuffer()' / clarify 'initialSize' -> 'initialElementCount'Sven Gothel2012-04-112-11/+11
| | | | | - growBuffer() was using '(osize+additional) * components' -> 'osize + (additional * components )' - added jogl.debug.GLArrayData - notifying growBuffer()
* Adapt to GlueGen IO resource changes URL -> URLConnection for effeciency; ↵Sven Gothel2012-03-173-10/+10
| | | | | | | | | | API doc enhancements; Minor edits - API doc added/enhanced: - ShaderCode - ShaderUtil - NewtBaseActivity: Clarify method / var names
* Adapt to gluegen Properties/Security commits ↵Sven Gothel2012-03-131-1/+1
| | | | f4ac27e177f6deb444280d3b375e7d343e38bd080 and eedb4b530fb83fc59a26962bcf7847a1404092a0
* Min. Graph Parameter type change: texSize/width/.. for multipass-renderer: ↵Sven Gothel2012-02-255-18/+28
| | | | | | | | | | int -> int[] "texWidth desired texture width for multipass-rendering. The actual used texture-width is written back when mp rendering is enabled, otherwise the store is untouched." This allows the 'backend' to correct the texSize, ie in regards to GL_MAX_TEXTURE_SIZE .. etc. Without this write-back, it would re-create the FBO for every frame.
* Fix VBORegion2PES2: Don't exceed MAQX_TEXTURE_SIZESven Gothel2012-02-221-0/+8
|
* FontSet (graph): get*(..) throws IOException - Proper passing and handling ↵Sven Gothel2012-02-224-17/+22
| | | | of IOException
* Fix commit fb7165e690546359dee92dd60b04be69f141c87e; Clarify ↵Sven Gothel2012-02-202-2/+2
| | | | ShaderState.attachShaderProgram(..)
* javac - setup encoding to UTF-8Sven Gothel2012-01-231-3/+3
|
* minor editSven Gothel2011-11-091-1/+1
|
* Graph Shader Simplification, 'a'/'b' redefined; GraphUI 2-pass demo;Sven Gothel2011-10-0411-115/+185
| | | | | | | | | | | | | | | | | | | | | | | Graph Shader Simplification - remove enable factor and 2nd 'discard' branch - use build-in 'max'/'clamp' functions, supposed to be faster Graph Shader 'a'/'b' redefined - 'a' is 1-pass shader only - 'b' is 2-pass incl. (1st pass + 2nd pass) - Works well on ARM Mali-400 MP (Galaxy S2). - Doesn't work on NV tegra2 (P1202: Texture's gl states do not match with shader's), however 2-pass on mobile seems to be overkill for now. We may create a workaround (switch shader ..). GraphUI 2-pass demo; - Propagate renderModes and texSize to UIShape's render(..) - TODO: Remove GL dependency in UIShape, maybe use a callback or visitor model - Adding GarpUI 2-pass launcher (Android and Standalone)
* tegra: refine disabled discard, ie keep logic/math intact. Rami ?Sven Gothel2011-10-021-6/+6
|
* Graph: Reflect shader name change in impl. TODO: Use/switch to 2nd pass shaderSven Gothel2011-10-021-1/+5
|
* Fixed shader entry files a/bRami Santina2011-10-026-2/+21
|
* Fix intendationRami Santina2011-10-021-34/+34
|
* tegra2: split fragment shaders into two (a - 1st pass, b - 2nd pass) ; ↵Rami Santina2011-10-0211-67/+72
| | | | | | | | | | | | disabled discard - 1st pass (a) and 2nd pass (b), split at branch. - all include are on one level. - disabled discard, as it seems to be problematic Todo: - verify discard / pass-split on tegra2 - refect second pass usage (b) in implementation
* Added allin one shader stripped for graph.Rami Santina2011-10-022-0/+70
| | | | | tegra2 hunting, single pass, no discard, lowp, and removed uneeded variables
* Graph GLSL: Use global precicision settings enhancing readabilitySven Gothel2011-09-307-60/+54
|
* TypecastFontConstructor: Use IOUtil's createTempFile() to comfort AndroidSven Gothel2011-09-281-4/+2
|
* Fix ES2 shadersSven Gothel2011-09-284-4/+6
| | | | | | | | | | | Add missing floating point precision qualifiers. '#extension OES_standard_derivatives : require' somehow doesn't pass the GLSL compiler, however '#extension GL_OES_standard_derivatives : enable' does. Currently works on ARM's Mali-400 MP, NV Tegra still don't show a picture. TODO: More in depth evaluation.
* Graph Fonts: Decorate w/ PrivilegedAction if requiredSven Gothel2011-09-152-13/+33
|
* GLSL DataArray/Handler: Remove ShaderState state and pass it through: ↵Sven Gothel2011-08-303-17/+12
| | | | | | | | | ShaderState.getShaderState(gl) This removes the dependency of a GLSL GLDataArray object to a specific ShaderState and enables sharing of this VBO data, i.e. via a shared context. Test: TestSharedContextVBOES2NEWT
* Misc Rename/Reloc; GLArrayData*/PMVMatrix enhancments; Test fixes/adds ↵Sven Gothel2011-08-222-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* Enclose file IO access in priviledged blockSven Gothel2011-08-111-11/+24
|
* graph es2 glsl: #extension OES_standard_derivatives : requireSven Gothel2011-07-312-0/+6
|
* TAB -> SPACESven Gothel2011-07-311-2/+2
|
* Graph Shader: def. GRAPHP to easily change precision, set to mediump; Add ↵Sven Gothel2011-07-316-66/+64
| | | | precision for all vars.
* added (c) headerSven Gothel2011-07-281-0/+27
|
* Handle curved triangles overlaps.Rami Santina2011-06-201-221/+220
| | | | | | | | | | subdivde overlaping triangles for the case when 2 triangles intersect either by vextex of Traingle A in Triangle B or an edge in A intersects an edge in B VectorUtil: -added tri2triIntersection test (not optimized) -added seg2segIntersection test (not optimized)
* Merge remote-tracking branch 'remotes/rsantina/master'Sven Gothel2011-06-115-36/+38
|\