name:           GPipe-GLFW4
version:        2.0.0
cabal-version:  >= 1.10
build-type:     Simple
author:         Patrick Redmond
license:        MIT
license-file:   LICENSE
copyright:      Patrick Redmond
category:       Graphics
stability:      Experimental
homepage:       https://github.com/plredmond/GPipe-GLFW
synopsis:       GLFW OpenGL context creation for GPipe
description:
                GPipe-GLFW is a utility library to enable the use of GLFW as
                the OpenGL window and context handler for GPipe. GPipe is a
                typesafe functional API based on the conceptual model of
                OpenGL.

                This version uses OpenGL Core profile 4.5 and uses GPipe-Core
                instead of GPipe.
maintainer:     Patrick Redmond
data-files:     CHANGELOG.md

source-repository head
  type:     git
  location: https://github.com/homectl/workspace
  subdir:   GPipe-GLFW4

library
  hs-source-dirs: src
  ghc-options:
      -Wall
  default-language: Haskell2010
  exposed-modules:
      Graphics.GPipe.Context.GLFW
      Graphics.GPipe.Context.GLFW.Input
      Graphics.GPipe.Context.GLFW.Window
      Graphics.GPipe.Context.GLFW.Misc
  other-modules:
      Graphics.GPipe.Context.GLFW.Calls
      Graphics.GPipe.Context.GLFW.Resource
      Graphics.GPipe.Context.GLFW.Wrappers
      Graphics.GPipe.Context.GLFW.Format
      Graphics.GPipe.Context.GLFW.Handler
      Graphics.GPipe.Context.GLFW.RPC
      Graphics.GPipe.Context.GLFW.Logger
  build-depends:
      base                          >= 4.7 && < 5
    , GLFW-b                        >= 3.2 && < 3.4
    , GPipe-Core                    >= 0.2.3 && < 0.3
    , async                         >= 2.1 && < 2.3
    , containers                    >= 0.5 && < 0.7
    , stm                           >= 2.4 && < 3

test-suite testsuite
  default-language: Haskell2010
  hs-source-dirs:   test
  type: exitcode-stdio-1.0
  main-is:          testsuite.hs
  other-modules:
      Graphics.GPipe.Context.GLFW.CloseSpec
      Graphics.GPipe.Context.GLFW.FixedSpec
      Graphics.GPipe.Context.GLFW.InputSpec
      Graphics.GPipe.Context.GLFW.ManualSpec
      Graphics.GPipe.Context.GLFW.MultiPassSpec
      Graphics.GPipe.Context.GLFW.SequenceSpec
      Graphics.GPipe.Context.GLFW.TimedSpec
      Graphics.GPipe.BufferSpec
      Graphics.GPipe.GeometryStream.IdentitySpec
      Graphics.GPipe.GeometryStream.Shader2DSpec
      Graphics.GPipe.GeometryStream.Shader3DSpec
      Test.Common
      Test.Control
      Test.ShaderTest
  ghc-options:
      -Wall
      -threaded
  build-tool-depends:
      hspec-discover:hspec-discover
  build-depends:
      base < 5
    , GPipe-Core
    , GPipe-GLFW4
    , exception-transformers
    , hspec
    , lens
    , transformers

benchmark bench
  default-language: Haskell2010
  hs-source-dirs:   bench
  type: exitcode-stdio-1.0
  main-is:          bench.hs
  other-modules:
      Graphics.GPipe.BufferBench
      Graphics.GPipe.TextureBench
  ghc-options:
      -Wall
      -threaded
  build-depends:
      base < 5
    , GPipe-Core
    , GPipe-GLFW4
    , JuicyPixels
    , criterion

executable playground
  default-language: Haskell2010
  hs-source-dirs:   tools, test
  main-is:          playground.hs
  other-modules:
      Test.ShaderTest
  ghc-options:
      -Wall
      -threaded
  build-depends:
      base < 5
    , GPipe-Core
    , GPipe-GLFW4
    , exception-transformers
    , lens
    , transformers