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.
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.
MeshBase's 'MAX_NUM_COMPONENTS' is not a constant - rename!
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 :)
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.
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....
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.
Introduce another Uniform Block Object. Now we can have much more vertex and fragment effects - up their default number to 100.
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.
Fixes for the Rex Cube (mostly works now)
Fix the fact that we would keep adding new InternalBuffers to the 'Done' list - split 'invalidate()' and 'recreate()' to two separate actions!
Improve the Skewb; set max components to 110 in MeshBase so that all of Professor Skewb's components fit.
Do not crash if we try to map a texture component out of range.
New API for the library: add an empty texture component to a Mesh.Use this in thr Magic Cube to add empty texture components to some types of cubits.
Comment.
Minor.
Add an extra option to MeshPolygon: making triangles located around the vertices of the polygon smaller.
Progress with MeshPolygon.
Rename Meshes.
First attempt at new mesh - Polygon. Unfinished (normal vector!), untested
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.
Add component centers to dmesh version 2.
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
Merge branch 'effects-ubo'
Bugfixes.
Introducing UBO to Effect Queues: step 1.
Move the 'effect association' part of MeshBase to a separate class.
Introduce an UBO to the vertex shader holding info about mesh effect associations.
Progress with the MeshFile app.
Fix normals in case of MatrixEffectScale / Shear.Fix displaying the normal vector.
Progress with the Dino.
Correct Inflate vectors in Triangles mesh
Library: introduce a new form of the MeshRectangular grid, where the individual rows and columns can be each of different width. This help reduce the number of vertices in objects as typically we are only interested at distorting a certain subregion.
Modify the Bean app to take advantage of this.
Reading a mesh from the .dmesh file works now.
Reading a mesh from the .dmesh file might work now. Checked on two small meshes.
Initial support for a writing a Mesh to a file and restoring it from a file (new class MeshFile).Untested!
new app icons; skeleton of reading/write a Mesh from/to a file.
Bugfix and new debugging methods in MeshBaseDeferredJob app rewritten to show the (just fixed) bug
Begin porting RubikCube to the new SingleMesh library. This will make rendering much faster - e.g. in case of Cube 5, instead of 98 renders of individual Cubits, there will be one render of the whole Mesh.
Extend the MeshBase.setTextureMaps API so that we are able to set a single texture map to a single texture component, or a few consecutive at a time, not necessarily starting from component 0.
Library: make setEffectAssociation a deferred job (because we do copy the uniforms during join!)SingleMesh App: almost finished.
Progres with SingleMesh; bugfix in MeshBase.apply(Matrix)
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....
Update Myanmar flag.
DeferredJobs app/lib works now
Progress with DeferredJobs app/lib (still does not work though)
Progress with DeferredJobs app (proves with the library part does not work :)
Progress with DeferredJobs (apply, copy, merge & join should be working now - untested)
1. New icon for PreDeform app2. Library: advances with DeferredMeshJobs
Bugfix ( Mesh shallow copy wasn't working )
First attempt at Deferred Mesh Jobs.Only apply(VertexEffect) supported for now.
Correct VertexEffectQueue in the Mesh. There's no need to have a separate Queue in every component.
Preparation for saving/reading Meshes to/from a file.
Progress making it possible to apply Vertex Effects only to some Components of a Mesh.
In library: allow a mixture of a deep and shallow copy of a Mesh ( mVertAttribs1 might be copied deeply or shallowly, mVertAttribs2 are always copied deeeply).Port RubikCube to the new library.
Some progress with 'MeshJoin' app.
Change 'tag' to a more appropriate name - 'association'.
Introduce 'tags' (soon to be renamed to 'associations') to Mesh and VertexEffect.A 'tag' is a way to associate a Vertex Effect only to a subgroup of a given Mesh's vertices (more precisely, only to an arbitrary subset of its Components)
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)
Change abortAll to removeAll in effectQueues (for consistency)Remove all pre-effects from the component queues when they are not used anymore.
Speedup for preapply
1 more fix for MeshBase.apply(VertexEffect). This still does not (fully) work though.
3 fixes for MeshBase.apply(VertexEffect).This still does not work though.
Progress with the Predeform app; deepCopy for the Meshes; various fixes.
First attempt at the MeshBase.apply(VertexEffect) API.
Remove the MeshBase.{set/get}Stretch API altogether.
A lot of changes.
1) main vertex shader: remove support for degree_object. This functionality will hopefully come back when we introduce other than circular regions.2) MeshBase: remove the need to set a Bounding box (this is the point of the whole thing - we wanted to get rid of this so that the advances in MeshJoined will be easier)...
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.
Progress implementing RubikCube.retObjectString()
Bugfixes in MeshBase:
1) improper buffer was being invalidated after apply and setTextureMap (TFO rather than VBO!)2) setTextureMap would only work if all components were being set
More support for the 3x3x3 Solver: more of the actual 3x3x3 solver mechanism.
Progress with of Pyraminx.Bugfix for joining a single Mesh!
Improve setTextureMap.
Make MeshBase.setTextureMap() work.
Minor.Looks like MeshBase.join() actually works.
Fix MeshBase.join()Only upload Mesh Buffers to GPU when we actually use them.
New MeshJoined.Test app says it's not working - bug in MeshBase.join().
Further corrections.
Convert Projection to not use the depreciated MeshBase.setStretch() API.
Correct the Rubik app for the recent changes to the library's Node.
Fix for MeshBase.apply()
New API: MeshBase.join() and a skeleton of an App to test it.
New Mesh 'Triangles' and updated Inflate & Generic apps to test it.
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)
New API MeshBase.apply(MatrixEffect[])
Rename MeshFlat MeshRectangles.
Making the Dialogs more consistent.