diff options
author | Joe Crayne <joe@jerkface.net> | 2019-07-31 11:24:27 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-13 23:59:35 -0500 |
commit | 7cad9f6b02e2f71803047235622b9157ff988e75 (patch) | |
tree | 36c31805b96ebdc7dd915fc4ce50cfa33f3e5118 /LoadMesh.hs | |
parent | 85fb0dd752a8911e8fa14287ab9f8673fd6ffda4 (diff) |
faster file loading.
Diffstat (limited to 'LoadMesh.hs')
-rw-r--r-- | LoadMesh.hs | 3 |
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 #-} |
6 | module LoadMesh where | 6 | module LoadMesh where |
7 | 7 | ||
8 | import ByteStringUtil | ||
8 | import LambdaCube.GL as LC -- renderer | 9 | import LambdaCube.GL as LC -- renderer |
9 | import LambdaCube.GL.Mesh as LambdaCubeGL | 10 | import LambdaCube.GL.Mesh as LambdaCubeGL |
10 | import LambdaCube.GL.Type as LC | 11 | import LambdaCube.GL.Type as LC |
@@ -54,7 +55,7 @@ relativeFrom path file | isAbsolute file = file | |||
54 | relativeFrom path file = takeDirectory path </> file | 55 | relativeFrom path file = takeDirectory path </> file |
55 | 56 | ||
56 | loadOBJ :: String -> IO (Either String MeshData) | 57 | loadOBJ :: String -> IO (Either String MeshData) |
57 | loadOBJ fname = L.readFile fname >>= \bs -> do | 58 | loadOBJ 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 |