diff options
Diffstat (limited to 'Backend')
-rw-r--r-- | Backend/GL/Mesh.hs | 6 |
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 #-} |
2 | module Backend.GL.Mesh ( | 2 | module 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 | ||
69 | loadMesh' :: String -> IO Mesh | ||
70 | loadMesh' n = decode <$> LB.readFile n | ||
71 | |||
68 | loadMesh :: String -> IO Mesh | 72 | loadMesh :: String -> IO Mesh |
69 | loadMesh n = compileMesh =<< decode <$> LB.readFile n | 73 | loadMesh n = compileMesh =<< loadMesh' n |
70 | 74 | ||
71 | saveMesh :: String -> Mesh -> IO () | 75 | saveMesh :: String -> Mesh -> IO () |
72 | saveMesh n m = LB.writeFile n (encode m) | 76 | saveMesh n m = LB.writeFile n (encode m) |