diff options
author | Jeanne-Kamikaze <jeannekamikaze@gmail.com> | 2013-02-22 17:24:16 +0100 |
---|---|---|
committer | Jeanne-Kamikaze <jeannekamikaze@gmail.com> | 2013-02-22 17:24:16 +0100 |
commit | 7c0a2694e29a2ef52fcfe3e5de2f3b9c10ce252c (patch) | |
tree | dd71856711f5493196ec56490d929b4a73e11a9f | |
parent | 44134d7f8f3c13ba232b771eb0b53c249f009eff (diff) |
Switched loadShader params order
-rw-r--r-- | Spear/GL.hs | 4 | ||||
-rw-r--r-- | Spear/Scene/Loader.hs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Spear/GL.hs b/Spear/GL.hs index eb84492..d3a42f0 100644 --- a/Spear/GL.hs +++ b/Spear/GL.hs | |||
@@ -213,8 +213,8 @@ detachShader prog shader = glDetachShader (getProgram prog) (getShader shader) | |||
213 | -- | 213 | -- |
214 | -- This function creates a new shader. To load source code into an existing shader, | 214 | -- This function creates a new shader. To load source code into an existing shader, |
215 | -- see 'loadSource', 'shaderSource' and 'readSource'. | 215 | -- see 'loadSource', 'shaderSource' and 'readSource'. |
216 | loadShader :: FilePath -> ShaderType -> Game s GLSLShader | 216 | loadShader :: ShaderType -> FilePath -> Game s GLSLShader |
217 | loadShader file shaderType = do | 217 | loadShader shaderType file = do |
218 | shader <- newShader shaderType | 218 | shader <- newShader shaderType |
219 | loadSource file shader | 219 | loadSource file shader |
220 | compile file shader | 220 | compile file shader |
diff --git a/Spear/Scene/Loader.hs b/Spear/Scene/Loader.hs index 4467849..9d785fe 100644 --- a/Spear/Scene/Loader.hs +++ b/Spear/Scene/Loader.hs | |||
@@ -294,7 +294,7 @@ loadShader shaderType ((stype, file):xs) = | |||
294 | else Spear.Scene.Loader.loadShader shaderType xs | 294 | else Spear.Scene.Loader.loadShader shaderType xs |
295 | 295 | ||
296 | loadShader' :: String -> GL.ShaderType -> Loader GL.GLSLShader | 296 | loadShader' :: String -> GL.ShaderType -> Loader GL.GLSLShader |
297 | loadShader' file shaderType = loadResource file shaders addShader $ GL.loadShader file shaderType | 297 | loadShader' file shaderType = loadResource file shaders addShader $ GL.loadShader shaderType file |
298 | 298 | ||
299 | newLight :: SceneGraph -> Loader () | 299 | newLight :: SceneGraph -> Loader () |
300 | newLight _ = return () | 300 | newLight _ = return () |