Что в следующем коде не работает?
class CandleFire {
    var vert = 0
    var fragm = 0
    var prog = 0
    var atribute_vertPos = 0
    var uniform_time = 0

    var data = floatArrayOf(
        1.0f, -1.0f,
        -1.0f, 1.0f,
        1.0f, 1.0f,
        1.0f, -1.0f,
        -1.0f, 1.0f,
        -1.0f, -1.0f,
    )

    val buffer = IntArray(1)

    init{
        InitShaders()
        InitBuffers()
        GLES20.glEnable(GLES20.GL_BLEND)
        GLES20.glBlendFunc(GLES20.GL_SRC_ALPHA_SATURATE, GLES20.GL_ONE_MINUS_SRC_ALPHA)
    }
    fun Draw(){
        GLES20.glClearColor(0f, 0f, 0f, 0f)
        GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT)
        GLES20.glUseProgram(prog)
        val now = Date()
        val time = now.minutes * 60 + now.seconds
        GLES20.glUniform1f(uniform_time, time.toFloat())
        GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, buffer[0])
        GLES20.glEnableVertexAttribArray(atribute_vertPos)
        GLES20.glVertexAttribPointer(atribute_vertPos, 2, GLES20.GL_FLOAT,  false, 0, 0)
        GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 6)
    }

    private fun InitShaders(){
        vert = GLES20.glCreateShader(GLES20.GL_VERTEX_SHADER)
        GLES20.glShaderSource(
            vert,
                "attribute vec4 VertPos;\n" +
                "varying vec2 FragPos;\n" +
                "varying vec2 uv;\n" +
                "\n" +
                "\n" +
                "void main() {\n" +
                "    gl_Position = VertPos;\n" +
                "    FragPos = VertPos.xy;\n" +
                "    uv = (FragPos + 1.0) / 2.0;\n" +
                "}")
        GLES20.glCompileShader(vert)

        fragm = GLES20.glCreateShader(GLES20.GL_FRAGMENT_SHADER)
        GLES20.glShaderSource(
            fragm,
            "precision mediump float;\n" +
                    "varying vec2 FragPos;\n" +
                    "varying vec2 uv;\n" +
                    "\n" +
                    "uniform float time;\n" +
                    "\n" +
                    "\n" +
                    "#define PI 3.14159265358979323846\n" +
                    "\n" +
                    "float cnoise(vec2 P);\n" +
                    "float snoise(vec2 v);\n" +
                    "float noise(float p);\n" +
                    "float noise(vec2 n);\n" +
                    "\n" +
                    "vec4 permute(vec4 x);\n" +
                    "vec3 permute(vec3 x);\n" +
                    "vec2 fade(vec2 t);\n" +
                    "float rand(vec2 c);\n" +
                    "float rand(float n);\n" +
                    "float clampf(float src);\n" +
                    "\n" +
                    "\n" +
                    "void main() {\n" +
                    "\n" +
                    "    vec2 cur_uv = uv;\n" +
                    "\n" +
                    "    float snoise_value = clampf(snoise(cur_uv * 0.2 + vec2(0, -time)));\n" +
                    "\n" +
                    "    float a =  snoise_value * 0.5;\n" +
                    "\n" +
                    "    a += clampf(noise(cur_uv * 2.0 + vec2(0, -time)));\n" +
                    "\n" +
                    "    a += clampf(cnoise(cur_uv * 4.0 + vec2(0, -time)));\n" +
                    "\n" +
                    "    a += clampf(cnoise(cur_uv * 4.0 + vec2(0, -time * 4.0)));\n" +
                    "\n" +
                    "    a *= pow(1.5 - distance(uv, vec2(0.5, 0.1)), 5.0);\n" +
                    "\n" +
                    "    a *= 1.0 - abs(FragPos.x * 3.0);\n" +
                    "    a = clampf(a);\n" +
                    "\n" +
                    "    if(FragPos.y < -0.2)\n" +
                    "    {\n" +
                    "        a *= 1.2 +  FragPos.y ; \n" +
                    "        if(FragPos.y < -0.8)\n" +
                    "        {\n" +
                    "            a *= (1.0 + FragPos.y) * 5.0; \n" +
                    "        }\n" +
                    "    }\n" +
                    "    a = clampf(a);\n" +
                    "\n" +
                    "    float glow = 1.2 - distance(vec2(0.0, -0.2), FragPos * vec2(1.8 + pow(FragPos.y, 2.0), 0.5 * FragPos.y));\n" +
                    "    glow *= snoise_value * 0.2 + 0.5;\n" +
                    "\n" +
                    "    a = max(a, glow);\n" +
                    "    a = pow(a, 0.7);\n" +
                    "\n" +
                    "    float smoothh = 1.0;\n" +
                    "    if(abs(FragPos.y) > 0.8)\n" +
                    "    {\n" +
                    "        smoothh  = 1.0 -(abs(FragPos.y) - 0.8) * 5.0;\n" +
                    "    }\n" +
                    "\n" +
                    "    vec4 result = vec4(a ,  a - 0.25  , 0.1, a * pow(smoothh, 0.5));\n" +
                    "\n" +
                    "    result.rgb *= 2.8 * (1.0 - abs(FragPos.x)) * (1.0 - abs(FragPos.y * 0.5 + 0.5));\n" +
                    "\n" +
                    "    gl_FragColor = result;\n" +
                    "}\n" +
                    "\n" +
                    "\n" +
                    "vec4 permute(vec4 x)\n" +
                    "{\n" +
                    "    return mod(((x*34.0)+1.0)*x, 289.0);\n" +
                    "}\n" +
                    "\n" +
                    "vec3 permute(vec3 x)\n" +
                    "{\n" +
                    "    return mod(((x*34.0)+1.0)*x, 289.0);\n" +
                    "}\n" +
                    "\n" +
                    "vec2 fade(vec2 t) \n" +
                    "{\n" +
                    "    return t*t*t*(t*(t*6.0-15.0)+10.0);\n" +
                    "}\n" +
                    "\n" +
                    "float rand(vec2 c)\n" +
                    "{\n" +
                    "\treturn fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453);\n" +
                    "}\n" +
                    "\n" +
                    "float rand(float n)\n" +
                    "{\n" +
                    "    return fract(sin(n) * 43758.5453123);\n" +
                    "}\n" +
                    "\n" +
                    "float clampf(float src)\n" +
                    "{\n" +
                    "    if(src < 0.0) return 0.0;\n" +
                    "    if(src > 1.0) return 1.0;\n" +
                    "    return src;\n" +
                    "}\n" +
                    "\n" +
                    "\n" +
                    "float cnoise(vec2 P)\n" +
                    "{\n" +
                    "    vec4 Pi = floor(P.xyxy) + vec4(0.0, 0.0, 1.0, 1.0);\n" +
                    "    vec4 Pf = fract(P.xyxy) - vec4(0.0, 0.0, 1.0, 1.0);\n" +
                    "    Pi = mod(Pi, 289.0); // To avoid truncation effects in permutation\n" +
                    "    vec4 ix = Pi.xzxz;\n" +
                    "    vec4 iy = Pi.yyww;\n" +
                    "    vec4 fx = Pf.xzxz;\n" +
                    "    vec4 fy = Pf.yyww;\n" +
                    "    vec4 i = permute(permute(ix) + iy);\n" +
                    "    vec4 gx = 2.0 * fract(i * 0.0243902439) - 1.0; // 1/41 = 0.024...\n" +
                    "    vec4 gy = abs(gx) - 0.5;\n" +
                    "    vec4 tx = floor(gx + 0.5);\n" +
                    "    gx = gx - tx;\n" +
                    "    vec2 g00 = vec2(gx.x,gy.x);\n" +
                    "    vec2 g10 = vec2(gx.y,gy.y);\n" +
                    "    vec2 g01 = vec2(gx.z,gy.z);\n" +
                    "    vec2 g11 = vec2(gx.w,gy.w);\n" +
                    "    vec4 norm = 1.79284291400159 - 0.85373472095314 * \n" +
                    "      vec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11));\n" +
                    "    g00 *= norm.x;\n" +
                    "    g01 *= norm.y;\n" +
                    "    g10 *= norm.z;\n" +
                    "    g11 *= norm.w;\n" +
                    "    float n00 = dot(g00, vec2(fx.x, fy.x));\n" +
                    "    float n10 = dot(g10, vec2(fx.y, fy.y));\n" +
                    "    float n01 = dot(g01, vec2(fx.z, fy.z));\n" +
                    "    float n11 = dot(g11, vec2(fx.w, fy.w));\n" +
                    "    vec2 fade_xy = fade(Pf.xy);\n" +
                    "    vec2 n_x = mix(vec2(n00, n01), vec2(n10, n11), fade_xy.x);\n" +
                    "    float n_xy = mix(n_x.x, n_x.y, fade_xy.y);\n" +
                    "    return 2.3 * n_xy;\n" +
                    "}\n" +
                    "\n" +
                    "float snoise(vec2 v)\n" +
                    "{\n" +
                    "    const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n" +
                    "             -0.577350269189626, 0.024390243902439);\n" +
                    "    vec2 i  = floor(v + dot(v, C.yy) );\n" +
                    "    vec2 x0 = v -   i + dot(i, C.xx);\n" +
                    "    vec2 i1;\n" +
                    "    i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n" +
                    "    vec4 x12 = x0.xyxy + C.xxzz;\n" +
                    "    x12.xy -= i1;\n" +
                    "    i = mod(i, 289.0);\n" +
                    "    vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 ))\n" +
                    "    + i.x + vec3(0.0, i1.x, 1.0 ));\n" +
                    "    vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy),\n" +
                    "      dot(x12.zw,x12.zw)), 0.0);\n" +
                    "    m = m*m ;\n" +
                    "    m = m*m ;\n" +
                    "    vec3 x = 2.0 * fract(p * C.www) - 1.0;\n" +
                    "    vec3 h = abs(x) - 0.5;\n" +
                    "    vec3 ox = floor(x + 0.5);\n" +
                    "    vec3 a0 = x - ox;\n" +
                    "    m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h );\n" +
                    "    vec3 g;\n" +
                    "    g.x  = a0.x  * x0.x  + h.x  * x0.y;\n" +
                    "    g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n" +
                    "    return 130.0 * dot(m, g);\n" +
                    "}\n" +
                    "\n" +
                    "float noise(float p)\n" +
                    "{\n" +
                    "\tfloat fl = floor(p);\n" +
                    "    float fc = fract(p);\n" +
                    "\treturn mix(rand(fl), rand(fl + 1.0), fc);\n" +
                    "}\n" +
                    "\t\n" +
                    "float noise(vec2 n) \n" +
                    "{\n" +
                    "\tconst vec2 d = vec2(0.0, 1.0);\n" +
                    "    vec2 b = floor(n), f = smoothstep(vec2(0.0), vec2(1.0), fract(n));\n" +
                    "\treturn mix(mix(rand(b), rand(b + d.yx), f.x), mix(rand(b + d.xy), rand(b + d.yy), f.x), f.y);\n" +
                    "}" )
        GLES20.glCompileShader(fragm)

        prog = GLES20.glCreateProgram()
        GLES20.glAttachShader(prog, vert)
        GLES20.glAttachShader(prog, fragm)
        GLES20.glLinkProgram(prog)

        atribute_vertPos = GLES20.glGetAttribLocation(prog, "VertPos")
        uniform_time = GLES20.glGetUniformLocation(prog, "time")
    }

    private fun InitBuffers(){
        GLES20.glGenBuffers(1, buffer, 0)
        GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, buffer[0])
        val floatBuffer = ByteBuffer.allocateDirect(data.size * Float.SIZE_BYTES)
            .order(ByteOrder.nativeOrder())
            .asFloatBuffer()
            .put(data)
        floatBuffer.position(0)
        GLES20.glBufferData(GLES20.GL_ARRAY_BUFFER,
            data.size * Float.SIZE_BYTES,
            floatBuffer,
            GLES20.GL_STATIC_DRAW)
    }
}