A few code improvements.
Minor
FactorySticker: further improvements.
Properly detect which drivers are slow with compilation of TF programs.
Fix for an invalid enum.
New debug to print a whole component of a mesh.
Create the bandaged 3x3 icon: something works, the shape is drawn, but it's entirely black. Investigate.
Further progress with Bandaged 3x3.This requires a new API in DistortedNode to change the Mesh there.
Very important bugfix in the Library: MatrixEffectQuaternion cannot share the tmp static buffers!
new API to enable/disable face culling
Preparation for drawing only the FRONT side of the cubit walls.
Extra API for QuatHelper.
Up version to 1.9.3
Minor.
Switch off the OpenGL error debug.
Important bugfix for the 'cube disappears when its mesh gets changed from nice to simple'.
The reason why recreating an InternalBuffer from within the 'create()' function doesn't work but doing the same from 'createImmediately' does work is not fully understood. Nevertheless the fix is correct in the sense that it...
Correct the glBufferData's usage argument: in UBO and VBO cases, it should be GL_STATIC_DRAW.
Add DistortedProgram.stopUsingProgram()
Add a glGetError() call to the main render loop.
Add info about FPS.
Progress replacing the enum ObjetType with the class RubikObjectList.
Adjust ShapeChanging so that it can handle concave cubit faces.Now it is working also in case of the Ivy corner cubits.
Float vertices - scratchbook
Bugfix.
Add to MeshPolygon a special modee to create a 2-band polygon with dense corners (needed to reduce number of vertices in side faces of the TwisttyPuzzle cubits)
Add testing of MeshPolygon to the MeshFile app.
Major change: separate the notion of a TwistyObject and its Node. Now,
1) the Node stays when we change objects (this makes transitions faster)2) it's possible to just create an Object without adding it to the Screen (now app needs to explicitly create the Node and add it to its Screen itself)
Correction
By default, do use Halo Depth (this broke the halo around a solved object in distorted-cube!)
Set possibility for the Postprocessing effects to eclipse the whole object or only work at the edges.
New API: set components centers of all components all in one go.
comment.
New BORDER effect.
Comment.
Improvements for the new Border effect. Now works, but covers the object - to be corrected.
New postprocess effect 'Border' (not working yet) and adding it to the testing app 'Triblur'.
Mesh creation: finished.
Move destroying most of statics from onDestroy() earlier, to onPause().
Reason: doing this in onDestroy() is too late, because when we have two activities, and switch between them, first the ending's Activity onPause() is called, then the starting Activity's onResume, then it's onSurfaceCreated(), then we insert all the effects, and only then the ending Activity onDestroy() gets fired off - and this might destroy the already enabled effects, like for example the Programs of the Postprocessing effects.
Move QuatHelpeer to distorted-library
Add debugging option to DistortedEffects.
On second thought, come back to Vector. The problem: before we had the potentially blocking function 'effectFinished' inside our synchronized block.
Improve EffectMessageSender: ArrayList with explicit locking in place of a Vector.
1) add missing call to BlockController.onPause() / onResume() to the Tutorial activity2) rearrange BlockController's error reporting to make the case where the MessageSender thread has died separate3) in such case, resurrect the thread4) simplify and harden the EffectMessageSender
More debugs to the EffectMessageSender.
Firebase shows that we have a problem when an app is rapidly restarted, i.e. when is it paused and resumes within tens of milliseconds. Then sometimes the EffectMessageSender thread dies.
Attempt to limit this by synchronizing the whole 'start' and 'stop' methods, although I suspect this will still happen because the very methods are probably in such case called in the wrong order.
Some more debugs for the case when the UI is blocked.
Convert the Ivy corner cubit to the new, 'universal' cubit creation method.
This forces deep changes to 'createRoundSolid' and the underlying 'MeshPolygon' class to make them support arbitrary Polygon 'centers of face convexity'.
Reason: the faces of this cubit are concave and such default 'center of face convexity' (which by default used to be (0,0)) turned to lie outside the face - which produces strange visual artifacts.
Copy constructors for the Statics.
Dynamics: minor.
Dynamics: consolidation of code.
Dynamics: introduce two speed modes - smooth and segment_constant.Prepare the third mode - globally_constant.
Bump version to 1.8.0
2 Skewb Ultimate cubits.
RubikControl: fixes; progress.
Make Dynamic's resetToBegin() done on the next frame.This is necessary if we want to reset many Dynamics at one go and have all of them start synchronized.Otherwise it can happen that when we reset, we do it when some objects which the Dynamics belong to are already rendered and others are not, and then some of the Dynamics will be delayed by one frame which is visible already.
Progress with RubikControl - sub-stages 1 and 2 of the 'whole' stage finished.
Actually reset Node's mLastTime back to 0 each time we attach it somewhere.
Move the information when was a EffectQueue last time evaluated from the EffectQueues all the way up to the Node which contains them.The point: we need to reset this time back to 0 every time we attach the Node (and thus start evaluating the Queues inside)
Only switch on 'BuggyUBOs' on Adreno 308 driver versions 331 and 415.
Calibration of the previous workaround.
Workaround for the fact that one some devices (for example the LG K30's V@415 driver on the Adreno 308) the Glow halo wasn't visible.
MeshBase's 'MAX_NUM_COMPONENTS' is not a constant - rename!
Correct an crash when trying to run a program with no vertex effects.
Do not switch BuggyUBOs on Adreno 306, as I just saw a device - ZTE ZMax2 - which uses a 306 and driver V@100, which does not like packed UBOs...
Improve the 'buggy UBOs' detection.
- report the Graphics driver's Renderer and Version.- new Diamond, Skewb2 and Skewb3 meshes.
Always reset static variables in DistortedLibrary to default values.
Convert the first object, the Cube, to the new Cubit-creating engine.
Face cubit creation: progress: rounded corners
Face cubit creation: progress, a cube renders correctly :)
Properly solve the issue with Qualcomm driver V@331 having buggy UBO size.
Another attempt at fixing tthings on early Qualcomm OpenGL ES 3.0 drivers.
The previous version does not work on Adreno 405 driver V@100, present for example in a Asus ZenPad 8.Revert the packed 'ivec2' UBO in the vertex shader back to a 'std140' ivec4. This comes at a price if bumping into the bug on Qualcomm driver version 331 on Adreno 308 - i.e. Samsung Galaxy J4+ again....
Correct a comment for Javadoc.
Add new comments for Javadoc.
Correct comments; hide stuff from Javadoc.
Correct comments.
Make the 'Component Associations' UBO (on most devices) twice smaller -use the 'packed' layout and 'ivec2' in place of 'ivec4'.
This forces us to dynamically probe the 'Stride' - number of 4-byte entities that the UBO's 'ivec4' takes - and correct the already-constructed UniformBlockAssociation objects in case this turns out to be different than the expected 2, i.e. tightly-packed....
Add a new API DistortedEffects.exists(long id)
Make per-component centers optional, controlled by API MeshBase.setUseCenters()
Bugfixes as a result of the Samsung Galaxy J4+ investigation:
1) By default, switch off transform feedback in the main program. Create a new API 'needTransformFeedback()' to call if someone still needs TF in the main program.2) lower the default max number of vertex effects to 30....
Progress with Megaminx.
Remove UBO from the fragment shader and come back to the default of only 5 concurrent fragment effects. All because UBOs in fragment shader crash on Adreno 510 and Adreno 506.
Properly initialize DynamicQuat.
Remove all the calls to DistortedLibrary.setMax() (except for app 'Check', which explictly checks this API)
Introduce another Uniform Block Object. Now we can have much more vertex and fragment effects - up their default number to 100.
Plug two more memory leaks. It should be fine now.
Plug a major memory leak.Still one more leak remains - a similar UniformBuffer has to be markedForDeletion in the EffectQueues.
Convert the Integer part (i.e. effect names and the two associations) of vertex and fragment shaders to Uniform Buffer Objects.Next: convert the last part, i.e. the float effect parameters.
Cleanups
Fixes for the Rex Cube (mostly works now)
Bugfix: fix a long-standing bug where switching on normal vector drawing would interfere with transparency.
Bugfix: always normalize the normal vector after modifying it, otherwise the next effect might not work correctly (Distort!)
Bugfix: we initially need to set the maxTextureSize to MAX_INT, because otherwise early (i.e. before a call to onSurfaceCreated) calls to setTexture() will fail.
Put new things to the StackFrame.