diff --git a/haray.cabal b/haray.cabal index 4dc4094..9c79627 100644 --- a/haray.cabal +++ b/haray.cabal @@ -41,8 +41,6 @@ Executable haray , lin-alg Library - include-dirs: cbits - includes: structs.h hs-source-dirs: src default-language: Haskell2010 @@ -86,7 +84,8 @@ Library , mainland-pretty -- Need full support for OpenCL types , language-c-quote >= 0.7.2 - + include-dirs: cbits + includes: structs.h -- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source. -- Build-tools: diff --git a/src/Graphics/Rendering/Haray/Shape.hsc b/src/Graphics/Rendering/Haray/Shape.hsc index f451843..2f45450 100644 --- a/src/Graphics/Rendering/Haray/Shape.hsc +++ b/src/Graphics/Rendering/Haray/Shape.hsc @@ -232,14 +232,7 @@ instance Storable (Vec3 CFloat) where (#poke cl_float3, x) ptr x (#poke cl_float3, y) ptr y (#poke cl_float3, z) ptr z -{- - sizeOf _ = sizeOf (0::CFloat) * 3 - alignment _ = alignment (0::CFloat) - peek ptr = - Vec3 <$> peek (castPtr ptr) - <*> peek (ptr `plusPtr` sizeOf (0::CFloat)) - <*> peek (ptr `plusPtr` (2*sizeOf (0::CFloat))) --} + instance Storable (SphereData CFloat) where sizeOf _ = (#size Sphere) alignment _ = (#alignment Sphere)