| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
references
Clarify method names:
- update(..) -> updateByPMV(..), updateByPlanes(..)
- isOutside(AABBox) -> isAABBoxOutside(AABBox)
- .. same for point/sphere, while adding 'Location classifyType(..)'
|
|
|
|
|
|
|
|
|
|
| |
Frustum: Cleanup / update
- Remove ctor w/ PMV, use update(..) instead - avoid API explosion
- Add update(Plane[]) to copy existing Frustum planes
- Mention world-coordinates in update(PMV)
PMVMatrix: Fix mulPMV
- P*Mv in column major order is correct for Frustum
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the original paper
Paper:
Fast Extraction of Viewing Frustum Planes from the World-View-Projection Matrix
http://graphics.cs.ucf.edu/cap4720/fall2008/plane_extraction.pdf
Authors (in alphabetical order):
Gil Gribb <[email protected]>
Klaus Hartmann <[email protected]>
06/15/2001
Fix:
- Column Major Order PMV (Passing to Frustum and in calculation itself) according to paper coeff. calculation of plane
- Plane's signed distance function (only add d, don't multiply)
- Normalization: divide by lenght, not multiply
|
| |
|
|
|
|
|
|
|
|
|
| |
methodology as for Mvi and Mvit
Allows user to derive Frustum from updated P + MV
Clarify method name for clearing all update request:
- disableMviMvitUpdate() -> clearAllUpdateRequests()
|
|
|
|
|
|
|
|
|
|
|
|
| |
PMVMatrix: Add getPreMultipliedPMV(..)
- Independent / Compile Clean
- Remove OpenMALI dependencies
- Use basic float[] type and FloatUtil
- Use AABBox - FIXME: May need BBox (no axis alignment ?!)
- Relocation
- Move to com.jogamp.opengl.math.geom (see commit 5fafc1ac360333645b807dcd8dff0c0a655ea439)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
on OpenMALI - hence broken.
|
|
|
|
|
|
|
|
|
|
| |
c002e04f848116922a1ed7bd96ead54961649bbd
As suggested by Julien Gouesse, align 'enqueue(..)' method w/ 'invoke(..)':
- public void enqueue(GLRunnable glRunnable);
+ public boolean invoke(boolean wait, List<GLRunnable> glRunnables);
|
|
|
|
|
|
| |
and after ctx/drawable swap - sync'ing GL state
Otherwise a driver crash may occur on Windows/NVidia.
|
|
|
|
| |
pause/stop - taking execution frequency into account
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(API Change) ; Added GLDrawableUtil
A GLEventListener resides in two states, initialized and uninitialized.
When added to a GLAutoDrawable, it is uninitialized.
A first 'display()' will issue GLEventListener's 'init(..)' which renders it initialized.
This is usually accompanied by 'reshape(..)' propagating the drawable's dimension.
Destruction of the GLAutoDrawable will issue GLEventListener's 'dispose(..)' which renders it uninitialized.
It turns our these means of GLEventListener controls are not sufficient in case
the user requires to remove and add them during the lifecycle and rendering of their GLAutoDrawable host.
GLAutoDrawable 'removeGLEventListener(..)' merely removes the GLEventListener from the list,
but does not complete it's lifecycle, i.e. issues 'dispose(..)' if initialized to realease GL related resources.
Hence the following essential API changes are made to complete the lifecycle:
+ public GLEventListener disposeGLEventListener(GLEventListener listener, boolean remove);
disposing a single GLEventListener, allowing it's removal from the list being optional
This is demonstrated via GLDrawableUtil.swapGLContextAndAllGLEventListener(GLAutoDrawable a, GLAutoDrawable b), see below.
++++++++
Further more the following API changes were made to expose complete control of
GLEventListener to the user:
- public void removeGLEventListener(GLEventListener listener);
+ public GLEventListener removeGLEventListener(GLEventListener listener);
The return value allows simple pipelining, and also delivers information whether
the passed listener was actually removed.
- public GLEventListener removeGLEventListener(int index) throws IndexOutOfBoundsException;
+ public int getGLEventListenerCount();
+ public GLEventListener getGLEventListener(int index) throws IndexOutOfBoundsException;
Dropping the redundant removal by index, while adding count and get methods.
+ public boolean getGLEventListenerInitState(GLEventListener listener);
+ public void setGLEventListenerInitState(GLEventListener listener, boolean initialized);
Allows retrieving and setting of listener states.
All in all these API changes allows a user to experience all freedoms in dealing w/
GLEventListeners hosted by GLAutoDrawable impl. and shall be future proof.
Note that we have avoided the Iterator pattern due to it's overhead of temporal objects creation.
The simple indexed access allows us to implement each method as an atomic operation.
+++++++++++
Further more a simple enqueue(..) method has been added, allowing to just enqueue a GLRunnable
w/o provoking it's execution - as invoke(..) does.
This method pleases a use case where GLRunnables are batched and shall be executed later on..
public boolean invoke(boolean wait, GLRunnable glRunnable);
+ public void enqueue(GLRunnable glRunnable);
+++++++++++
Added GLDrawableUtil, exposes utility function to rearrange GLEventListener, modifiy GLAutoDrawable, etc.
GLDrawableUtil.swapGLContextAndAllGLEventListener(GLAutoDrawable a, GLAutoDrawable b)
is tested and demonstrated w/ TestGLContextDrawableSwitchNEWT.
Manually tested on X11, OSX and Windows.
|
|
|
|
| |
for success.
|
|
|
|
| |
w/ higher GLSL versions
|
|
|
|
| |
GLSL version and default precision (if GLES) - Used by GearsES2/RedSquare/PointDemo (Made GLSL version proof)
|
|
|
|
| |
fourth element was invalid
|
| |
|
|
|
|
|
|
|
|
|
| |
All *Pointer methods used 'normalized:=false', but we cannot assume
the fixed function code does use normalized (0f..1f) values.
On the contrary, it usually uses the native format value range.
Hence we have to pass normalized:=true for all fixed point data types
and normalized:=false for floating point data types.
|
| |
|
| |
|
|
|
|
| |
resize element count
|
|
|
|
|
|
|
|
| |
and size gross-net > PAGE_SIZE
Usually PAGE_SIZE is written within one DMA xfer command,
so if the gross buffer bulk transfer contains more unused data than PAGE_SIZE
we may win when transfering each single buffer at buffer update.
|
|
|
|
| |
imm. gl* functions; Default color padding is 1f; Make fields private.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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]>
|
|/
|
|
| |
properties, drawIndices QUAD w/ proper range and add uint; FixedFunctionHook: drawIndices QUAD w/ proper range and add uint
|
|
|
|
| |
ShaderSelectionMode.AUTO (good for mobile); Lazy shader instantiation.
|
|
|
|
| |
GL_QUAD_STRIP/GL_POLYGON/GL_QUADS mapping, glTexImage2D internalformat/format match.
|
|
|
|
| |
required (similar sanity checks as enableBuffer())
|
|
|
|
|
|
|
|
|
| |
detail w/ data sync within GLArrayHandle,
which also removed redundant code (VBO data sync and binding).
Refines commit 8582ece7dc7f65271b3184261697a542766d9864
and f49f8e22953ed2426fd4264ee407e2dc3fc07cfc
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
byte-order for sliced result
|
|
|
|
| |
toString(..) from PMVMatrix to FloatUtil and make it more generic; GLUniformData toString() also dumps it's matrices.
|
|
|
|
|
|
| |
compile FixedFuncHook due to removed 'isDirty()'
- getModifiedBits() -> getModifiedBits(boolean clear)
|
|
|
|
| |
similar to GLContext change 6d241fc2a46413ee478985d676d2481c5a7ed119
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ..
|
| |
|
|
|
|
| |
increase robustness $ glReadPixels and Get NUM_SHADER_BINARY_FORMATS
|
|
|
|
|
|
| |
representation allowing proper use of ref. comparison '==', instead of 'String.equals()'
Also make NativeWindowFactory's instances of nativeWindowingTypePure and nativeWindowingTypeCustom static final.
|
|
|
|
|
|
|
|
|
|
|
| |
remove GL error checking in FBObject bind/unbind.
- User GL code caused errors shall not fail impl.
- FBObject bind/unbind GL error checking is almost useless due to it's simple code,
would only catch user GL code errors, which should be ignored here.
- MultisampleDemoES2: Only enable GL_MULTISAMPLE if available, i.e. validate passed multisample flag
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
| |
channel (Luminance) read/write
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GL_ARB_half_float_pixel/GL_ARB_half_float_vertex and GL_OES_texture_half_float extensions
We mistakenly aliase the GL2 and GLES2 extensions:
- GL_ARB_half_float_pixel
- GL_HALF_FLOAT_ARB 0x140B
- GL_ARB_half_float_vertex
- GL_HALF_FLOAT 0x140B
- GL_OES_texture_half_float extensions
- GL_HALF_FLOAT_OES 0x8D61
This also leads to adding GL_HALF_FLOAT_OES
to com.jogamp.opengl.util.GLBuffers.sizeof(..).
|
|
|
|
|
| |
Even thought we didn't set the thread to be a daemon,
if the [parent] thread instantiating the Animator the attribute would be passed along.
|