summaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
Diffstat (limited to 'Backend')
-rw-r--r--Backend/GL/Mesh.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Backend/GL/Mesh.hs b/Backend/GL/Mesh.hs
index 3ffb6f0..5c6311d 100644
--- a/Backend/GL/Mesh.hs
+++ b/Backend/GL/Mesh.hs
@@ -1,5 +1,6 @@
1{-# LANGUAGE TupleSections #-} 1{-# LANGUAGE TupleSections #-}
2module Backend.GL.Mesh ( 2module Backend.GL.Mesh (
3 loadMesh',
3 loadMesh, 4 loadMesh,
4 saveMesh, 5 saveMesh,
5 addMesh, 6 addMesh,
@@ -65,8 +66,11 @@ data GPUData
65 , dIndices :: Maybe (IndexStream Buffer) 66 , dIndices :: Maybe (IndexStream Buffer)
66 } 67 }
67 68
69loadMesh' :: String -> IO Mesh
70loadMesh' n = decode <$> LB.readFile n
71
68loadMesh :: String -> IO Mesh 72loadMesh :: String -> IO Mesh
69loadMesh n = compileMesh =<< decode <$> LB.readFile n 73loadMesh n = compileMesh =<< loadMesh' n
70 74
71saveMesh :: String -> Mesh -> IO () 75saveMesh :: String -> Mesh -> IO ()
72saveMesh n m = LB.writeFile n (encode m) 76saveMesh n m = LB.writeFile n (encode m)