DSA gl texture naming and storage
This commit is contained in:
+9
-6
@@ -20,7 +20,7 @@ import qualified Data.Vector.Mutable as MV
|
||||
import Control.Monad.Primitive
|
||||
import Foreign
|
||||
import Graphics.Rendering.OpenGL hiding (Point,translate,scale,imageHeight)
|
||||
import Graphics.GL.Core43
|
||||
import Graphics.GL.Core45
|
||||
|
||||
drawShaderLay :: Int -> UMV.MVector (PrimState IO) Int -> Int -> FullShader' -> IO ()
|
||||
{-# INLINE drawShaderLay #-}
|
||||
@@ -30,8 +30,10 @@ drawShaderLay l countsVector shadIn fs = do
|
||||
glUseProgram (_shadProg' fs)
|
||||
bindVertexArrayObject $= Just (_vao $ _shadVAO' fs)
|
||||
case _shadTex' fs of
|
||||
Just ShaderTexture{_textureObject = txo}
|
||||
-> textureBinding Texture2D $= Just txo
|
||||
Just ShaderTexture{_textureObject = txo} --, _textureTarget = tt}
|
||||
-- -> textureBinding Texture2D $= Just txo
|
||||
-- -> glBindTexture tt txo
|
||||
-> glBindTextureUnit 0 txo
|
||||
_ -> return ()
|
||||
glDrawArrays
|
||||
(marshalEPrimitiveMode $ _shadPrim' fs)
|
||||
@@ -45,9 +47,10 @@ drawShader fs i = do
|
||||
glUseProgram (_shadProg' fs)
|
||||
bindVertexArrayObject $= Just (_vao $ _shadVAO' fs)
|
||||
case _shadTex' fs of
|
||||
Just ShaderTexture{_textureObject = TextureObject txo
|
||||
, _textureTarget = tt }
|
||||
-> glBindTexture tt txo
|
||||
Just ShaderTexture{_textureObject = txo
|
||||
} --, _textureTarget = tt }
|
||||
-- -> glBindTexture tt txo
|
||||
-> glBindTextureUnit 0 txo
|
||||
_ -> return ()
|
||||
glDrawArrays
|
||||
(marshalEPrimitiveMode $ _shadPrim' fs)
|
||||
|
||||
Reference in New Issue
Block a user