summaryrefslogtreecommitdiff
path: root/MeshSketch.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-06-18 00:35:19 -0400
committerJoe Crayne <joe@jerkface.net>2019-06-18 00:35:19 -0400
commit811dec27f1ca7eedca4dc25c100da51659639c8f (patch)
tree6bdee51fc2040519f192701699e7263f6e7431f4 /MeshSketch.hs
parent40b339a401a82610d16601e9a1ce34af9b159d56 (diff)
Materials and textures are relative to object file.
Diffstat (limited to 'MeshSketch.hs')
-rw-r--r--MeshSketch.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/MeshSketch.hs b/MeshSketch.hs
index f31c7cf..167a5fd 100644
--- a/MeshSketch.hs
+++ b/MeshSketch.hs
@@ -179,7 +179,8 @@ uploadState obj mm storage = do
179 let glarea = mmWidget mm 179 let glarea = mmWidget mm
180 -- load OBJ geometry and material descriptions 180 -- load OBJ geometry and material descriptions
181 let workarea = BoundingBox (-1.5) (1.5) (-1.5) 1.5 (-1.5) (1.5) 181 let workarea = BoundingBox (-1.5) (1.5) (-1.5) 1.5 (-1.5) (1.5)
182 ((objMesh,mtlLib),objscale) <- uploadOBJToGPU (Just workarea) obj 182 mtlLib = snd obj
183 (objMesh,objscale) <- uploadOBJToGPU (Just workarea) obj
183 -- load materials textures 184 -- load materials textures
184 gpuMtlLib <- uploadMtlLib mtlLib 185 gpuMtlLib <- uploadMtlLib mtlLib
185 -- add OBJ to pipeline input 186 -- add OBJ to pipeline input