commit a5a3b341fc9299ab6d0c03f4d87470d2952d120e
Author: LeszekKoltunski <leszek@koltunski.pl>
Date:   Wed May 21 22:03:04 2025 +0200

    transition of the mesh package.
    Compiles, but does not work.

diff --git a/src/main/java/org/distorted/library/effectqueue/EffectQueuePostprocess.kt b/src/main/java/org/distorted/library/effectqueue/EffectQueuePostprocess.kt
index e04b952..25548cf 100644
--- a/src/main/java/org/distorted/library/effectqueue/EffectQueuePostprocess.kt
+++ b/src/main/java/org/distorted/library/effectqueue/EffectQueuePostprocess.kt
@@ -76,8 +76,8 @@ class EffectQueuePostprocess : EffectQueue
             var mainVertHeader = version + ("#define NUM_VERTEX " + (if (numV>0) DistortedLibrary.getMax(EffectType.VERTEX) else 0) + "\n")
             val mainFragHeader = version + "\n"
 
-            mainVertHeader += "#define MAX_COMPON " + MeshBase.getMaxEffComponents() + "\n"
-            if (MeshBase.getUseCenters()) mainVertHeader += "#define COMP_CENTERS\n"
+            mainVertHeader += "#define MAX_COMPON " + MeshBase.maxEffComponents + "\n"
+            if (MeshBase.useCenters) mainVertHeader += "#define COMP_CENTERS\n"
             if (DistortedLibrary.isUBOBuggy()) mainVertHeader += "#define BUGGY_UBOS\n"
             mainVertHeader += "#define POSTPROCESS\n"
 
@@ -172,7 +172,7 @@ class EffectQueuePostprocess : EffectQueue
 
         mPreProgram!!.useProgram()
 
-        mesh.bindVertexAttribs(mPreProgram)
+        mesh.bindVertexAttribs(mPreProgram as DistortedProgram)
         mesh.send(mPreProgramH, 2)
 
         val queues = effects.queues
@@ -188,7 +188,7 @@ class EffectQueuePostprocess : EffectQueue
             GLES30.glUniform1i(mPreTextureH, 0)
         }
 
-        GLES30.glDrawArrays(GLES30.GL_TRIANGLE_STRIP, 0, mesh.numVertices)
+        GLES30.glDrawArrays(GLES30.GL_TRIANGLE_STRIP, 0, mesh.getNumVertices() )
         mPreProgram!!.stopUsingProgram()
 
         InternalRenderState.restoreBlending()
diff --git a/src/main/java/org/distorted/library/main/DistortedLibrary.java b/src/main/java/org/distorted/library/main/DistortedLibrary.java
index 1ea194a..2be608a 100644
--- a/src/main/java/org/distorted/library/main/DistortedLibrary.java
+++ b/src/main/java/org/distorted/library/main/DistortedLibrary.java
@@ -536,8 +536,6 @@ public class DistortedLibrary
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
  * Execute all VertexEffects and adjust all vertices
- *
- * @y.exclude
  */
   public static void adjustVertices(MeshBase mesh, EffectQueueVertex queue)
     {
@@ -980,12 +978,6 @@ public class DistortedLibrary
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Not an external API
- *
- * @y.exclude
- */
-
   public static void logMessage(String message)
     {
     mUser.logMessage(message);
diff --git a/src/main/java/org/distorted/library/mesh/DeferredJobs.kt b/src/main/java/org/distorted/library/mesh/DeferredJobs.kt
index 5adc08a..2a372eb 100644
--- a/src/main/java/org/distorted/library/mesh/DeferredJobs.kt
+++ b/src/main/java/org/distorted/library/mesh/DeferredJobs.kt
@@ -153,10 +153,9 @@ object DeferredJobs
     }
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
-    fun <T:MeshBase> join(target: T, meshes: Array<T>): JobNode
+    fun <T:MeshBase> join(target: T, meshes: Array<MeshBase>): JobNode
     {
         var jn: JobNode?
-
         val job = Job(JOB_TYPE_JOIN, target, meshes, null, null, null, 0, 0, 0, 0f, 0f, 0f, null)
         val node = JobNode(job)
 
@@ -176,7 +175,7 @@ object DeferredJobs
     }
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
-    fun <T:MeshBase> copy(target: T, mesh: T): JobNode
+    fun <T:MeshBase> copy(target: T, mesh: MeshBase): JobNode
     {
         val jn = mesh.mJobNode[0]
         val meshes = arrayOf(mesh)
diff --git a/src/main/java/org/distorted/library/mesh/MeshBase.kt b/src/main/java/org/distorted/library/mesh/MeshBase.kt
index cb73728..06a5f09 100644
--- a/src/main/java/org/distorted/library/mesh/MeshBase.kt
+++ b/src/main/java/org/distorted/library/mesh/MeshBase.kt
@@ -61,6 +61,78 @@ abstract class MeshBase
 
     var mJobNode: Array<DeferredJobs.JobNode?>
 
+    companion object
+    {
+        private const val ASSOC_UBO_BINDING = 3
+        private const val CENTER_UBO_BINDING = 4
+
+        // sizes of attributes of an individual vertex.
+        private const val POS_DATA_SIZE = 3 // vertex coordinates: x,y,z
+        private const val NOR_DATA_SIZE = 3 // normal vector: x,y,z
+        private const val TEX_DATA_SIZE = 2 // texture coordinates: s,t
+        private const val COM_DATA_SIZE = 1 // component number, a single float
+
+        const val POS_ATTRIB: Int = 0
+        const val NOR_ATTRIB: Int = POS_DATA_SIZE
+        const val TEX_ATTRIB: Int = 0
+        const val COM_ATTRIB: Int = TEX_DATA_SIZE
+
+        const val VERT1_ATTRIBS: Int = POS_DATA_SIZE+NOR_DATA_SIZE // number of attributes of a vertex (the part changed by preapply)
+        const val VERT2_ATTRIBS: Int = TEX_DATA_SIZE+COM_DATA_SIZE // number of attributes of a vertex (the 'preapply invariant' part)
+        const val TRAN_ATTRIBS: Int = POS_DATA_SIZE+NOR_DATA_SIZE // number of attributes of a transform feedback vertex
+
+        private const val BYTES_PER_FLOAT = 4
+
+        private const val OFFSET_POS = POS_ATTRIB*BYTES_PER_FLOAT
+        private const val OFFSET_NOR = NOR_ATTRIB*BYTES_PER_FLOAT
+        private const val OFFSET_TEX = TEX_ATTRIB*BYTES_PER_FLOAT
+        private const val OFFSET_COM = COM_ATTRIB*BYTES_PER_FLOAT
+
+        private const val TRAN_SIZE = TRAN_ATTRIBS*BYTES_PER_FLOAT
+        private const val VERT1_SIZE = VERT1_ATTRIBS*BYTES_PER_FLOAT
+        private const val VERT2_SIZE = VERT2_ATTRIBS*BYTES_PER_FLOAT
+
+        private val mCenterBlockIndex = IntArray(EffectQueue.MAIN_VARIANTS)
+        private val mAssocBlockIndex = IntArray(EffectQueue.MAIN_VARIANTS)
+
+        private const val TEX_COMP_SIZE = 5 // 5 four-byte entities inside the component
+        private var mStride = 0
+
+        /**
+         * How many mesh components are we going to need? Call before compilation of the shaders.
+         */
+        @JvmStatic
+        var maxEffComponents: Int = 100
+
+        ///////////////////////////////////////////////////////////////////////////////////////////////////
+        /**
+         * Are we going to need per-component centers (needed for correct postprocessing of concave meshes)
+         * Switching this on allocates 16*MAX_EFFECT_COMPONENTS bytes for uniforms in the vertex shader.
+         */
+        @JvmStatic
+        var useCenters: Boolean = false
+
+        ///////////////////////////////////////////////////////////////////////////////////////////////////
+        @JvmStatic
+        fun getUniforms(programH: Int, variant: Int)
+        {
+            mCenterBlockIndex[variant] = GLES30.glGetUniformBlockIndex(programH, "componentCenter")
+            mAssocBlockIndex[variant] = GLES30.glGetUniformBlockIndex(programH, "componentAssociation")
+
+            if (mStride==0)
+            {
+                val uniformNames = arrayOf("vComAssoc")
+                val indices = IntArray(1)
+                val params = IntArray(1)
+
+                GLES30.glGetUniformIndices(programH, uniformNames, indices, 0)
+                GLES30.glGetActiveUniformsiv(programH, 1, indices, 0, GLES30.GL_UNIFORM_ARRAY_STRIDE, params, 0)
+
+                mStride = params[0]/4
+            }
+        }
+    }
+
     private class TexComponent
     {
         var mEndIndex: Int
@@ -322,7 +394,6 @@ abstract class MeshBase
         var mesh: MeshBase
         var comp: TexComponent
         val numMeshes = meshes.size
-        var numVertices: Int
         var origVertices = this.numVertices
         val origTexComponents: Int
         var numTexComponents: Int
@@ -507,7 +578,7 @@ abstract class MeshBase
         }
 
         if (immediateJoin) joinAttribs(meshes)
-        else mJobNode[0] = DeferredJobs.join(this, meshes)
+        else mJobNode[0] = DeferredJobs.join(this, meshes as Array<MeshBase>)
     }
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -749,23 +820,9 @@ abstract class MeshBase
     }
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
-    val tFO: Int
-        /**
-         * Not part of public API, do not document (public only because has to be used from the main package)
-         *
-         * @y.exclude
-         */
-        get()
-        = mTFO.createImmediatelyFloat(numVertices*TRAN_SIZE, null)
-
-    ///////////////////////////////////////////////////////////////////////////////////////////////////
+    val tFO: Int get() = mTFO.createImmediatelyFloat(numVertices*TRAN_SIZE, null)
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
-    /**
-     * Not part of public API, do not document (public only because has to be used from the main package)
-     *
-     * @y.exclude
-     */
     fun send(programH: Int, variant: Int)
     {
         if (!mStrideCorrected)
@@ -787,11 +844,6 @@ abstract class MeshBase
     }
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
-    /**
-     * Not part of public API, do not document (public only because has to be used from the main package)
-     *
-     * @y.exclude
-     */
     fun bindVertexAttribs(program: DistortedProgram)
     {
         if (mJobNode[0]!=null) mJobNode[0]!!.execute() // this will set itself to null
@@ -854,11 +906,6 @@ abstract class MeshBase
     }
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
-    /**
-     * Not part of public API, do not document (public only because has to be used from the main package)
-     *
-     * @y.exclude
-     */
     fun bindTransformAttribs(program: DistortedProgram)
     {
         val index = mTFO.createImmediatelyFloat(numVertices*TRAN_SIZE, null)
@@ -868,10 +915,6 @@ abstract class MeshBase
         GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, 0)
     }
 
-    ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////////////////////////////////////
-
     ///////////////////////////////////////////////////////////////////////////////////////////////////
     // Return the number of bytes read.
     fun read(stream: DataInputStream): Int
@@ -1027,9 +1070,6 @@ abstract class MeshBase
     }
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
-    /**
-     * @y.exclude
-     */
     fun getLastVertexEff(effComponent: Int): Int
     {
         if (effComponent>=0&&effComponent<mTexComponent!!.size)
@@ -1041,9 +1081,6 @@ abstract class MeshBase
     }
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
-    /**
-     * @y.exclude
-     */
     fun getLastVertexTex(texComponent: Int): Int
     {
         if (texComponent>=0&&texComponent<mTexComponent!!.size)
@@ -1113,10 +1150,6 @@ abstract class MeshBase
         }
     }
 
-    ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////////////////////////////////////
-
     ///////////////////////////////////////////////////////////////////////////////////////////////////
     /**
      * Merge all texture components of this Mesh into a single one.
@@ -1148,6 +1181,11 @@ abstract class MeshBase
             mJobNode[0] = DeferredJobs.mergeEff(this)
         }
     }
+    ///////////////////////////////////////////////////////////////////////////////////////////////////
+    /**
+     * Return the number of vertices in this Mesh.
+     */
+    fun getNumVertices() = numVertices
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
     /**
@@ -1173,7 +1211,6 @@ abstract class MeshBase
     /**
      * Apply a Matrix Effect to the components which match the (addAssoc,equAssoc) association.
      *
-     *
      * This is a static, permanent modification of the vertices contained in this Mesh. If the effect
      * contains any Dynamics, they will be evaluated at 0.
      *
@@ -1197,7 +1234,6 @@ abstract class MeshBase
     /**
      * Apply a Vertex Effect to the vertex mesh.
      *
-     *
      * This is a static, permanent modification of the vertices contained in this Mesh. If the effects
      * contain any Dynamics, the Dynamics will be evaluated at 0.
      * We would call this several times building up a list of Effects to do. This list of effects gets
@@ -1214,12 +1250,10 @@ abstract class MeshBase
     /**
      * Sets texture maps for (some of) the components of this mesh.
      *
-     *
      * Format: ( x of lower-left corner, y of lower-left corner, width, height ).
      * For example maps[0] = new Static4D( 0.0, 0.5, 0.5, 0.5 ) sets the 0th component texture map to the
      * upper-left quadrant of the texture.
      *
-     *
      * Probably the most common user case would be sending as many maps as there are components in this
      * Mesh. One can also send less, or more (the extraneous ones will be ignored) and set some of them
      * to null (those will be ignored as well). So if there are 5 components, and we want to set the map
@@ -1268,13 +1302,12 @@ abstract class MeshBase
      * The point: this way we can configure the system so that each Vertex Effect acts only on a certain
      * subset of a Mesh, thus potentially significantly reducing the number of render calls.
      *
-     *
      * Only the bottom 31 bits of the 'andAssociation' are possible, the top one is taken by Postprocessing
      * Association [i.e. marking which components are disabled when we postprocess]
      */
     fun setEffectAssociation(component: Int, andAssociation: Int, equAssociation: Int)
     {
-        if (component>=0&&component<maxEffComponents)
+        if( component in 0..<maxEffComponents )
         {
             if (mJobNode[0]==null)
             {
@@ -1320,7 +1353,7 @@ abstract class MeshBase
      */
     fun setComponentCenter(component: Int, centerX: Float, centerY: Float, centerZ: Float)
     {
-        if (component>=0&&component<maxEffComponents)
+        if( component in 0..<maxEffComponents )
         {
             if (mJobNode[0]==null)
             {
@@ -1367,26 +1400,22 @@ abstract class MeshBase
     }
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
-    val numTexComponents: Int
-        /**
-         * Return the number of texture components, i.e. individual subsets of the whole set of vertices
-         * which can be independently textured.
-         *
-         * @return The number of Texture Components of this Mesh.
-         */
-        get()
-        = mTexComponent!!.size
+    /**
+     * Return the number of texture components, i.e. individual subsets of the whole set of vertices
+     * which can be independently textured.
+     *
+     * @return The number of Texture Components of this Mesh.
+     */
+    val numTexComponents: Int get() = mTexComponent!!.size
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
-    val numEffComponents: Int
-        /**
-         * Return the number of 'effect' components, i.e. individual subsets of the whole set of vertices
-         * to which a VertexEffect can be addressed, independently of other vertices.
-         *
-         * @return The number of Effect Components of this Mesh.
-         */
-        get()
-        = mEffComponent!!.size
+    /**
+     * Return the number of 'effect' components, i.e. individual subsets of the whole set of vertices
+     * to which a VertexEffect can be addressed, independently of other vertices.
+     *
+     * @return The number of Effect Components of this Mesh.
+     */
+    val numEffComponents: Int get() = mEffComponent!!.size
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
     /**
@@ -1397,88 +1426,4 @@ abstract class MeshBase
      * coordinates and effect associations, is always deep copied)
      */
     abstract fun copy(deep: Boolean): MeshBase
-
-    companion object
-    {
-        private const val ASSOC_UBO_BINDING = 3
-        private const val CENTER_UBO_BINDING = 4
-
-        // sizes of attributes of an individual vertex.
-        private const val POS_DATA_SIZE = 3 // vertex coordinates: x,y,z
-        private const val NOR_DATA_SIZE = 3 // normal vector: x,y,z
-        private const val TEX_DATA_SIZE = 2 // texture coordinates: s,t
-        private const val COM_DATA_SIZE = 1 // component number, a single float
-
-        const val POS_ATTRIB: Int = 0
-        const val NOR_ATTRIB: Int = POS_DATA_SIZE
-        const val TEX_ATTRIB: Int = 0
-        const val COM_ATTRIB: Int = TEX_DATA_SIZE
-
-        const val VERT1_ATTRIBS: Int = POS_DATA_SIZE+NOR_DATA_SIZE // number of attributes of a vertex (the part changed by preapply)
-        const val VERT2_ATTRIBS: Int = TEX_DATA_SIZE+COM_DATA_SIZE // number of attributes of a vertex (the 'preapply invariant' part)
-        const val TRAN_ATTRIBS: Int = POS_DATA_SIZE+NOR_DATA_SIZE // number of attributes of a transform feedback vertex
-
-        private const val BYTES_PER_FLOAT = 4
-
-        private const val OFFSET_POS = POS_ATTRIB*BYTES_PER_FLOAT
-        private const val OFFSET_NOR = NOR_ATTRIB*BYTES_PER_FLOAT
-        private const val OFFSET_TEX = TEX_ATTRIB*BYTES_PER_FLOAT
-        private const val OFFSET_COM = COM_ATTRIB*BYTES_PER_FLOAT
-
-        private const val TRAN_SIZE = TRAN_ATTRIBS*BYTES_PER_FLOAT
-        private const val VERT1_SIZE = VERT1_ATTRIBS*BYTES_PER_FLOAT
-        private const val VERT2_SIZE = VERT2_ATTRIBS*BYTES_PER_FLOAT
-
-        private val mCenterBlockIndex = IntArray(EffectQueue.MAIN_VARIANTS)
-        private val mAssocBlockIndex = IntArray(EffectQueue.MAIN_VARIANTS)
-
-        private const val TEX_COMP_SIZE = 5 // 5 four-byte entities inside the component
-
-        /**
-         * Are we using per-component centers?
-         */
-        var useCenters: Boolean = false
-            private set
-        private var mStride = 0
-
-        /**
-         * How many mesh components are we going to need? Call before compilation of the shaders.
-         */
-        ///////////////////////////////////////////////////////////////////////////////////////////////////
-        var maxEffComponents: Int = 100
-
-        ///////////////////////////////////////////////////////////////////////////////////////////////////
-        /**
-         * Are we going to need per-component centers (needed for correct postprocessing of concave meshes)
-         * Switching this on allocates 16*MAX_EFFECT_COMPONENTS bytes for uniforms in the vertex shader.
-         */
-        fun setUseCenters()
-        {
-            useCenters = true
-        }
-
-        ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-        ///////////////////////////////////////////////////////////////////////////////////////////////////
-
-        ///////////////////////////////////////////////////////////////////////////////////////////////////
-        @JvmStatic
-        fun getUniforms(programH: Int, variant: Int)
-        {
-            mCenterBlockIndex[variant] = GLES30.glGetUniformBlockIndex(programH, "componentCenter")
-            mAssocBlockIndex[variant] = GLES30.glGetUniformBlockIndex(programH, "componentAssociation")
-
-            if (mStride==0)
-            {
-                val uniformNames = arrayOf("vComAssoc")
-                val indices = IntArray(1)
-                val params = IntArray(1)
-
-                GLES30.glGetUniformIndices(programH, uniformNames, indices, 0)
-                GLES30.glGetActiveUniformsiv(programH, 1, indices, 0, GLES30.GL_UNIFORM_ARRAY_STRIDE, params, 0)
-
-                mStride = params[0]/4
-            }
-        }
-    }
 }
\ No newline at end of file
diff --git a/src/main/java/org/distorted/library/mesh/MeshMultigon.kt b/src/main/java/org/distorted/library/mesh/MeshMultigon.kt
index 710bbe9..3463a6b 100644
--- a/src/main/java/org/distorted/library/mesh/MeshMultigon.kt
+++ b/src/main/java/org/distorted/library/mesh/MeshMultigon.kt
@@ -692,6 +692,7 @@ class MeshMultigon : MeshBase
         ///////////////////////////////////////////////////////////////////////////////////////////////////
         // PUBLIC API
         ///////////////////////////////////////////////////////////////////////////////////////////////////
+        @JvmStatic
         fun computeEdgesUp(vertices: Array<Array<FloatArray>>): Array<IntArray>
         {
             val numPoly = vertices.size
@@ -708,6 +709,7 @@ class MeshMultigon : MeshBase
         }
 
         ///////////////////////////////////////////////////////////////////////////////////////////////////
+        @JvmStatic
         fun computeOuterAndHoleVertices(vertices: Array<Array<FloatArray>>, edgesUp: Array<IntArray>): Array<Array<FloatArray>>
         {
             val tmp = ArrayList<FloatArray>()
diff --git a/src/main/java/org/distorted/library/mesh/MeshPolygon.kt b/src/main/java/org/distorted/library/mesh/MeshPolygon.kt
index 8fffe80..eebcb20 100644
--- a/src/main/java/org/distorted/library/mesh/MeshPolygon.kt
+++ b/src/main/java/org/distorted/library/mesh/MeshPolygon.kt
@@ -286,8 +286,7 @@ class MeshPolygon : MeshBase
      * all bands go to.
      * @param centerY    Y coordinate of the center.
      */
-    @JvmOverloads
-    constructor(verticesXY: Array<FloatArray>, bands: FloatArray, exBand: Int = 0, exVertices: Int = 0, centerX: Float = 0.0f, centerY: Float = 0.0f) : super()
+    constructor(verticesXY: Array<FloatArray>, bands: FloatArray, exBand: Int, exVertices: Int, centerX: Float, centerY: Float) : super()
     {
         mPolygonVertices = verticesXY
         mPolygonBands = bands
@@ -330,7 +329,12 @@ class MeshPolygon : MeshBase
     }
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
-    constructor(verticesXY: Array<FloatArray>, bands: FloatArray, exIndex: Int, exVertices: Int) : this(verticesXY, bands, exIndex, exVertices, 0.0f, 0.0f)
+    constructor(verticesXY: Array<FloatArray>, bands: FloatArray, exIndex: Int, exVertices: Int)
+               : this(verticesXY, bands, exIndex, exVertices, 0.0f, 0.0f)
+
+    ///////////////////////////////////////////////////////////////////////////////////////////////////
+    constructor(verticesXY: Array<FloatArray>, bands: FloatArray)
+               : this(verticesXY, bands, 0, 0, 0.0f, 0.0f)
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////
     /**
diff --git a/src/main/java/org/distorted/library/uniformblock/UniformBlockAssociation.kt b/src/main/java/org/distorted/library/uniformblock/UniformBlockAssociation.kt
index d5ce29c..8969086 100644
--- a/src/main/java/org/distorted/library/uniformblock/UniformBlockAssociation.kt
+++ b/src/main/java/org/distorted/library/uniformblock/UniformBlockAssociation.kt
@@ -48,7 +48,7 @@ class UniformBlockAssociation
     ///////////////////////////////////////////////////////////////////////////////////////////////
     constructor()
     {
-        mMax = MeshBase.getMaxEffComponents()
+        mMax = MeshBase.maxEffComponents
         mStride = DEFAULT_STRIDE
         mAssociations = IntArray(mStride*mMax)
 
diff --git a/src/main/java/org/distorted/library/uniformblock/UniformBlockCenter.kt b/src/main/java/org/distorted/library/uniformblock/UniformBlockCenter.kt
index 9745e96..c309c87 100644
--- a/src/main/java/org/distorted/library/uniformblock/UniformBlockCenter.kt
+++ b/src/main/java/org/distorted/library/uniformblock/UniformBlockCenter.kt
@@ -38,7 +38,7 @@ class UniformBlockCenter
     ///////////////////////////////////////////////////////////////////////////////////////////////
     constructor()
     {
-        mMax = MeshBase.getMaxEffComponents()
+        mMax = MeshBase.maxEffComponents
         backingArray = FloatArray(4*mMax)
         mUBO = InternalBuffer()
     }
