luminance-samples 0.2.0.1 → 0.2.0.2
raw patch · 3 files changed
+9/−3 lines, 3 files
Files
- CHANGELOG.md +4/−0
- luminance-samples.cabal +1/−1
- src/Texture.hs +4/−2
CHANGELOG.md view
@@ -1,3 +1,7 @@+### 0.2.0.2++- Updated the Texture sample to adapt to luminance new texture interface.+ ### 0.2.0.1 - Simplified the implementation of all samples.
luminance-samples.cabal view
@@ -1,5 +1,5 @@ name: luminance-samples-version: 0.2.0.1+version: 0.2.0.2 synopsis: Luminance samples description: Luminance samples used as tutorial help homepage: https://github.com/phaazon/luminance-samples
src/Texture.hs view
@@ -82,8 +82,10 @@ createTexture_ :: (MonadIO m,MonadResource m) => Image PixelRGBA8 -> m (Texture2D RGBA8UI) createTexture_ img = do- tex <- createTexture (fromIntegral $ imageWidth img) (fromIntegral $ imageHeight img) 1 defaultSampling- uploadWhole tex False (convertV $ imageData img)+ let w = fromIntegral $ imageWidth img+ h = fromIntegral $ imageHeight img+ tex <- createTexture (w,h) 1 defaultSampling+ uploadSub tex (0,0) (w,h) False (convertV $ imageData img) pure tex convertV :: (Storable a) => S.Vector a -> Vector a