Inlined bindArrayBuffers, seemed to improve perfomance
This commit is contained in:
@@ -333,14 +333,7 @@ rotate3 :: Float -> Point3 -> Point3
|
||||
rotate3 a (x,y,z) = (x',y',z)
|
||||
where (x',y') = rotateV a (x,y)
|
||||
|
||||
fSize = sizeOf (0 :: Float)
|
||||
|
||||
bindArrayBuffers :: Int -> [(BufferObject,Ptr Float,Int)] -> IO ()
|
||||
bindArrayBuffers numVs ps = do
|
||||
forM_ ps $ \(bo,ptr,i) -> do
|
||||
bindBuffer ArrayBuffer $= Just bo
|
||||
bufferData ArrayBuffer $= (fromIntegral $ fSize * numVs * i, ptr, StreamDraw)
|
||||
|
||||
twoPtrsVAO :: VAO -> (Ptr Float, Ptr Float)
|
||||
{-# INLINE twoPtrsVAO #-}
|
||||
twoPtrsVAO vao = case (\(_,ps,_) -> ps) $ unzip3 $ _vaoBufferTargets vao of
|
||||
|
||||
Reference in New Issue
Block a user