Move closer to removing all geom shaders
This commit is contained in:
@@ -122,7 +122,6 @@ preloadRender = do
|
||||
putStrLn "Setup full screen shaders"
|
||||
alphadivideshader <- makeSourcedShader "texture2D/alphaDivide" [vert, frag]
|
||||
fsShad <- makeSourcedShader "texture/simple" [vert, frag]
|
||||
-- transcompshader <- makeSourcedShader "fullscreen/transparencyComp" [vert, frag]
|
||||
bloomBlurShad <- makeSourcedShader "texture/bloomBlur" [vert, frag]
|
||||
lightingTextureShad <- makeSourcedShader "lighting/texture" [vert, frag]
|
||||
lightingCloudShad <- makeSourcedShader "lighting/cloud" [vert, frag]
|
||||
@@ -185,7 +184,6 @@ preloadRender = do
|
||||
, _windowPullShader = winpull
|
||||
, _pullWallShader = wallpull
|
||||
, _fullscreenShader = fsShad
|
||||
-- , _transparencyCompShader = transcompshader
|
||||
, _alphaDivideShader = alphadivideshader
|
||||
, _lightingTextureShader = lightingTextureShad
|
||||
, _lightingCloudShader = lightingCloudShad
|
||||
|
||||
@@ -125,16 +125,14 @@ setupVertexAttribPointer vao loc va = do
|
||||
where
|
||||
loc' = fromIntegral loc
|
||||
|
||||
makeShaderProgram ::
|
||||
String ->
|
||||
[(GLenum, BS.ByteString)] -> -- list of shaders
|
||||
IO GLuint
|
||||
makeShaderProgram :: String -> [(GLenum, BS.ByteString)] -> IO GLuint
|
||||
makeShaderProgram str srcs = do
|
||||
theprog <- glCreateProgram
|
||||
shaders <- mapM (compileAndCheckShader str) srcs
|
||||
mapM_ (glAttachShader theprog) shaders
|
||||
glLinkProgram theprog
|
||||
checkErrorGL (str ++ " linking ") glGetProgramiv glGetProgramInfoLog theprog GL_LINK_STATUS
|
||||
checkErrorGL
|
||||
(str ++ " linking ") glGetProgramiv glGetProgramInfoLog theprog GL_LINK_STATUS
|
||||
mapM_ (glDetachShader theprog) shaders
|
||||
mapM_ glDeleteShader shaders
|
||||
return theprog
|
||||
|
||||
+4
-5
@@ -499,11 +499,10 @@ pokeLayVerx vbos counts vx = do
|
||||
|
||||
pokeStride :: ShadNum -> Int
|
||||
{-# INLINE pokeStride #-}
|
||||
pokeStride PolyShad = 7 + 1
|
||||
--pokeStride TextShad = 11
|
||||
pokeStride TextShad = 10 + 2
|
||||
pokeStride ArcShad = 10 + 2
|
||||
pokeStride EllShad = 7 + 1
|
||||
pokeStride PolyShad = 8
|
||||
pokeStride TextShad = 12
|
||||
pokeStride ArcShad = 12
|
||||
pokeStride EllShad = 8
|
||||
|
||||
poke34 :: Ptr Float -> Point3 -> Point4 -> IO ()
|
||||
{-# INLINE poke34 #-}
|
||||
|
||||
Reference in New Issue
Block a user