Continue transfer to mutable vectors
This commit is contained in:
+4
-4
@@ -12,7 +12,7 @@ module Shader
|
||||
import Shader.Data
|
||||
import Shader.Parameters
|
||||
import Shader.ExtraPrimitive
|
||||
import Shader.Poke
|
||||
--import Shader.Poke
|
||||
--import Layers
|
||||
--import MatrixHelper
|
||||
|
||||
@@ -82,15 +82,15 @@ drawShaderLay l fs i = do
|
||||
|
||||
drawShaderLay' :: Int -> UMV.MVector (PrimState IO) Int -> Int -> VShader -> IO ()
|
||||
{-# INLINE drawShaderLay' #-}
|
||||
drawShaderLay' l countsVector index fs = do
|
||||
i <- UMV.read countsVector index
|
||||
drawShaderLay' theLayer shaderOffsetsVector shaderIndex fs = do
|
||||
i <- UMV.read shaderOffsetsVector shaderIndex
|
||||
currentProgram $= Just (_vshaderProgram fs)
|
||||
bindVertexArrayObject $= Just (_vao $ _vshaderVAO fs)
|
||||
case _vshaderTexture fs of
|
||||
Just ShaderTexture{_textureObject = txo}
|
||||
-> textureBinding Texture2D $= Just txo
|
||||
_ -> return ()
|
||||
glDrawArrays (marshalEPrimitiveMode $ _vshaderDrawPrimitive fs) (fromIntegral $ l*numSubElements) (fromIntegral i)
|
||||
glDrawArrays (marshalEPrimitiveMode $ _vshaderDrawPrimitive fs) (fromIntegral $ theLayer*numSubElements) (fromIntegral i)
|
||||
|
||||
drawShader :: FullShader -> Int -> IO ()
|
||||
{-# INLINE drawShader #-}
|
||||
|
||||
Reference in New Issue
Block a user