diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2017-01-26 00:36:48 +0000 |
---|---|---|
committer | Csaba Hruska <csaba.hruska@gmail.com> | 2017-01-26 00:37:03 +0000 |
commit | 0f01492b377ed52e7967c75e834ee7ad6d487163 (patch) | |
tree | 0082f89b6d4079d7d7b310421d5a1e371ae914a4 | |
parent | 83f4f04f20d9a40380ed2ab16912be19b6379173 (diff) |
fix calculation of active texture count, caused a bug when render textures were not binded properly, closes #5.
-rw-r--r-- | lambdacube-gl.cabal | 2 | ||||
-rw-r--r-- | src/LambdaCube/GL/Backend.hs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lambdacube-gl.cabal b/lambdacube-gl.cabal index 56e9cfc..b8b365b 100644 --- a/lambdacube-gl.cabal +++ b/lambdacube-gl.cabal | |||
@@ -1,5 +1,5 @@ | |||
1 | name: lambdacube-gl | 1 | name: lambdacube-gl |
2 | version: 0.5.2.2 | 2 | version: 0.5.2.3 |
3 | synopsis: OpenGL 3.3 Core Profile backend for LambdaCube 3D | 3 | synopsis: OpenGL 3.3 Core Profile backend for LambdaCube 3D |
4 | description: OpenGL 3.3 Core Profile backend for LambdaCube 3D | 4 | description: OpenGL 3.3 Core Profile backend for LambdaCube 3D |
5 | homepage: http://lambdacube3d.com | 5 | homepage: http://lambdacube3d.com |
diff --git a/src/LambdaCube/GL/Backend.hs b/src/LambdaCube/GL/Backend.hs index 84e5b04..324b3e6 100644 --- a/src/LambdaCube/GL/Backend.hs +++ b/src/LambdaCube/GL/Backend.hs | |||
@@ -852,7 +852,7 @@ emit cmd = modify $ \s -> s {drawCommands = cmd : drawCommands s} | |||
852 | 852 | ||
853 | drawContext programs = do | 853 | drawContext programs = do |
854 | GLProgram{..} <- (programs !) <$> gets currentProgram | 854 | GLProgram{..} <- (programs !) <$> gets currentProgram |
855 | let f = take (Set.size inputTextureUniforms) . IntMap.toList | 855 | let f = take (Map.size inputTextures) . IntMap.toList |
856 | GLDrawContext <$> gets rasterContext | 856 | GLDrawContext <$> gets rasterContext |
857 | <*> gets accumulationContext | 857 | <*> gets accumulationContext |
858 | <*> gets renderTarget | 858 | <*> gets renderTarget |