diff --git a/src/Render/Misc.hs b/src/Render/Misc.hs index 0fbf58c..f7163a5 100644 --- a/src/Render/Misc.hs +++ b/src/Render/Misc.hs @@ -139,3 +139,7 @@ genColorData :: Int -- ^ Amount -> [Int8] genColorData n c = take (length c*n) (cycle c) +-- from GLUtil +-- |Allocate and fill a 'BufferObject' from a list of 'Storable's. +makeBuffer :: Storable a => BufferTarget -> [a] -> IO BufferObject +makeBuffer target elems = makeBufferLen target (length elems) elems diff --git a/src/Render/Render.hs b/src/Render/Render.hs index 6d49e27..b732045 100644 --- a/src/Render/Render.hs +++ b/src/Render/Render.hs @@ -7,7 +7,7 @@ import Foreign.Storable import Graphics.Rendering.OpenGL.GL import Graphics.Rendering.OpenGL.Raw.Core31 import Graphics.Rendering.OpenGL.Raw.ARB.TessellationShader -import Graphics.GLUtil.BufferObjects (offset0) +import Graphics.GLUtil.BufferObjects import qualified Linear as L import Control.Lens ((^.)) import Control.Monad.RWS.Strict (liftIO)