Fix MeshBase.join()Only upload Mesh Buffers to GPU when we actually use them.
Further corrections.
Correct the Rubik app for the recent changes to the library's Node.
Size of the FBO internal to Nodes is now NO MORE taken from the Mesh's stretch values.Instead, the size is copied from child's FBO size (if there is one) or if the child is a leaf with texture in it (which is sizeless) then we get the default 100x100 ( which means we probably have to explicitly call Node.resizeFBO() )
Minor.
Remove width & height from InternalSurface and move it to InternalOutputSurface.
Hide the InternalSurface class inside its package.
Convert RubikCube to the new V&F center schema!
Moving the Vertex and Fragment centers of effect to the center of the Mesh.
Fixes for the merge.
Move the Effects.setStretch to Meshbase.setStretch
Move the 'pre-multiply mesh before applying any effects' thing from [(Xsize of texture, Ysize of texture) x Mesh's zFactor] to Effects.setStretch(sx,sy,sz)
Making the Dialogs more consistent.
Adjustment to Static's API.
remove an unused, redundant API.
Yes! new commit, a fix to a comment :)
Simplify the way applications can get notifications when an effect finishes.
Now, instead of the 'DistortedEffects.(de)registerForNotifications()' 2 APIs, we call a single 'Effect.notifyWhenFinished()'.
Progress with DistortedCube.
Correct the Legal notice.
Rename all the classes that are not exported to application to 'Internal'
Finally move the EffectQueues to their own package.
Cut another interdependency between the Queues and the rest: it is no longer necessary to add DNodes to PostprocessQueue to rearrange the Nodes by buckets. The rearranging is now done on next render instead.
Move all Program-related stuff to Distorted. Now the DistortedEffects class is very simple.
Make DistortedEffects oblivious of the effect types.
Cut one interdependency between the EffectQueuePreprocess and DistortedNode
Cut one interdependency between the EffectQueuePreprocess and DistortedEffects
Carve the 'children list' from DOutputSurface and DNode into a separate class of its own, DistortedChildrenList.
Split the DistortedNode class into two - DistortedNode and DistortedNodeData
Some simplifications to the Node.
Fixes for memory leak problems uncovered by the 'Rubik' app. (mainly: new method DistortedNode.markForDeletion)
We don't have to mark Textures for creation until we fill them up with data.
Correct the same bug for DistortedTextures and DistortedFramebuffers: only mark them for creation when we actually have everything ready, i.e. as the last statement in the constructor.
Correct a bug in DistortedBuffer: we only mark it for creation when we actually have all the data ready, otherwise it can happen that create(0 is called before setData() !
Improve locking in DistortedObject.DistortedMaster: slaves can be NULL !
Many things.
1) make the Dynamic.setDuration() able to be called AFTER the Dynamic has already been run. (and rename it to 'makeRunNowFor()' )2) remove the automatic removal of zero Effects from EffectQueues.3) adjust several Apps to cope with 2)4) add post-rotation to Rubik (still not finished)
Finish the Rubik app.
Avoid a potential crash on exit
Before we start rendering, effects can always be added.
Relax requirements on when we can call DistortedEffects.setMax().
Before this change one had to call it before creation of shaders and before any of the DistortedEffects classes got created.This commit removes the second requirement so now with setMax it's just like with enabling effects: it's best done in onSurfaceCreated.
Massive: make the coordinate system agree with that of OpenGL (i.e. invert the Y axis).
Correct the z-axis of the center of fragment effects (it was inverted)
Make the Fragment effects truly 3D: change their 4D 'region' into a 3D 'center' (a point in 3D) and 3D 'region' (which is now a set of 3 radii defining an ellipsoid around the center)
Also corresponding changes to the applications.
Redefine the Vertex Region from (x,y,r,unused) to (x,y,z,r). This takes into account the 'Z', which makes it possible to warp only one side of a 3D Mesh like Sphere.
Also corresponding changes in applications.
New MeshQuad class.
Fix the bug where the postprocessed GLOW halo of a Cube would be of different colors depending on the order of rendring of the cube sides. (one needed to switch off BLENDing while preprocessing )
Fix the bug where the postprocessed halo would not work for the first few frames of each quality level (before this commit the bug was visible in the 'GLOW' app).
Properly clean up static varaibles in the Effect classes!
Bugfix for the situation when we would be BLURring an object, then we remove the BLUR and apply a GLOW, then remove the GLOW and apply BLUR again - the second BLUR would assume the color of the GLOW.
Important bugfix in MeshCubes for the Inflate vectors.
Translate the size of the Halo around postprocessed objects from 'number pixels around the object' (as held in the Effects themselves) to a float suitable for Inflating the underlying Mesh with the per-vertex Inflate vectors.
Progress with Inflate (building block of postprocessing effects: the proper way of marking a halo around a Mesh)'Inflate' app testing the machanism. MeshFlat appears to be working, now we only need to fill up the per-vertex Inflate vector in the MeshCubes.
Some simplifications in Meshes. Hide stuff inside MeshBase.
Fix the preprocess shader. This makes the 'Postprocess Tree' app look good again.
Small things.
Move EffectMessageSender to the 'message' package (duh!)
Rename MeshObject to MeshBase.
Fully move the Meshes to their own package.
Beginnings of a separate package only with Meshes.
Progress with Effects3D app - merge Matrix effects
Postprocessing: adjust the Projection of the postprocessing buffers to match the Projection of the surface we are supposed to be rendering to.
Correct the way we display Normals (didn't work in case rendering was of OIT type)
Progress with thr Glow effect - moving glow app looks ok now.
More progress with a more generic 'preprocess' stage of Postprocessing Effects.
Progress with a more generic 'preprocess' stage of Postprocessing Effects.
1. Hide internalQuality inside Postprocess effects.2. First step to turn markStencilAndDepth into a more generic Postprocessing 'preprocess'.
Hide the FBO_QUEUE thing inside the library. The queue is running internally now, without public setAsOutputFBO() thing (simplifies writing postprocess effects)
Partially 'fix' Glow effect for the case when FBO_QUEUE_SIZE > 1 (come back to pre-FBO_QUEUE_SIZE level of functionality).Still, Glow needs to actually get implemented correctly.
a mix of two changes:
1) remove the DistortedInputSurface interface (now every Surface is Input)2) make the OIT SSBO self-adjustable in size
Make the OIT SSBO size independent of screen size.
Remove the redundant DistortedNode.onPause()
Largely fix the non-postprocessed OIT. Still, one problem remains: back-facing surfaces seem to disappear (visible in 'Cubes')
Some progress with not-postprocessed OIT.
Progress with non-postprocessed OIT.
Status: compiles, but fails to work on both Adreno and Mali. Crashes the app (Adreno) or the whole system (Mali)
In Distorted.onCreate(), catch and re-throw exceptions, so that even is some Program fails to compile, others will still compile.
Standarize GLSL version across the whole library.
Correct a recently introduced bug.
Give users API to render OutputSerfaces and attached Nodes in either the 'normal' way of OIT way.
Start merging master and OIT.
Correct the way we delay FBOs in DistortedScreen.
Port the Mali flash fix to the OIT branch.
I am pretty sure this time the flashing issues on Mali T880 r12 driver are finally fixed.
The fix: a queue of FBOs render to, just like before, but this time in DistortedScreen we blit not the current FBO, but the one computed several frames ago.
This of course introduces a delay and uses more memory, but it appears to work and does not seem to have any effects on speed.
Port another commit from master.
I spoke too soon, the ARM Mali flashing is of course not fixed yet. The previous commit fixed Triblur, but the bug is still reproducible elsewhere (only in the 'postprocessed' apps though).
This commit introduces a circular queue in case of the postprocessing FBOs - with little success though.
Port a commit from the master branch.
Finally properly fix the flashing on ARM Mali T880 GPU.
The flashing is caused by a 'full pipeline flush' (see DarkPhoton, https://www.opengl.org/discussion_boards/showthread.php/200754-Flashes-on-ARM-Mali?p=1291679&viewfull=1#post1291679 ). In order to combat it, first introduce the possibility that a single DistortedOutputSurface is backed up by more than one FBO. Then make DistortedScreen be derived from DistortedFramebuffer (which itself is derived from DistortedOutputSurface) and make it contain 3 FBOs, render to them in a circular queue fashion, and blit from a given FBO to the system FBO. The 'more than 1 intermediate FBO' queue prevents the pipeline flush....
Revert last changes to the postprocessing FBO.
This reverts commit 2dbed690bdbee80d9bfb22c800073855eb5d0946.
Try and avoid re-sorting the children by buckets (if we can!). This makes change in rendering order in the 'Transparency' app actually work.
In an attempt to contain the flashes on Mali GPU, re-structure the post-processing FBOs from 1 FBO with 2 color attachments + combined depth-stencil to 2 separate FBOs sharing a depth-stencil texture.
Result: this appears to make the flashes slightly worse.
Minor
OIT: fixes for Mali: fix a broken loop in the oitRender fragment shader that resulted in flashing.
OIT: fix for 'out of memory' crash on Mali GPUs.
~The thing still does not fully work there - there are still strange flashes in apps that innvolve OIT, for example in 'Triblur'.
OIT: more fixes
OIT: fixes. Everything looks correct now except for the curious return of the 'dancing lower-left corner' small glitch in the 'Transparency' app.
OIT: move towards 4 passes ( clear - build - collapse - render )
correct oitRender again: we need to disable stencil reading and writing and restore after