Work on textures and lighting
This commit is contained in:
@@ -6,7 +6,6 @@ module Shader (
|
||||
) where
|
||||
|
||||
import Control.Lens
|
||||
import Control.Monad
|
||||
import Control.Monad.Primitive
|
||||
import qualified Data.Vector.Unboxed.Mutable as UMV
|
||||
import Foreign
|
||||
@@ -20,7 +19,6 @@ drawShaderLay l countsVector shadIn fs = do
|
||||
i <- UMV.read countsVector shadIn
|
||||
glUseProgram (_shaderUINT $ fst fs)
|
||||
glBindVertexArray $ fs ^. _1 . shaderVAO . vaoName
|
||||
zipWithM_ (\ti -> glBindTextureUnit ti . _unTO) [0 ..] (fs ^. _1 . shaderTextures)
|
||||
glDrawArrays
|
||||
(_unPrimitiveMode $ _shaderPrimitive $ fst fs)
|
||||
(fromIntegral $ l * numSubElements)
|
||||
@@ -31,7 +29,6 @@ drawShader :: Shader -> Int -> IO ()
|
||||
drawShader fs i = do
|
||||
glUseProgram (_shaderUINT fs)
|
||||
glBindVertexArray $ fs ^. shaderVAO . vaoName
|
||||
zipWithM_ (\ti -> glBindTextureUnit ti . _unTO) [0..] (fs ^. shaderTextures)
|
||||
glDrawArrays
|
||||
(_unPrimitiveMode $ _shaderPrimitive fs)
|
||||
0
|
||||
|
||||
Reference in New Issue
Block a user