diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2018-09-22 12:44:47 +0200 |
---|---|---|
committer | Csaba Hruska <csaba.hruska@gmail.com> | 2018-09-22 12:44:47 +0200 |
commit | 3e1f789ed52e20f1ddf6e20ed9c7f61cf7aaedbd (patch) | |
tree | e0393ac5f70b84947403e857f54fe3a7a10956c1 | |
parent | 9f6e1725b52ea6f48101a37181f0aa9f7d1494d3 (diff) |
-rw-r--r-- | examples/pickInt.hs | 2 | ||||
-rw-r--r-- | src/LambdaCube/GL/Backend.hs | 6 | ||||
-rw-r--r-- | stack.yaml | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/examples/pickInt.hs b/examples/pickInt.hs index 2703e91..335364a 100644 --- a/examples/pickInt.hs +++ b/examples/pickInt.hs | |||
@@ -79,7 +79,7 @@ main = do | |||
79 | [LC.GLOutputRenderTexture (fromIntegral -> fbo) _rendTex] -> do | 79 | [LC.GLOutputRenderTexture (fromIntegral -> fbo) _rendTex] -> do |
80 | rtexPicks <- collectPicks fbo pickPoints | 80 | rtexPicks <- collectPicks fbo pickPoints |
81 | printPicks pickPoints rtexPicks | 81 | printPicks pickPoints rtexPicks |
82 | x -> error $ "Unexpected outputs: " <> show x | 82 | x -> error $ "Unexpected outputs: " ++ show x |
83 | 83 | ||
84 | -- render to framebuffer & pick | 84 | -- render to framebuffer & pick |
85 | LambdaCubeGL.renderFrame pipeDraw | 85 | LambdaCubeGL.renderFrame pipeDraw |
diff --git a/src/LambdaCube/GL/Backend.hs b/src/LambdaCube/GL/Backend.hs index 0584a34..1cf3f62 100644 --- a/src/LambdaCube/GL/Backend.hs +++ b/src/LambdaCube/GL/Backend.hs | |||
@@ -204,17 +204,17 @@ clearRenderTarget GLRenderTarget{..} values = do | |||
204 | VV2F (V2 r g) -> with (V4 r g 0 1) $ glClearBufferfv buf i . castPtr | 204 | VV2F (V2 r g) -> with (V4 r g 0 1) $ glClearBufferfv buf i . castPtr |
205 | VV3F (V3 r g b) -> with (V4 r g b 1) $ glClearBufferfv buf i . castPtr | 205 | VV3F (V3 r g b) -> with (V4 r g b 1) $ glClearBufferfv buf i . castPtr |
206 | VV4F (V4 r g b a) -> with (V4 r g b a) $ glClearBufferfv buf i . castPtr | 206 | VV4F (V4 r g b a) -> with (V4 r g b a) $ glClearBufferfv buf i . castPtr |
207 | 207 | ||
208 | VInt r -> with (V4 r 0 0 1) $ glClearBufferiv buf i . castPtr | 208 | VInt r -> with (V4 r 0 0 1) $ glClearBufferiv buf i . castPtr |
209 | VV2I (V2 r g) -> with (V4 r g 0 1) $ glClearBufferiv buf i . castPtr | 209 | VV2I (V2 r g) -> with (V4 r g 0 1) $ glClearBufferiv buf i . castPtr |
210 | VV3I (V3 r g b) -> with (V4 r g b 1) $ glClearBufferiv buf i . castPtr | 210 | VV3I (V3 r g b) -> with (V4 r g b 1) $ glClearBufferiv buf i . castPtr |
211 | VV4I (V4 r g b a) -> with (V4 r g b a) $ glClearBufferiv buf i . castPtr | 211 | VV4I (V4 r g b a) -> with (V4 r g b a) $ glClearBufferiv buf i . castPtr |
212 | 212 | ||
213 | VWord r -> with (V4 r 0 0 1) $ glClearBufferiv buf i . castPtr | 213 | VWord r -> with (V4 r 0 0 1) $ glClearBufferiv buf i . castPtr |
214 | VV2U (V2 r g) -> with (V4 r g 0 1) $ glClearBufferiv buf i . castPtr | 214 | VV2U (V2 r g) -> with (V4 r g 0 1) $ glClearBufferiv buf i . castPtr |
215 | VV3U (V3 r g b) -> with (V4 r g b 1) $ glClearBufferiv buf i . castPtr | 215 | VV3U (V3 r g b) -> with (V4 r g b 1) $ glClearBufferiv buf i . castPtr |
216 | VV4U (V4 r g b a) -> with (V4 r g b a) $ glClearBufferiv buf i . castPtr | 216 | VV4U (V4 r g b a) -> with (V4 r g b a) $ glClearBufferiv buf i . castPtr |
217 | _ -> error $ "internal error: unsupported color attachment format: " <> show c | 217 | _ -> error $ "internal error: unsupported color attachment format: " ++ show c |
218 | 218 | ||
219 | _ -> error "internal error (clearRenderTarget)" | 219 | _ -> error "internal error (clearRenderTarget)" |
220 | (mask,_) <- foldM setClearValue (0,0) values | 220 | (mask,_) <- foldM setClearValue (0,0) values |
@@ -9,6 +9,7 @@ packages: | |||
9 | extra-dep: true | 9 | extra-dep: true |
10 | extra-deps: | 10 | extra-deps: |
11 | - wavefront-0.7.1.1 | 11 | - wavefront-0.7.1.1 |
12 | - vect-0.4.7 | ||
12 | 13 | ||
13 | flags: | 14 | flags: |
14 | lambdacube-gl: | 15 | lambdacube-gl: |