summaryrefslogtreecommitdiff
path: root/Backend/GL/Mesh.hs
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2015-05-19 12:14:26 +0200
committerCsaba Hruska <csaba.hruska@gmail.com>2015-05-19 12:14:26 +0200
commit17b276487354ae8463c6fd58a4a428b3eda4b5dd (patch)
treeac21b4de17f5d57cb1433a883a0642efaf0ec2c1 /Backend/GL/Mesh.hs
parentd3503a262b40b973cf99eaa185ec984b9dd6835b (diff)
mesh load without gpu resources
Diffstat (limited to 'Backend/GL/Mesh.hs')
-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)