diff --git a/src/Importer/IQM/Parser.hs b/src/Importer/IQM/Parser.hs index e68ad95..e44a8ac 100644 --- a/src/Importer/IQM/Parser.hs +++ b/src/Importer/IQM/Parser.hs @@ -216,7 +216,7 @@ parseIQM a = vbo <- sequence $ map toVBOfromVAO va return $ raw { vertexArrays = va' - , vertexArrayObjects = vbo + , vertexBufferObjects = vbo } -- | Creates a BufferObject on the Graphicscard for each BufferObject diff --git a/src/Importer/IQM/Types.hs b/src/Importer/IQM/Types.hs index 0692398..17c21f5 100644 --- a/src/Importer/IQM/Types.hs +++ b/src/Importer/IQM/Types.hs @@ -109,7 +109,8 @@ data IQM = IQM , texts :: [ByteString] , meshes :: [IQMMesh] , vertexArrays :: [IQMVertexArray] - , vertexArrayObjects :: [BufferObject] + , vertexBufferObjects :: [BufferObject] + , vertexArrayObject :: VertexArrayObject } deriving (Show, Eq) -- | Different Vertex-Array-Types in IQM diff --git a/src/Render/Types.hs b/src/Render/Types.hs index e7273b2..4eee0c2 100644 --- a/src/Render/Types.hs +++ b/src/Render/Types.hs @@ -34,7 +34,7 @@ instance GLCamera Camera where getCam (Flat (x',z')) dist' xa' ya' = lookAt (cpos ^+^ at') at' up where - at' = V3 x 0 z + at' = V3 x (y+1) z cpos = crot !* (V3 0 0 (-dist)) crot = ( (fromQuaternion $ axisAngle upmap (xa::CFloat)) @@ -52,7 +52,7 @@ instance GLCamera Camera where getCam (Sphere (inc',az') r') dist' xa' ya' = --inclination (pitch), azimuth (yaw) lookAt (cpos ^+^ at') at' up where - at' = sphereToCart r inc az + at' = sphereToCart (r+1) inc az cpos = crot !* (V3 0 0 (-dist)) crot = ( (fromQuaternion $ axisAngle upmap (xa::CFloat)) @@ -76,4 +76,4 @@ sphereToCart :: (Floating a) => a -> a -> a -> V3 a sphereToCart r inc az = V3 (r * (sin inc) * (cos az)) (r * (sin inc) * (sin az)) - (r * (cos inc)) \ No newline at end of file + (r * (cos inc))