Cleanup. Start tweaking flares, glares and flashes

This commit is contained in:
2021-10-29 21:47:03 +01:00
parent 78f91e522b
commit 502be6f64f
18 changed files with 59 additions and 153 deletions
-4
View File
@@ -9,14 +9,11 @@ module Shader.AuxAddition
import Shader.Data
import Data.List.Extra
--import Foreign
import Codec.Picture
import qualified Data.Vector.Storable as V
import Control.Lens
import Graphics.Rendering.OpenGL hiding (Point,translate,scale,imageHeight)
import Graphics.GL.Core43
--import Graphics.GL.Groups
--import Text.RawString.QQ
-- I am not sure if this assumes that the shader is constructed directly before
-- the texture is added...
@@ -45,7 +42,6 @@ vaddTextureNoFilter texturePath shad = do
let wtex = fromIntegral $ imageWidth tex
htex = fromIntegral $ imageHeight tex
glTexStorage2D GL_TEXTURE_2D 1 GL_RGBA8 wtex htex
--withArray texData $ \ptr -> do
V.unsafeWith (imageData tex) $ \ptr -> do
glTexSubImage2D GL_TEXTURE_2D 0 0 0 wtex htex GL_RGBA GL_UNSIGNED_BYTE ptr
return $ shad & shadTex ?~ ShaderTexture {_textureObject = textureOb}