Bugfix.
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 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.
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.
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.
Properly solve the issue with Qualcomm driver V@331 having buggy UBO size.
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....
Remove all the calls to DistortedLibrary.setMax() (except for app 'Check', which explictly checks this API)
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.
Bugfix: fix a long-standing bug where switching on normal vector drawing would interfere with transparency.
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.
Minor.
Start creating the Tutorial Activity.
More support for using the library from more than one activity. Should be working now!
More support for using the library from more than one activity
1) Beginnings of support for using the library from more than one activity2) rename DistortedLibrary.onCreate() to onSurfaceCreated()3) (rubik) add Cambodia's flag.
Detect if the texture we are trying to upload is too large and return an error.
Remove the 'binding' parameter from the UBO in the vertex shader - this is not part of OpenGL ES 3.0, only introduced in 3.1, and we want to be compatible with 3.0.Now we need to dynamically detect the UBO index and form a BlockBinding ourselves.
Remove the 'inflate' vertex attributs from the Mesh and file format, and replace that with a per-component 'inflate centers' (which are as of yet untested)
Simplify AssociationUniformBlock
Move the 'effect association' part of MeshBase to a separate class.
Introduce an UBO to the vertex shader holding info about mesh effect associations.
Fix normals in case of MatrixEffectScale / Shear.Fix displaying the normal vector.
Fix the fact that the Normal and OIT programs would not work after a period of being paused.
Fixes for pausing and restarting.
Fixes for the previous commit.
Only compile the Full, Normal & OIT programs when they are actually needed.
Only insert the 'Mali r12' FBO queue fix if we actually are running on a Mali GPU with driver version <22. (then FBOQueue=4 - unless we manually overide this down to 1 - else, always 1)
- Decrease FBO queue size to 3- do clean the output surface even if it doesn't have any children (in renderChildren)
Do NOT sett viewport to (500,500) when pre-appllying vertex effects as that causes the first (few?) frames the pre-applied Mesh is displayed to be displayed in a wrong place on the screen.
Big change to MeshBase:1) split the list of Components into two: 'texture map' components and 'effect' components. Reason: imagine the Rubik Cube with a Solver. When setting up a initial position in the Solver, we need to be able to set texture maps of each individual face of each cubit....
First attempt at Deferred Mesh Jobs.Only apply(VertexEffect) supported for now.
Only show the OpenGL Error dialog when the underlying hardwarre does not support OpenGL ES 3.0.
Progress making it possible to apply Vertex Effects only to some Components of a Mesh.
Report a Crashlytics non-fatal if we fail to compile some shaders.
Have VERTEX_QUATERNION, VERTEX_ROTATE and VERTEX_SHEAR modify inflate vectors.Split Vertex attribute array into two (the one modified by preapply effects and the one not)
Speedup for preapply
3 fixes for MeshBase.apply(VertexEffect).This still does not work though.
First attempt at the MeshBase.apply(VertexEffect) API.
Do not crash if we failed to compile some programs.
Lower requirements - now only OpenGL ES 3.0 is required; if running on such platform, OIT part of the API ( which is the only one which actually requires 3.1) is switched off.
Further corrections.
Correct the Rubik app for the recent changes to the library's Node.
Convert RubikCube to the new V&F center schema!
Moving the Vertex and Fragment centers of effect to the center of the Mesh.
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.
Correct the Legal notice.
Rename all the classes that are not exported to application to 'Internal'