clearMapTiles :: WebGLRenderingContext
              -> RenderMTilesProgram
              -> IO RenderMTilesProgram
clearMapTiles gl rmtp = do
    bindTexture gl gl_TEXTURE_2D Nothing
    bindBuffer gl gl_ARRAY_BUFFER Nothing
    forM_ (rmtTiles rmtp) $ \MapTile{..} ->
      deleteBuffer gl mtVertexBuffer >> deleteTexture gl mtTexture
    return rmtp { rmtTiles = [] }
clearMapTiles :: WebGLRenderingContext
              -> RenderMTilesProgram
              -> IO RenderMTilesProgram
clearMapTiles gl rmtp = do
    bindTexture gl gl_TEXTURE_2D Nothing
    bindBuffer gl gl_ARRAY_BUFFER Nothing
    forM_ (rmtTiles rmtp) $ \MapTile{..} ->
      deleteBuffer gl mtVertexBuffer >> deleteTexture gl mtTexture
    return rmtp { rmtTiles = [] }
clearMapTiles gl rmtp = do
    bindTexture gl gl_TEXTURE_2D Nothing
    bindBuffer gl gl_ARRAY_BUFFER Nothing
    forM_ (rmtTiles rmtp) $ \MapTile{..} ->
      deleteBuffer gl mtVertexBuffer >> deleteTexture gl mtTexture
    return rmtp { rmtTiles = [] }