From 17b276487354ae8463c6fd58a4a428b3eda4b5dd Mon Sep 17 00:00:00 2001 From: Csaba Hruska Date: Tue, 19 May 2015 12:14:26 +0200 Subject: mesh load without gpu resources --- Backend/GL/Mesh.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 @@ {-# LANGUAGE TupleSections #-} module Backend.GL.Mesh ( + loadMesh', loadMesh, saveMesh, addMesh, @@ -65,8 +66,11 @@ data GPUData , dIndices :: Maybe (IndexStream Buffer) } +loadMesh' :: String -> IO Mesh +loadMesh' n = decode <$> LB.readFile n + loadMesh :: String -> IO Mesh -loadMesh n = compileMesh =<< decode <$> LB.readFile n +loadMesh n = compileMesh =<< loadMesh' n saveMesh :: String -> Mesh -> IO () saveMesh n m = LB.writeFile n (encode m) -- cgit v1.2.3