packages feed

GPipe-TextureLoad 1.0.2 → 1.0.3

raw patch · 3 files changed

+34/−55 lines, 3 filesdep ~GPipedep ~stb-imagesetup-changed

Dependency ranges changed: GPipe, stb-image

Files

GPipe-TextureLoad.cabal view
@@ -1,46 +1,25 @@-name: GPipe-TextureLoad-version: 1.0.2-cabal-version: >=1.2.3-build-type: Simple-license: BSD3-license-file: ""-copyright: Tobias Bexelius-maintainer: Tobias Bexelius-build-depends: GPipe >= 1.1.5, base >= 4 && < 5, stb-image >=0.2, bitmap -any-stability: Experimental-homepage: http://www.haskell.org/haskellwiki/GPipe-package-url:-bug-reports: mailto:tobias_bexelius@hotmail.com-synopsis: Load GPipe textures from filesystem-description: The functions of this package helps loading GPipe textures from file. It is based on the stb-image package, and supports subsets of the JPG, PNG, TGA, BMP and PSD formats.-category: Graphics-author: Tobias Bexelius-tested-with:-data-files:-data-dir: ""-extra-source-files:-extra-tmp-files:-exposed-modules: Graphics.GPipe.Texture.Load-exposed: True-buildable: True-build-tools:-cpp-options:-cc-options:-ld-options:-pkgconfig-depends:-frameworks:-c-sources:-extensions: FlexibleContexts FlexibleInstances-extra-libraries:-extra-lib-dirs:-includes:-install-includes:-include-dirs:-hs-source-dirs: src-other-modules:-ghc-prof-options:-ghc-shared-options:-ghc-options:-hugs-options:-nhc98-options:-jhc-options:+name:                GPipe-TextureLoad
+version:             1.0.3
+cabal-version:       >= 1.8
+build-type:          Simple
+license:             BSD3
+license-file:        ""
+copyright:           Tobias Bexelius
+maintainer:          Tobias Bexelius
+build-depends:       GPipe >= 1.1.5, base >= 4 && < 5, stb-image >=0.2, bitmap -any
+stability:           Experimental
+homepage:            http://www.haskell.org/haskellwiki/GPipe
+synopsis:            Load GPipe textures from filesystem
+description:         The functions of this package helps loading GPipe textures from file. It is based on the stb-image package, and supports subsets of the JPG, PNG, TGA, BMP and PSD formats.
+category:            Graphics
+author:              Tobias Bexelius
+library 
+  build-depends:   
+                   base >= 4 && <5,
+                   stb-image >=0.2.1 && < 0.3,
+                   GPipe >= 1.3.1,
+                   bitmap
+  hs-source-dirs:  src
+  ghc-options:     -Wall
+  exposed-modules: Graphics.GPipe.Texture.Load
+
Setup.lhs view
@@ -1,6 +1,6 @@-#!/usr/bin/runhaskell 
-> module Main where
-> import Distribution.Simple
-> main :: IO ()
-> main = defaultMain
-
+#!/usr/bin/runhaskell +> module Main where+> import Distribution.Simple+> main :: IO ()+> main = defaultMain+
src/Graphics/GPipe/Texture/Load.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE FlexibleInstances #-}
 ----------------------------------------------------------------------------- -- -- Module      :  Graphics.GPipe.Texture.Load@@ -23,9 +24,8 @@  import Graphics.GPipe import Codec.Image.STB-import Data.Bitmap.IO (withBitmap)-import Data.Either import Foreign.Ptr (plusPtr)+import Data.Bitmap.Pure (withBitmap)
  -- | Provides the general way of loading any kind of textures. A 3D texture is assumed to be an array of square images -- tiled vertically in the image file. Cube textures are assumed to be composed of 6 equally sized images@@ -51,7 +51,7 @@ loadTexture' comp io path = do image <- loadImage' path comp                                either                                   (ioError . userError)-                                  (flip withBitmap io)+                                  (`withBitmap` io)                                   image  texture3DFromImage cpufmt fmt path s@(w,h) comp 0 ptr =