luminance-samples 0.1.1 → 0.2
raw patch · 9 files changed
+26/−50 lines, 9 filesdep ~luminance
Dependency ranges changed: luminance
Files
- CHANGELOG.md +5/−1
- luminance-samples.cabal +7/−7
- src/Blending.hs +2/−6
- src/Blit.hs +2/−6
- src/Common.hs +1/−1
- src/DepthTest.hs +2/−6
- src/HelloWorld.hs +3/−10
- src/HelloWorldUniform.hs +2/−6
- src/Texture.hs +2/−7
CHANGELOG.md view
@@ -1,4 +1,8 @@-### 0.1.1+### 0.2++- Removed explicit GLSL pragmas because they’re now handled in luminance-0.2+.++### 0.1.1 - Added Common.hs in the `extra-source-files` field of the luminance-samples.cabal. - Added CHANGELOG.md.
luminance-samples.cabal view
@@ -1,5 +1,5 @@ name: luminance-samples-version: 0.1.1+version: 0.2 synopsis: Luminance samples description: Luminance samples used as tutorial help homepage: https://github.com/phaazon/luminance-samples@@ -29,7 +29,7 @@ , FlexibleContexts build-depends: base >= 4.8 && < 4.9- , luminance >= 0.1 && < 0.2+ , luminance >= 0.2 && < 0.3 , GLFW-b >= 1.4 && < 1.5 , mtl >= 2.2 && < 2.3 , resourcet >= 1.1 && < 1.2@@ -49,7 +49,7 @@ , ScopedTypeVariables build-depends: base >= 4.8 && < 4.9- , luminance >= 0.1 && < 0.2+ , luminance >= 0.2 && < 0.3 , GLFW-b >= 1.4 && < 1.5 , mtl >= 2.2 && < 2.3 , resourcet >= 1.1 && < 1.2@@ -70,7 +70,7 @@ build-depends: base >= 4.8 && < 4.9 , contravariant >= 1.3 && < 1.4- , luminance >= 0.1 && < 0.2+ , luminance >= 0.2 && < 0.3 , GLFW-b >= 1.4 && < 1.5 , mtl >= 2.2 && < 2.3 , resourcet >= 1.1 && < 1.2@@ -91,7 +91,7 @@ build-depends: base >= 4.8 && < 4.9 , contravariant >= 1.3 && < 1.4- , luminance >= 0.1 && < 0.2+ , luminance >= 0.2 && < 0.3 , GLFW-b >= 1.4 && < 1.5 , mtl >= 2.2 && < 2.3 , resourcet >= 1.1 && < 1.2@@ -113,7 +113,7 @@ build-depends: base >= 4.8 && < 4.9 , contravariant >= 1.3 && < 1.4 , JuicyPixels >= 3.2 && < 3.4- , luminance >= 0.1 && < 0.2+ , luminance >= 0.2 && < 0.3 , GLFW-b >= 1.4 && < 1.5 , mtl >= 2.2 && < 2.3 , resourcet >= 1.1 && < 1.2@@ -135,7 +135,7 @@ build-depends: base >= 4.8 && < 4.9 , contravariant >= 1.3 && < 1.4- , luminance >= 0.1 && < 0.2+ , luminance >= 0.2 && < 0.3 , GLFW-b >= 1.4 && < 1.5 , mtl >= 2.2 && < 2.3 , resourcet >= 1.1 && < 1.2
src/Blending.hs view
@@ -57,9 +57,7 @@ vsSource :: String vsSource = unlines [- "#version 450 core"- - , "in vec2 co;"+ "in vec2 co;" , "uniform vec2 offset;" @@ -71,9 +69,7 @@ fsSource :: String fsSource = unlines [- "#version 450 core"-- , "out vec4 frag;"+ "out vec4 frag;" , "uniform vec3 color;"
src/Blit.hs view
@@ -38,9 +38,7 @@ vsSource :: String vsSource = unlines [- "#version 450 core"- - , "in vec2 co;"+ "in vec2 co;" , "void main() {" , " gl_Position = vec4(co, 0., 1.);"@@ -50,9 +48,7 @@ fsSource :: String fsSource = unlines [- "#version 450 core"-- , "out vec4 frag;"+ "out vec4 frag;" , "void main() {" , " frag = vec4(1., 0., 0., 1.);"
src/Common.hs view
@@ -14,7 +14,7 @@ type App = ExceptT AppError (ResourceT IO) -data AppError = AppError String deriving (Eq,Show)+newtype AppError = AppError String deriving (Eq,Show) instance HasFramebufferError AppError where fromFramebufferError (IncompleteFramebuffer s) = AppError s
src/DepthTest.hs view
@@ -53,9 +53,7 @@ vsSource :: String vsSource = unlines [- "#version 450 core"- - , "in vec2 co;"+ "in vec2 co;" , "uniform vec2 offset;" @@ -67,9 +65,7 @@ fsSource :: String fsSource = unlines [- "#version 450 core"-- , "out vec4 frag;"+ "out vec4 frag;" , "uniform vec3 color;"
src/HelloWorld.hs view
@@ -14,9 +14,7 @@ main :: IO () main = startup $ \window -> do triangle <- createGeometry vertices Nothing Triangle- vs <- createVertexShader vsSource- fs <- createFragmentShader fsSource- program <- createProgram_ [vs,fs]+ program <- sequenceA [createVertexShader vsSource,createFragmentShader fsSource] >>= createProgram_ untilM (liftIO $ windowShouldClose window) $ do void . runCmd . draw $ framebufferBatch defaultFramebuffer [anySPBatch . shaderProgramBatch program mempty () $ [stdRenderCmd mempty () triangle]] endFrame window@@ -32,9 +30,7 @@ vsSource :: String vsSource = unlines [- "#version 450 core"- - , "in vec2 co;"+ "in vec2 co;" , "out vec4 vertexColor;" , "vec4 color[3] = vec4[]("@@ -52,11 +48,8 @@ fsSource :: String fsSource = unlines [- "#version 450 core"-- , "in vec4 vertexColor;"+ "in vec4 vertexColor;" , "out vec4 frag;"- , "void main() {" , " frag = vertexColor;"
src/HelloWorldUniform.hs view
@@ -36,9 +36,7 @@ vsSource :: String vsSource = unlines [- "#version 450 core"- - , "in vec2 co;"+ "in vec2 co;" , "out vec4 vertexColor;" , "uniform vec3[] colors;"@@ -58,9 +56,7 @@ fsSource :: String fsSource = unlines [- "#version 450 core"-- , "in vec4 vertexColor;"+ "in vec4 vertexColor;" , "out vec4 frag;"
src/Texture.hs view
@@ -50,9 +50,7 @@ vsSource :: String vsSource = unlines [- "#version 450 core"- - , "in vec2 co;"+ "in vec2 co;" , "void main() {" , " gl_Position = vec4(co, 0., 1.);"@@ -62,10 +60,7 @@ fsSource :: String fsSource = unlines [- "#version 450 core"- , "#extension GL_ARB_bindless_texture : require"-- , "out vec4 frag;"+ "out vec4 frag;" , "layout (bindless_sampler) uniform usampler2D srcTex;"