From 7c0a2694e29a2ef52fcfe3e5de2f3b9c10ce252c Mon Sep 17 00:00:00 2001 From: Jeanne-Kamikaze Date: Fri, 22 Feb 2013 17:24:16 +0100 Subject: Switched loadShader params order --- Spear/GL.hs | 4 ++-- 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) -- -- This function creates a new shader. To load source code into an existing shader, -- see 'loadSource', 'shaderSource' and 'readSource'. -loadShader :: FilePath -> ShaderType -> Game s GLSLShader -loadShader file shaderType = do +loadShader :: ShaderType -> FilePath -> Game s GLSLShader +loadShader shaderType file = do shader <- newShader shaderType loadSource file shader 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) = else Spear.Scene.Loader.loadShader shaderType xs loadShader' :: String -> GL.ShaderType -> Loader GL.GLSLShader -loadShader' file shaderType = loadResource file shaders addShader $ GL.loadShader file shaderType +loadShader' file shaderType = loadResource file shaders addShader $ GL.loadShader shaderType file newLight :: SceneGraph -> Loader () newLight _ = return () -- cgit v1.2.3