Continue render refactor
This commit is contained in:
@@ -62,8 +62,8 @@ addTexture2D nlev minfilt magfilt texpath shad = do
|
||||
-- | for transforming a 256x256 image containing 64 tiles of 16x16 pixels into
|
||||
-- an image that was directly readable by glTexSubImage3D, used the
|
||||
-- transformation tilesToLine 8 128 on the underlying pixels.
|
||||
addTextureArray :: String -> FullShader -> IO FullShader
|
||||
addTextureArray texturePath shad = do
|
||||
addTextureArray :: String -> (FullShader,VBO) -> IO (FullShader,VBO)
|
||||
addTextureArray texturePath (shad,vbo) = do
|
||||
err <- glGetError
|
||||
print err
|
||||
Right cmap <- readImage texturePath
|
||||
@@ -75,8 +75,9 @@ addTextureArray texturePath shad = do
|
||||
glGenerateTextureMipmap texname
|
||||
glTextureParameteri texname GL_TEXTURE_MIN_FILTER (unsafeCoerce GL_LINEAR_MIPMAP_LINEAR)
|
||||
glTextureParameteri texname GL_TEXTURE_MAG_FILTER (unsafeCoerce GL_LINEAR)
|
||||
return $ shad & shadTex' ?~ ShaderTexture
|
||||
return (shad & shadTex' ?~ ShaderTexture
|
||||
{ _textureObject = texname}
|
||||
, vbo)
|
||||
|
||||
-- I am completely unclear on why this works with its current parameters
|
||||
tilesToLine
|
||||
|
||||
Reference in New Issue
Block a user