diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2015-05-19 12:14:26 +0200 |
---|---|---|
committer | Csaba Hruska <csaba.hruska@gmail.com> | 2015-05-19 12:14:26 +0200 |
commit | 17b276487354ae8463c6fd58a4a428b3eda4b5dd (patch) | |
tree | ac21b4de17f5d57cb1433a883a0642efaf0ec2c1 /Backend/GL/Mesh.hs | |
parent | d3503a262b40b973cf99eaa185ec984b9dd6835b (diff) |
mesh load without gpu resources
Diffstat (limited to 'Backend/GL/Mesh.hs')
-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) |