 import Graphics.Formats.Assimp.Storable
 
 #include "assimp.h"
+#include "aiVersion.h"
 #include "typedefs.h"
 
 --withT = with -- http://blog.ezyang.com/2010/06/call-and-fun-marshalling-redux/

--  {`String', `String'} -> `()'#}

-- aiGetLegalString
-- aiGetVersionMinor
-- aiGetVersionmajor
-- aiGetVersionRevision
-- aiGetCompileFlags
-- aiGetMaterialProperty
-- aiGetMaterialFloatArray

-- aiDetachLogStream
-- aiDetachAllLogStreams

importFile :: String -> PostProcessSteps -> IO Scene
importFile str psteps = do 
  let psteps' = cFromEnum psteps
  sceneptr <- withCString str $ \x -> {#call unsafe aiImportFile#} x psteps'
  scene <- peek' sceneptr
  {#call unsafe aiReleaseImport#} sceneptr
  return scene

{#fun unsafe aiGetErrorString as getErrorString
  {} -> `String'#}
