Skip to content

Commit c817f53

Browse files
committed
Fixed indentation.
1 parent cb87aa6 commit c817f53

File tree

1 file changed

+9
-11
lines changed
  • src/Graphics/Rendering/OpenGL/GL/Shaders

1 file changed

+9
-11
lines changed

src/Graphics/Rendering/OpenGL/GL/Shaders/Uniform.hs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,10 @@ makeUniformVar :: (UniformComponent a, Storable (b a))
139139
=> (UniformLocation -> b a -> IO ())
140140
-> UniformLocation -> StateVar (b a)
141141
makeUniformVar setter location = makeStateVar getter (setter location)
142-
where getter = do
143-
program <- fmap fromJust $ get currentProgram
144-
allocaBytes maxUniformBufferSize $ \buf -> do
145-
getUniform program location buf
146-
peek buf
142+
where getter = do program <- fmap fromJust $ get currentProgram
143+
allocaBytes maxUniformBufferSize $ \buf -> do
144+
getUniform program location buf
145+
peek buf
147146

148147
instance UniformComponent a => Uniform (Vertex2 a) where
149148
uniform = makeUniformVar $ \location (Vertex2 x y) -> uniform2 location x y
@@ -199,12 +198,11 @@ instance UniformComponent a => Uniform (Index1 a) where
199198
instance Uniform TextureUnit where
200199
uniform loc@(UniformLocation ul) = makeStateVar getter setter
201200
where setter (TextureUnit tu) = uniform1 loc (fromIntegral tu :: GLint)
202-
getter = do
203-
program <- fmap fromJust $ get currentProgram
204-
allocaBytes (sizeOf (undefined :: GLint)) $ \buf -> do
205-
glGetUniformiv (programID program) ul buf
206-
tuID <- peek buf
207-
return . TextureUnit $ fromIntegral tuID
201+
getter = do program <- fmap fromJust $ get currentProgram
202+
allocaBytes (sizeOf (undefined :: GLint)) $ \buf -> do
203+
glGetUniformiv (programID program) ul buf
204+
tuID <- peek buf
205+
return . TextureUnit $ fromIntegral tuID
208206
uniformv location count = uniform1v location count . (castPtr :: Ptr TextureUnit -> Ptr GLint)
209207

210208
--------------------------------------------------------------------------------

0 commit comments

Comments
 (0)