| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
except for sampler2D (mediump instead of lowp)
|
|
|
|
|
|
|
|
|
| |
detail w/ data sync within GLArrayHandle,
which also removed redundant code (VBO data sync and binding).
Refines commit 8582ece7dc7f65271b3184261697a542766d9864
and f49f8e22953ed2426fd4264ee407e2dc3fc07cfc
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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);
|
|
|
|
|
| |
- growBuffer() was using '(osize+additional) * components' -> 'osize + (additional * components )'
- added jogl.debug.GLArrayData - notifying growBuffer()
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
ShaderState.attachShaderProgram(..)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
tegra2 hunting, single pass, no discard, lowp,
and removed uneeded variables
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
| |
|
| |
|
|
|
|
| |
precision for all vars.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ..
|
| |
|
|
|
|
| |
; Disable FPS draw at start
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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 :)
|
| |
|
|\ |
|
| |\ |
|
| | | |
|
| |/
|/| |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|