summaryrefslogtreecommitdiff
path: root/LoadMesh.hs
diff options
context:
space:
mode:
Diffstat (limited to 'LoadMesh.hs')
-rw-r--r--LoadMesh.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/LoadMesh.hs b/LoadMesh.hs
index 423630f..32e4f84 100644
--- a/LoadMesh.hs
+++ b/LoadMesh.hs
@@ -5,6 +5,7 @@
5{-# LANGUAGE TupleSections #-} 5{-# LANGUAGE TupleSections #-}
6module LoadMesh where 6module LoadMesh where
7 7
8import ByteStringUtil
8import LambdaCube.GL as LC -- renderer 9import LambdaCube.GL as LC -- renderer
9import LambdaCube.GL.Mesh as LambdaCubeGL 10import LambdaCube.GL.Mesh as LambdaCubeGL
10import LambdaCube.GL.Type as LC 11import LambdaCube.GL.Type as LC
@@ -54,7 +55,7 @@ relativeFrom path file | isAbsolute file = file
54relativeFrom path file = takeDirectory path </> file 55relativeFrom path file = takeDirectory path </> file
55 56
56loadOBJ :: String -> IO (Either String MeshData) 57loadOBJ :: String -> IO (Either String MeshData)
57loadOBJ fname = L.readFile fname >>= \bs -> do 58loadOBJ fname = readBigFile fname >>= \bs -> do
58 let obj@OBJ{..} = Wavefront.parse bs 59 let obj@OBJ{..} = Wavefront.parse bs
59 -- load materials 60 -- load materials
60 mtlLib <- if V.null objMtlLibs 61 mtlLib <- if V.null objMtlLibs