Translate VAOs to DSA
This commit is contained in:
+5
-2
@@ -7,6 +7,7 @@ module Shader
|
||||
, pokeBindFoldable
|
||||
, pokeBindFoldableLayer
|
||||
) where
|
||||
import Control.Lens
|
||||
import Shader.Data
|
||||
import Shader.Parameters
|
||||
import Shader.ExtraPrimitive
|
||||
@@ -27,7 +28,8 @@ drawShaderLay l countsVector shadIn fs = do
|
||||
i <- UMV.read countsVector shadIn
|
||||
--currentProgram $= Just (_shadProg' fs)
|
||||
glUseProgram (_shadProg' fs)
|
||||
bindVertexArrayObject $= Just (_vaoName $ _shadVAO' fs)
|
||||
glBindVertexArray $ fs ^. shadVAO' . vaoName
|
||||
--bindVertexArrayObject $= Just (_vaoName $ _shadVAO' fs)
|
||||
case _shadTex' fs of
|
||||
Just ShaderTexture{_textureObject = txo} --, _textureTarget = tt}
|
||||
-- -> textureBinding Texture2D $= Just txo
|
||||
@@ -44,7 +46,8 @@ drawShader :: FullShader' -> Int -> IO ()
|
||||
drawShader fs i = do
|
||||
--currentProgram $= Just (_shadProg fs)
|
||||
glUseProgram (_shadProg' fs)
|
||||
bindVertexArrayObject $= Just (_vaoName $ _shadVAO' fs)
|
||||
glBindVertexArray $ fs ^. shadVAO' . vaoName
|
||||
--bindVertexArrayObject $= Just (_vaoName $ _shadVAO' fs)
|
||||
case _shadTex' fs of
|
||||
Just ShaderTexture{_textureObject = txo
|
||||
} --, _textureTarget = tt }
|
||||
|
||||
Reference in New Issue
Block a user