Read the obj file as ByteString and pass ByteString to the Parser

This commit is contained in:
2014-11-21 04:49:17 +01:00
parent 2d7a62770a
commit e673fee652
5 changed files with 13 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ module GUI.Gtk (makeGUI) where
import Control.Applicative
import Control.Monad(unless)
import Control.Monad.IO.Class
import qualified Data.ByteString.Char8 as B
import Diagrams.Prelude
import Diagrams.Backend.Cairo
import Diagrams.Backend.Cairo.Internal
@@ -235,7 +236,7 @@ saveAndDrawDiag :: FilePath -- ^ obj file to parse
saveAndDrawDiag fp fps mygui =
if (==) ".obj" . takeExtension $ fp
then do
mesh <- readFile fp
mesh <- B.readFile fp
mainDrawWindow <- widgetGetDrawWindow (mainDraw mygui)
treeDrawWindow <- widgetGetDrawWindow (treeDraw mygui)
adjustment <- rangeGetAdjustment (ptScale mygui)