renderSceneCB :: BufferObject
              -> BufferObject
              -> UniformLocation
              -> IORef GLfloat
              -> DisplayCallback
renderSceneCB vbo ibo gWorldLocation gScale = do
    clear [ColorBuffer]
    gScaleVal <- readIORef gScale

    uniformMat gWorldLocation $= getTrans
        WVPPipeline {
            worldInfo   = Vector3 0 0 5,
            scaleInfo  = Vector3 1 1 1,
            rotateInfo = Vector3 0 gScaleVal 0,
            persProj   = persProjection,
            pipeCamera =
                ( initCamera Nothing windowWidth windowHeight )
                { cameraPos    = Vector3 0 0 (-3)
                , cameraTarget = Vector3 0 0 2
                , cameraUp     = Vector3 0 1 0
                }
        }

    vertexAttribArray vPosition $= Enabled
    bindBuffer ArrayBuffer $= Just vbo
    vertexAttribPointer vPosition $=
        (ToFloat, VertexArrayDescriptor 3 Float 0 offset0)
    bindBuffer ElementArrayBuffer $= Just ibo

    drawIndexedTris 4

    vertexAttribArray vPosition $= Disabled

    swapBuffers
 where
    vPosition = AttribLocation 0
renderSceneCB :: BufferObject
              -> BufferObject
              -> UniformLocation
              -> IORef GLfloat
              -> DisplayCallback
renderSceneCB vbo ibo gWorldLocation gScale = do
    clear [ColorBuffer]
    gScaleVal <- readIORef gScale

    uniformMat gWorldLocation $= getTrans
        WVPPipeline {
            worldInfo   = Vector3 0 0 5,
            scaleInfo  = Vector3 1 1 1,
            rotateInfo = Vector3 0 gScaleVal 0,
            persProj   = persProjection,
            pipeCamera =
                ( initCamera Nothing windowWidth windowHeight )
                { cameraPos    = Vector3 0 0 (-3)
                , cameraTarget = Vector3 0 0 2
                , cameraUp     = Vector3 0 1 0
                }
        }

    vertexAttribArray vPosition $= Enabled
    bindBuffer ArrayBuffer $= Just vbo
    vertexAttribPointer vPosition $=
        (ToFloat, VertexArrayDescriptor 3 Float 0 offset0)
    bindBuffer ElementArrayBuffer $= Just ibo

    drawIndexedTris 4

    vertexAttribArray vPosition $= Disabled

    swapBuffers
 where
    vPosition = AttribLocation 0
renderSceneCB vbo ibo gWorldLocation gScale = do
    clear [ColorBuffer]
    gScaleVal <- readIORef gScale

    uniformMat gWorldLocation $= getTrans
        WVPPipeline {
            worldInfo   = Vector3 0 0 5,
            scaleInfo  = Vector3 1 1 1,
            rotateInfo = Vector3 0 gScaleVal 0,
            persProj   = persProjection,
            pipeCamera =
                ( initCamera Nothing windowWidth windowHeight )
                { cameraPos    = Vector3 0 0 (-3)
                , cameraTarget = Vector3 0 0 2
                , cameraUp     = Vector3 0 1 0
                }
        }

    vertexAttribArray vPosition $= Enabled
    bindBuffer ArrayBuffer $= Just vbo
    vertexAttribPointer vPosition $=
        (ToFloat, VertexArrayDescriptor 3 Float 0 offset0)
    bindBuffer ElementArrayBuffer $= Just ibo

    drawIndexedTris 4

    vertexAttribArray vPosition $= Disabled

    swapBuffers
 where
    vPosition = AttribLocation 0