aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/curve/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Graph Shader: Using default precision values (VP: highp, FP: mediump), ↵Sven Gothel2012-10-296-9/+9
| | | | except for sampler2D (mediump instead of lowp)
* 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
* Java Source Files: dos -> unix formatSven Gothel2012-05-152-167/+167
|
* 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);
* 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()
* Min. Graph Parameter type change: texSize/width/.. for multipass-renderer: ↵Sven Gothel2012-02-254-15/+18
| | | | | | | | | | 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
|
* Fix commit fb7165e690546359dee92dd60b04be69f141c87e; Clarify ↵Sven Gothel2012-02-202-2/+2
| | | | ShaderState.attachShaderProgram(..)
* 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
|
* 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.
* 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
* 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
|
* Graph: Remove unused importsRami Santina2011-06-051-1/+0
|
* Graph: updated inclass documentationsRami Santina2011-06-054-34/+38
|
* Add Factory for triangulation with base Interface; misc cleanupRami Santina2011-06-051-3/+3
| | | | | | | | | CDTriangulation moved to impl (jogamp.graph), where additional triangulations or a wrapper to GLU triangulation can be added to triangulator. TWO_PASS_RENDERING renamed to VBAA (algorithm name) misc comments cleanups
* FIX graph FBObject usage - 526ea7a3fb579f88a0c0a1e597387aae29d5aa06Sven Gothel2011-05-171-15/+10
|
* Graph VBORegion*: Lazy GL alloc of resources at update(GL, ..) not constructorSven Gothel2011-05-082-233/+141
|
* Graph: GLSL fix, Adding renderModes bits instead of dedicated booleans, ↵Sven Gothel2011-05-0815-134/+141
| | | | | | | | | | | | | | | | | | | | | Region/GLRegion, .. GLSL fix: - allowing #version tag - add uniform textureSize (ES2) - fix int/float conversion Region/GLRegion: - non OpenGL Region and GL related GLRegion split Region/Renderer renderModes bits (def. in Region) - user creates a Renderer* impl .. and derive Region*'s from outline, possibly from a different code path. - to avoid mode explosion, a bit field is being used for now - Renderer: remove flushCache(), since non caching impl. is intended, or caching by an external user transparent object.
* Cleanup nonuniform impl(method params and comments)Rami Santina2011-05-031-1/+1
|
* Added nonuniform weight impl; misc enhancements/cleanupsRami Santina2011-05-028-46/+145
| | | | | | | | | | Seperate texcoords from shaprness Added NonUniform weight shader impl for region impl only (not text) Refactor p1y --> weight (equiv to nurbs weight) cleanup shader uniforms (rename/remove unneeded) Enhanced blending of text GPURegionNewtDemo01 - added weight W/Q to manipulate weight refactor r2t --> vbaa (matching algorithm name)
* ShaderState: Add 'ownUniform()/ownAttribute()'; rename glFunction -> ↵Sven Gothel2011-04-265-55/+61
| | | | | | | | | | | | | | function; switch program enh. ; Graph lifecycle Add 'ownUniform()/ownAttribute()' allowing to reset all bound uniforms/attributes, not just active ones plus handling the lifecycle of the owned attributes (destroy). This simplifies the lifecycle of all shader attributes. Rename glFunction -> function .. well, the GL attribute marks them GL related already Switch program enhancement. If switching to new program (unlinked), issue glBindAttributeLocation .. Graph lifecycle cleanup using the above ..
* graph/glsl: AMD need vertice attrib location 0 ..Sven Gothel2011-04-251-3/+3
|
* Graph: Fix AMD shader complain (version) ; No Attributes in fragment program ↵Sven Gothel2011-04-243-5/+12
| | | | ; Disable FPS draw at start
* Refactored graph: Reduce/remove data copy/recreation; Shader cleanupSven Gothel2011-04-2314-432/+502
| | | | | | | | | | | | - Pass the current GL context object where it's required - Introduce RenderState (which has ShaderState) to acquire/change shader related data (Region) - Shader Cleanup: User import for common stuff; use req. version - Reduce/remove data copy/recreation in *Region implementation - UI/RIButton: Use defaults I like :)
* Fix TAB: Replace all TAB with 4 spacesSven Gothel2011-04-085-517/+517
|
* Merge remote-tracking branch 'rsantina/graph' into graphSven Gothel2011-04-082-5/+24
|\
| * Merge: merged with sgothelRami Santina2011-04-084-220/+232
| |\
| * | Added getBounds impl to region, returning AABBoxRami Santina2011-04-082-2/+21
| | |
* | | destroy: clear vertices/triangle arraysSven Gothel2011-04-081-2/+2
| |/ |/|
* | Use GLArrayDataServer to handle shader attributes/data using VBOSven Gothel2011-04-082-215/+227
| |
* | Use common constants for shader attributes (needs to be completed)Sven Gothel2011-04-082-4/+4
|/
* Fix: shaderProgram.program(); glBindAttribLocation() call; ↵Sven Gothel2011-04-052-8/+14
| | | | | | | | | | | | dispose/disposeImpl sequence; Use shaderProgram.program() instead of shaderProgram.id() - the id() is just a unique sequence name. Call glBindAttribLocation() after program object init and before linkage. Chain call disposeImpl() properly to fix destruction sequence: TextRendererImpl01 -> TextRenderer -> GlyphString -> Region RegionRendererImpl01 -> RegionRenderer -> Region
* Fix: Use new FBObject; Use shaderProgram.program() instead of shaderProgram.id()Sven Gothel2011-04-051-65/+30
| | | | | | | The new FBObject handles state transition more easily and it's usage is less complex to the caller - compared to inline usage. Use shaderProgram.program() instead of shaderProgram.id() - the id() is just a unique sequence name.
* Fix: p1y region set to 0.5, cleaned shaderRami Santina2011-04-023-9/+6
|
* Jogl build: Rebuild jar files if shaders were updatedSven Gothel2011-04-021-1/+2
|
* Fix: removing fragments with w=0 is producing dimples with msaaRami Santina2011-04-021-1/+1
|
* Fragment Shader enhancement + clean-up;Rami Santina2011-04-023-22/+20
| | | | | | in first pass the shader now discards pixels that are dropped by imlicit AA, and second pass (if executed) doesnt include them in AA clac.