Cleanup
This commit is contained in:
@@ -3,24 +3,16 @@ module Shader (
|
||||
drawShaderLay,
|
||||
shadVBOptr,
|
||||
drawShader,
|
||||
pokeBindFoldable,
|
||||
pokeBindFoldableLayer,
|
||||
) where
|
||||
|
||||
import Control.Lens
|
||||
import Control.Monad
|
||||
import Control.Monad.Primitive
|
||||
--import qualified Data.Vector as V
|
||||
import qualified Data.Vector.Mutable as MV
|
||||
--import qualified Data.Vector.Unboxed as UV
|
||||
import qualified Data.Vector.Unboxed.Mutable as UMV
|
||||
import Foreign
|
||||
import Graphics.GL.Core45
|
||||
import Picture.Data
|
||||
import Shader.Bind
|
||||
import Shader.Data
|
||||
import Shader.Parameters
|
||||
import Shader.Poke
|
||||
|
||||
drawShaderLay :: Int -> UMV.MVector (PrimState IO) Int -> Int -> (Shader, VBO) -> IO ()
|
||||
{-# INLINE drawShaderLay #-}
|
||||
@@ -48,24 +40,6 @@ drawShader fs i = do
|
||||
freeShaderPointers' :: (Shader, VBO) -> IO ()
|
||||
freeShaderPointers' = free . _vboPtr . snd
|
||||
|
||||
pokeBindFoldable ::
|
||||
MV.MVector (PrimState IO) (Shader, VBO) ->
|
||||
UMV.MVector (PrimState IO) Int ->
|
||||
Picture ->
|
||||
IO ()
|
||||
pokeBindFoldable shadV counts m = do
|
||||
pokeVerxs shadV counts m
|
||||
bufferShaderVector shadV counts
|
||||
|
||||
pokeBindFoldableLayer ::
|
||||
MV.MVector (PrimState IO) (Shader, VBO) ->
|
||||
UMV.MVector (PrimState IO) Int ->
|
||||
Picture ->
|
||||
IO ()
|
||||
pokeBindFoldableLayer shadV counts m = do
|
||||
pokeLayVerxs shadV counts m
|
||||
bindShaderLayers shadV counts
|
||||
|
||||
shadVBOptr :: (Shader, VBO) -> Ptr Float
|
||||
{-# INLINE shadVBOptr #-}
|
||||
shadVBOptr = _vboPtr . snd
|
||||
|
||||
Reference in New Issue
Block a user