Fix character array binding
This commit is contained in:
@@ -2,7 +2,7 @@ module Shader.AuxAddition
|
||||
( addSamplerTexture2D
|
||||
, vaddTextureNoFilter
|
||||
, addTextureArray
|
||||
, addTextureArray'
|
||||
, addBindTextureArray
|
||||
, initTexture2D
|
||||
, initTexture2DArray
|
||||
, tilesToLine
|
||||
@@ -128,9 +128,9 @@ addTextureArray texturePath (shad,vbo) = do
|
||||
return (shad & shaderTextures .:~ TO texname
|
||||
, vbo)
|
||||
|
||||
addTextureArray' :: String -> GLsizei -> GLsizei -> GLsizei -> GLsizei -> GLenum -> GLenum
|
||||
-> Shader -> IO Shader
|
||||
addTextureArray' fp nlev w h d minfilt magfilt shad = do
|
||||
addBindTextureArray :: GLuint -> String -> GLsizei -> GLsizei -> GLsizei -> GLsizei -> GLenum -> GLenum
|
||||
-> IO ()
|
||||
addBindTextureArray bindpoint fp nlev w h d minfilt magfilt = do
|
||||
Right cmap <- readImage fp
|
||||
let texdata = convertRGBA8 cmap
|
||||
texname <- mglCreate $ glCreateTextures GL_TEXTURE_2D_ARRAY
|
||||
@@ -140,7 +140,7 @@ addTextureArray' fp nlev w h d minfilt magfilt shad = do
|
||||
glGenerateTextureMipmap texname
|
||||
glTextureParameteri texname GL_TEXTURE_MIN_FILTER (unsafeCoerce minfilt)
|
||||
glTextureParameteri texname GL_TEXTURE_MAG_FILTER (unsafeCoerce magfilt)
|
||||
return (shad & shaderTextures .:~ TO texname )
|
||||
glBindTextureUnit bindpoint texname
|
||||
|
||||
tilesToLine
|
||||
:: Int -- ^ Parameter a
|
||||
|
||||
Reference in New Issue
Block a user