В OpenGL ES 2.0 / 3.0 для преобразования матрицы вы можете использовать функции stati c из класса Matrix:
import android.opengl.Matrix
...
protected val viewMatrix = FloatArray(16)
protected val projectionMatrix = FloatArray(16)
protected val modelMatrix = FloatArray(16)
protected val modelViewMatrix = FloatArray(16)
protected val mvpMatrix = FloatArray(16)
...
Matrix.setLookAtM(viewMatrix, 0, 0f, 0f, 4f,
0f, 0f, 0f, 0f, 1.0f, 0.0f) // set camera position
...
Matrix.frustumM(projectionMatrix, 0, left, right, bottom, top, near, far)
...
// move object up/down and left/right
Matrix.translateM(modelMatrix, 0, x, y, z)
// angle and direction of rotation
Matrix.rotateM(modelMatrix, 0, angle, 0.5f, 0.5f, 0.5f)
Matrix.scaleM(modelMatrix, 0, 4f, 4f, 4f) // scale object
// matrix multiplication
Matrix.multiplyMM(modelViewMatrix, 0, viewMatrix, 0, modelMatrix, 0)
Matrix.multiplyMM(mvpMatrix, 0, projectionMatrix, 0, modelViewMatrix, 0)
...
// final mvp for shader
fun getMVPMatrixAsFloatBuffer(): FloatBuffer = Buffers.floatBuffer(mvpMatrix)