unpackAttribute :: VertexAttribute -> (ByteString,GFX.Attribute)
unpackAttribute (VertexAttribute (Just an) (Just at) (Just ad)) = (,) (SB.pack an) $ case at of
    AT_Float -> GFX.A_Float $ toV ad
    AT_Vec2  -> GFX.A_Vec2  $ toV ad
    AT_Vec3  -> GFX.A_Vec3  $ toV ad
    AT_Vec4  -> GFX.A_Vec4  $ toV ad
    AT_Mat2  -> GFX.A_Mat2  $ toV ad
    AT_Mat3  -> GFX.A_Mat3  $ toV ad
    AT_Mat4  -> GFX.A_Mat4  $ toV ad
    AT_Int   -> GFX.A_Int   $ toV ad
    AT_Word  -> GFX.A_Word  $ toV ad 
unpackAttribute :: VertexAttribute -> (ByteString,GFX.Attribute)
unpackAttribute (VertexAttribute (Just an) (Just at) (Just ad)) = (,) (SB.pack an) $ case at of
    AT_Float -> GFX.A_Float $ toV ad
    AT_Vec2  -> GFX.A_Vec2  $ toV ad
    AT_Vec3  -> GFX.A_Vec3  $ toV ad
    AT_Vec4  -> GFX.A_Vec4  $ toV ad
    AT_Mat2  -> GFX.A_Mat2  $ toV ad
    AT_Mat3  -> GFX.A_Mat3  $ toV ad
    AT_Mat4  -> GFX.A_Mat4  $ toV ad
    AT_Int   -> GFX.A_Int   $ toV ad
    AT_Word  -> GFX.A_Word  $ toV ad 
unpackAttribute (VertexAttribute (Just an) (Just at) (Just ad)) = (,) (SB.pack an) $ case at of
    AT_Float -> GFX.A_Float $ toV ad
    AT_Vec2  -> GFX.A_Vec2  $ toV ad
    AT_Vec3  -> GFX.A_Vec3  $ toV ad
    AT_Vec4  -> GFX.A_Vec4  $ toV ad
    AT_Mat2  -> GFX.A_Mat2  $ toV ad
    AT_Mat3  -> GFX.A_Mat3  $ toV ad
    AT_Mat4  -> GFX.A_Mat4  $ toV ad
    AT_Int   -> GFX.A_Int   $ toV ad
    AT_Word  -> GFX.A_Word  $ toV ad 